calcurse-4.2.1/ 0000755 0001750 0001750 00000000000 13005352613 010316 5 0000000 0000000 calcurse-4.2.1/ABOUT-NLS 0000644 0001750 0001750 00000151116 13005352574 011500 0000000 0000000 Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project is
a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the programs
they contain can be made to speak your own native language. Most such
packages use GNU `gettext'. Other packages have their own ways to
internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your country by running the command
`locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
Special advice for Norwegian users: The language code for Norwegian
bokma*l changed from `no' to `nb' recently (in 2003). During the
transition period, while some message catalogs for this language are
installed under `nb' and some older ones under `no', it's recommended
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
older translations are used.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of January
2004. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
+----------------------------------------------------+
a2ps | [] [] [] [] |
aegis | () |
ant-phone | () |
anubis | |
ap-utils | |
aspell | [] |
bash | [] [] [] [] |
batchelor | |
bfd | [] [] |
binutils | [] [] |
bison | [] [] [] |
bluez-pin | [] [] [] |
clisp | |
clisp | [] [] [] |
console-tools | [] [] |
coreutils | [] [] [] [] |
cpio | [] [] [] |
darkstat | [] () [] |
diffutils | [] [] [] [] [] [] [] |
e2fsprogs | [] [] [] |
enscript | [] [] [] [] |
error | [] [] [] [] [] |
fetchmail | [] () [] [] [] [] |
fileutils | [] [] [] |
findutils | [] [] [] [] [] [] [] |
flex | [] [] [] [] |
fslint | |
gas | [] |
gawk | [] [] [] [] |
gbiff | [] |
gcal | [] |
gcc | [] [] |
gettext | [] [] [] [] [] |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] [] [] [] |
gettext-tools | [] [] [] |
gimp-print | [] [] [] [] [] |
gliv | |
glunarclock | [] [] |
gnubiff | [] |
gnucash | [] () [] [] |
gnucash-glossary | [] () [] |
gnupg | [] () [] [] [] [] |
gpe-aerial | [] |
gpe-beam | [] [] |
gpe-calendar | [] [] |
gpe-clock | [] [] |
gpe-conf | [] [] |
gpe-contacts | [] [] |
gpe-edit | [] |
gpe-go | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] |
gpe-taskmanager | [] [] |
gpe-timesheet | [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] [] |
gprof | [] [] [] |
gpsdrive | () () () |
gramadoir | [] |
grep | [] [] [] [] [] [] |
gretl | [] |
gtick | [] () |
hello | [] [] [] [] [] [] |
id-utils | [] [] |
indent | [] [] [] [] |
iso_3166 | [] [] [] [] [] [] [] [] [] [] |
iso_3166_1 | [] [] [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | [] |
iso_4217 | [] [] [] [] |
iso_639 | |
jpilot | [] [] [] |
jtag | |
jwhois | [] |
kbd | [] [] [] [] [] |
latrine | () |
ld | [] [] |
libc | [] [] [] [] [] [] |
libgpewidget | [] [] |
libiconv | [] [] [] [] [] |
lifelines | [] () |
lilypond | [] |
lingoteach | |
lingoteach_lessons | () () |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailutils | [] [] |
make | [] [] [] |
man-db | [] () [] [] () |
minicom | [] [] [] |
mysecretdiary | [] [] [] |
nano | [] () [] [] [] |
nano_1_0 | [] () [] [] [] |
opcodes | [] |
parted | [] [] [] [] [] |
ptx | [] [] [] [] [] |
python | |
radius | [] |
recode | [] [] [] [] [] [] [] |
rpm | [] [] |
screem | |
scrollkeeper | [] [] [] [] [] [] |
sed | [] [] [] [] [] [] |
sh-utils | [] [] [] |
shared-mime-info | |
sharutils | [] [] [] [] [] [] |
silky | () |
skencil | [] () [] |
sketch | [] () [] |
soundtracker | [] [] [] |
sp | [] |
tar | [] [] [] [] |
texinfo | [] [] [] |
textutils | [] [] [] [] |
tin | () () |
tp-robot | |
tuxpaint | [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] [] [] |
vorbis-tools | [] [] [] [] |
wastesedge | () |
wdiff | [] [] [] [] |
wget | [] [] [] [] [] [] |
xchat | [] [] [] [] |
xfree86_xkb_xml | [] [] |
xpad | [] |
+----------------------------------------------------+
af am ar az be bg bs ca cs da de el en en_GB eo es
4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
et eu fa fi fr ga gl he hr hu id is it ja ko lg
+-------------------------------------------------+
a2ps | [] [] [] () () |
aegis | |
ant-phone | [] |
anubis | [] |
ap-utils | [] |
aspell | [] [] |
bash | [] [] |
batchelor | [] [] |
bfd | [] |
binutils | [] [] |
bison | [] [] [] [] |
bluez-pin | [] [] [] [] [] |
clisp | |
clisp | [] |
console-tools | |
coreutils | [] [] [] [] [] [] |
cpio | [] [] [] [] |
darkstat | () [] [] [] |
diffutils | [] [] [] [] [] [] [] |
e2fsprogs | |
enscript | [] [] |
error | [] [] [] [] |
fetchmail | [] |
fileutils | [] [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] [] [] [] |
flex | [] [] [] |
fslint | [] |
gas | [] |
gawk | [] [] [] |
gbiff | [] |
gcal | [] |
gcc | [] |
gettext | [] [] [] |
gettext-examples | [] [] |
gettext-runtime | [] [] [] [] [] |
gettext-tools | [] [] [] |
gimp-print | [] [] |
gliv | () |
glunarclock | [] [] [] [] |
gnubiff | [] |
gnucash | () [] |
gnucash-glossary | [] |
gnupg | [] [] [] [] [] [] [] |
gpe-aerial | [] |
gpe-beam | [] |
gpe-calendar | [] [] [] |
gpe-clock | [] |
gpe-conf | [] |
gpe-contacts | [] [] |
gpe-edit | [] [] |
gpe-go | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] [] |
gpe-sketchbook | [] |
gpe-su | [] |
gpe-taskmanager | [] |
gpe-timesheet | [] [] [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] |
gprof | [] [] |
gpsdrive | () () () |
gramadoir | [] [] |
grep | [] [] [] [] [] [] [] [] [] [] [] |
gretl | [] [] |
gtick | [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] [] |
indent | [] [] [] [] [] [] [] [] [] |
iso_3166 | [] [] [] [] [] [] [] |
iso_3166_1 | [] [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | |
iso_4217 | [] [] [] [] [] [] |
iso_639 | |
jpilot | [] () |
jtag | [] |
jwhois | [] [] [] [] |
kbd | [] |
latrine | [] |
ld | [] |
libc | [] [] [] [] [] [] |
libgpewidget | [] [] [] [] |
libiconv | [] [] [] [] [] [] [] [] [] |
lifelines | () |
lilypond | [] |
lingoteach | [] [] |
lingoteach_lessons | |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailutils | |
make | [] [] [] [] [] [] |
man-db | () () |
minicom | [] [] [] [] |
mysecretdiary | [] [] |
nano | [] [] [] [] |
nano_1_0 | [] [] [] [] |
opcodes | [] |
parted | [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
radius | [] |
recode | [] [] [] [] [] [] |
rpm | [] [] |
screem | |
scrollkeeper | [] |
sed | [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] |
shared-mime-info | [] [] [] |
sharutils | [] [] [] [] [] |
silky | () [] () () |
skencil | [] |
sketch | [] |
soundtracker | [] [] |
sp | [] () |
tar | [] [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] |
textutils | [] [] [] [] [] [] |
tin | [] () |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | [] [] |
util-linux | [] [] [] [] () [] |
vorbis-tools | [] |
wastesedge | () |
wdiff | [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] |
xchat | [] [] [] |
xfree86_xkb_xml | [] [] |
xpad | [] [] |
+-------------------------------------------------+
et eu fa fi fr ga gl he hr hu id is it ja ko lg
22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
+-----------------------------------------------------+
a2ps | [] [] () () [] [] [] |
aegis | () () () |
ant-phone | [] [] |
anubis | [] [] [] [] [] [] |
ap-utils | [] () [] |
aspell | [] |
bash | [] [] [] |
batchelor | [] |
bfd | [] |
binutils | [] |
bison | [] [] [] [] [] |
bluez-pin | [] [] [] |
clisp | |
clisp | [] |
console-tools | [] |
coreutils | [] [] |
cpio | [] [] [] [] [] |
darkstat | [] [] [] [] |
diffutils | [] [] [] [] [] [] |
e2fsprogs | [] |
enscript | [] [] [] [] |
error | [] [] [] |
fetchmail | [] [] () [] |
fileutils | [] [] [] |
findutils | [] [] [] [] [] |
flex | [] [] [] [] |
fslint | [] [] |
gas | |
gawk | [] [] [] |
gbiff | [] [] |
gcal | |
gcc | |
gettext | [] [] [] |
gettext-examples | [] [] [] |
gettext-runtime | [] [] [] [] |
gettext-tools | [] [] |
gimp-print | [] |
gliv | [] [] [] |
glunarclock | [] [] [] [] |
gnubiff | [] |
gnucash | [] [] () [] |
gnucash-glossary | [] [] |
gnupg | [] |
gpe-aerial | [] [] [] [] |
gpe-beam | [] [] [] [] |
gpe-calendar | [] [] [] [] |
gpe-clock | [] [] [] [] |
gpe-conf | [] [] [] [] |
gpe-contacts | [] [] [] [] |
gpe-edit | [] [] [] [] |
gpe-go | [] [] [] |
gpe-login | [] [] [] [] |
gpe-ownerinfo | [] [] [] [] |
gpe-sketchbook | [] [] [] [] |
gpe-su | [] [] [] [] |
gpe-taskmanager | [] [] [] [] |
gpe-timesheet | [] [] [] [] |
gpe-today | [] [] [] [] |
gpe-todo | [] [] [] [] |
gphoto2 | [] |
gprof | [] [] |
gpsdrive | () () [] |
gramadoir | () [] |
grep | [] [] [] [] [] |
gretl | |
gtick | [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] [] |
indent | [] [] [] [] |
iso_3166 | [] [] [] |
iso_3166_1 | [] [] |
iso_3166_2 | |
iso_3166_3 | [] |
iso_4217 | [] [] [] [] [] [] [] [] |
iso_639 | [] |
jpilot | () () |
jtag | |
jwhois | [] [] [] [] () |
kbd | [] [] [] |
latrine | [] |
ld | |
libc | [] [] [] [] |
libgpewidget | [] [] [] |
libiconv | [] [] [] [] [] |
lifelines | |
lilypond | |
lingoteach | |
lingoteach_lessons | |
lynx | [] [] [] |
m4 | [] [] [] [] [] |
mailutils | [] [] [] |
make | [] [] [] [] |
man-db | [] |
minicom | [] [] [] [] |
mysecretdiary | [] [] [] |
nano | [] [] [] [] [] |
nano_1_0 | [] [] [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] [] |
ptx | [] [] [] [] [] [] [] [] |
python | |
radius | [] [] |
recode | [] [] [] [] |
rpm | [] [] [] |
screem | |
scrollkeeper | [] [] [] [] [] |
sed | [] [] [] |
sh-utils | [] [] |
shared-mime-info | [] [] |
sharutils | [] [] |
silky | () |
skencil | [] [] |
sketch | [] [] |
soundtracker | |
sp | |
tar | [] [] [] [] [] [] |
texinfo | [] [] [] [] |
textutils | [] [] |
tin | |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] |
vorbis-tools | [] [] [] |
wastesedge | |
wdiff | [] [] [] [] [] |
wget | [] [] [] |
xchat | [] [] [] |
xfree86_xkb_xml | [] [] |
xpad | [] [] |
+-----------------------------------------------------+
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
+-----------------------------------------------------+
a2ps | [] [] [] [] | 16
aegis | | 0
ant-phone | | 3
anubis | [] [] | 9
ap-utils | () | 3
aspell | | 4
bash | | 9
batchelor | | 3
bfd | [] [] | 6
binutils | [] [] [] | 8
bison | [] [] | 14
bluez-pin | [] [] [] | 14
clisp | | 0
clisp | | 5
console-tools | | 3
coreutils | [] [] [] [] | 16
cpio | [] [] | 14
darkstat | [] [] [] () () | 12
diffutils | [] [] [] | 23
e2fsprogs | [] [] | 6
enscript | [] [] | 12
error | [] [] [] | 15
fetchmail | [] [] | 11
fileutils | [] [] [] [] [] | 17
findutils | [] [] [] [] [] [] | 29
flex | [] [] | 13
fslint | | 3
gas | [] | 3
gawk | [] [] | 12
gbiff | | 4
gcal | [] [] | 4
gcc | [] | 4
gettext | [] [] [] [] [] | 16
gettext-examples | [] [] [] [] [] | 14
gettext-runtime | [] [] [] [] [] [] [] [] | 22
gettext-tools | [] [] [] [] [] [] | 14
gimp-print | [] [] | 10
gliv | | 3
glunarclock | [] [] [] | 13
gnubiff | | 3
gnucash | [] [] | 9
gnucash-glossary | [] [] [] | 8
gnupg | [] [] [] [] | 17
gpe-aerial | [] | 7
gpe-beam | [] | 8
gpe-calendar | [] [] [] [] | 13
gpe-clock | [] [] [] | 10
gpe-conf | [] [] | 9
gpe-contacts | [] [] [] | 11
gpe-edit | [] [] [] [] [] | 12
gpe-go | | 5
gpe-login | [] [] [] [] [] | 13
gpe-ownerinfo | [] [] [] [] | 13
gpe-sketchbook | [] [] | 9
gpe-su | [] [] [] | 10
gpe-taskmanager | [] [] [] | 10
gpe-timesheet | [] [] [] [] | 12
gpe-today | [] [] [] [] [] | 13
gpe-todo | [] [] [] [] | 12
gphoto2 | [] [] [] | 11
gprof | [] [] | 9
gpsdrive | [] [] | 3
gramadoir | [] | 5
grep | [] [] [] [] | 26
gretl | | 3
gtick | | 7
hello | [] [] [] [] [] | 34
id-utils | [] [] | 12
indent | [] [] [] [] | 21
iso_3166 | [] [] [] [] [] [] [] | 27
iso_3166_1 | [] [] [] | 16
iso_3166_2 | | 0
iso_3166_3 | | 2
iso_4217 | [] [] [] [] [] [] | 24
iso_639 | | 1
jpilot | [] [] [] [] [] | 9
jtag | [] | 2
jwhois | () [] [] | 11
kbd | [] [] | 11
latrine | | 2
ld | [] [] | 5
libc | [] [] [] [] | 20
libgpewidget | [] [] [] [] | 13
libiconv | [] [] [] [] [] [] [] [] | 27
lifelines | [] | 2
lilypond | [] | 3
lingoteach | | 2
lingoteach_lessons | () | 0
lynx | [] [] [] | 14
m4 | [] [] | 15
mailutils | | 5
make | [] [] [] | 16
man-db | [] | 5
minicom | | 11
mysecretdiary | [] [] | 10
nano | [] [] [] [] | 17
nano_1_0 | [] [] [] | 17
opcodes | [] [] | 6
parted | [] [] [] | 15
ptx | [] [] | 22
python | | 0
radius | | 4
recode | [] [] [] | 20
rpm | [] [] | 9
screem | [] [] | 2
scrollkeeper | [] [] [] | 15
sed | [] [] [] [] [] [] | 24
sh-utils | [] [] | 14
shared-mime-info | [] [] | 7
sharutils | [] [] [] [] | 17
silky | () | 3
skencil | [] | 6
sketch | [] | 6
soundtracker | [] [] | 7
sp | [] | 3
tar | [] [] [] [] [] | 24
texinfo | [] [] [] | 14
textutils | [] [] [] [] | 16
tin | | 1
tp-robot | | 2
tuxpaint | [] [] [] [] [] | 29
unicode-han-tra... | | 0
unicode-transla... | | 2
util-linux | [] [] | 15
vorbis-tools | | 8
wastesedge | | 0
wdiff | [] [] [] | 18
wget | [] [] [] [] [] [] [] [] | 24
xchat | [] [] [] [] [] | 15
xfree86_xkb_xml | [] [] [] [] [] | 11
xpad | | 5
+-----------------------------------------------------+
63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If January 2004 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
the use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.
calcurse-4.2.1/contrib/ 0000755 0001750 0001750 00000000000 13005352607 011761 5 0000000 0000000 calcurse-4.2.1/contrib/caldav/ 0000755 0001750 0001750 00000000000 13005352607 013213 5 0000000 0000000 calcurse-4.2.1/contrib/caldav/README 0000644 0001750 0001750 00000005055 12731203344 014016 0000000 0000000 calcurse-caldav
===============
calcurse-caldav is a simple Python script that can be used to synchronize
calcurse with a CalDAV server. Please note that the script is alpha software!
This means that:
* We are eagerly looking for testers to run the script and give feedback! If
you find any bugs, please report them to the calcurse mailing lists or to the
GitHub bug tracker. If the script works fine for you, please report back as
well!
* The script might still have bugs. MAKE BACKUPS, especially before running
calcurse-caldav for the first time!
Usage
-----
calcurse-caldav requires an up-to-date version of calcurse and a configuration
file located at ~/.calcurse/caldav/config. An example configuration file can be
found under contrib/caldav/config.sample in the calcurse source tree.
If you run calcurse-caldav for the first time, you need to provide the --init
argument. You can choose between the following initialization modes:
--init=keep-remote Remove all local calcurse items and import remote objects
--init=keep-local Remove all remote objects and push local calcurse items
--init=two-way Copy local objects to the CalDAV server and vice versa
For subsequent calcurse-caldav invocations, you don't need to specify any
additional parameters.
Hooks
-----
You can place scripts in `$HOME/.calcurse/caldav/hooks/` to trigger actions at
certain events. To enable a hook, add a script with one of the following names
to this directory. Also make sure the scripts are executable.
*pre-sync*::
Executed before the data files are synchronized.
*post-sync*::
Executed after the data files are synchronized.
Some examples can be found in the `contrib/caldav/hooks/` directory of the
calcurse source tree.
How It Works
------------
calcurse-caldav creates a so-called synchronization database at
~/.calcurse/caldav/sync.db that always keeps a snapshot of the last time the
script was executed. When running the script, it compares the objects on the
server and the local objects with that snapshot to identify items that were
added or deleted. It then
* downloads new objects from the server and imports them into calcurse,
* deletes local objects that no longer exist on the server,
* uploads objects to the server that were added locally,
* deleted objects from the server that were deleted locally,
* updates the synchronization database with a new snapshot.
Note: Since calcurse does not use unique identifiers for items, it cannot keep
track of moved/edited items. Thus, modifying an item is equivalent to deleting
the old item and creating a new one.
calcurse-4.2.1/contrib/caldav/calcurse-caldav.py 0000755 0001750 0001750 00000042055 12731203344 016545 0000000 0000000 #!/usr/bin/python3
import argparse
import base64
import configparser
import http.client
import os
import re
import ssl
import subprocess
import sys
import textwrap
import xml.etree.ElementTree as etree
def msgfmt(msg, prefix=''):
lines = []
for line in msg.splitlines():
lines += textwrap.wrap(line, 80 - len(prefix))
return '\n'.join([prefix + line for line in lines])
def warn(msg):
print(msgfmt(msg, "warning: "))
def die(msg):
sys.exit(msgfmt(msg, "error: "))
def die_atnode(msg, node):
if debug:
msg += '\n\n'
msg += 'The error occurred while processing the following XML node:\n'
msg += etree.tostring(node).decode('utf-8')
die(msg)
def calcurse_wipe():
if verbose:
print('Removing all local calcurse objects...')
if dry_run:
return
subprocess.call([calcurse, '-F', '--filter-hash=XXX'])
def calcurse_import(icaldata):
p = subprocess.Popen([calcurse, '-i', '-', '--dump-imported', '-q',
'--format-recur-apt=%(hash)\\n',
'--format-event=%(hash)\\n',
'--format-recur-event=%(hash)\\n',
'--format-todo=%(hash)\\n'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
return p.communicate(icaldata.encode('utf-8'))[0].decode('utf-8').rstrip()
def calcurse_export(objhash):
p = subprocess.Popen([calcurse, '-x', 'ical', '--export-uid',
'--filter-hash=' + objhash], stdout=subprocess.PIPE)
return p.communicate()[0].decode('utf-8').rstrip()
def calcurse_hashset():
p = subprocess.Popen([calcurse, '-G', '--format-apt=%(hash)\\n',
'--format-recur-apt=%(hash)\\n',
'--format-event=%(hash)\\n',
'--format-recur-event=%(hash)\\n',
'--format-todo=%(hash)\\n'], stdout=subprocess.PIPE)
return set(p.communicate()[0].decode('utf-8').rstrip().splitlines())
def calcurse_remove(objhash):
subprocess.call([calcurse, '-F', '--filter-hash=!' + objhash])
def calcurse_version():
p = subprocess.Popen([calcurse, '--version'], stdout=subprocess.PIPE)
m = re.match(r'calcurse ([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9]+)-)?',
p.communicate()[0].decode('utf-8'))
if not m:
return None
return tuple([int(group) for group in m.groups(0)])
def get_auth_headers():
if not username or not password:
return {}
user_password = ('{}:{}'.format(username, password)).encode('ascii')
user_password = base64.b64encode(user_password).decode('ascii')
headers = {'Authorization': 'Basic {}'.format(user_password)}
return headers
def remote_query(conn, cmd, path, additional_headers, body):
headers = custom_headers.copy()
headers.update(get_auth_headers())
if cmd == 'PUT':
headers['Content-Type'] = 'text/calendar; charset=utf-8'
else:
headers['Content-Type'] = 'application/xml; charset=utf-8'
headers.update(additional_headers)
if debug:
print("> {} {}".format(cmd, path))
print("> Headers: " + repr(headers))
if body:
for line in body.splitlines():
print("> " + line)
print()
if isinstance(body, str):
body = body.encode('utf-8')
conn.request(cmd, path, headers=headers, body=body)
resp = conn.getresponse()
if not resp:
return (None, None)
headers = resp.getheaders()
body = resp.read().decode('utf-8')
if debug:
print("< Headers: " + repr(headers))
for line in body.splitlines():
print("< " + line)
print()
if resp.status - (resp.status % 100) != 200:
die(("The server at {} replied with HTTP status code {} ({}) " +
"while trying to access {}.").format(hostname, resp.status,
resp.reason, path))
return (headers, body)
def get_etags(conn, hrefs=[]):
if len(hrefs) > 0:
body = (''
''
'')
for href in hrefs:
body += '{}'.format(href)
body += ''
else:
body = (''
''
''
''
'')
headers, body = remote_query(conn, "REPORT", path, {}, body)
if not headers:
return {}
root = etree.fromstring(body)
etagdict = {}
for node in root.findall(".//D:response", namespaces=nsmap):
etagnode = node.find("./D:propstat/D:prop/D:getetag", namespaces=nsmap)
if etagnode is None:
die_atnode('Missing ETag.', node)
etag = etagnode.text.strip('"')
hrefnode = node.find("./D:href", namespaces=nsmap)
if hrefnode is None:
die_atnode('Missing href.', node)
href = hrefnode.text
etagdict[href] = etag
return etagdict
def remote_wipe(conn):
if verbose:
print('Removing all objects from the CalDAV server...')
if dry_run:
return
remote_query(conn, "DELETE", path, {}, None)
def get_syncdb(fn):
if not os.path.exists(fn):
return {}
if verbose:
print('Loading synchronization database from ' + fn + '...')
syncdb = {}
with open(fn, 'r') as f:
for line in f.readlines():
href, etag, objhash = line.rstrip().split(' ')
syncdb[href] = (etag, objhash)
return syncdb
def save_syncdb(fn, syncdb):
if verbose:
print('Saving synchronization database to ' + fn + '...')
if dry_run:
return
with open(fn, 'w') as f:
for href, (etag, objhash) in syncdb.items():
print("{} {} {}".format(href, etag, objhash), file=f)
def push_object(conn, objhash):
href = path + objhash + ".ics"
body = calcurse_export(objhash)
headers, body = remote_query(conn, "PUT", href, {}, body)
if not headers:
return None
etag = None
headerdict = dict((key.lower(), value) for key, value in headers)
if 'etag' in headerdict:
etag = headerdict['etag']
while not etag:
etagdict = get_etags(conn, [href])
if etagdict:
etag = next(iter(etagdict.values()))
etag = etag.strip('"')
return (href, etag)
def remove_remote_object(conn, etag, href):
headers = {'If-Match': '"' + etag + '"'}
remote_query(conn, "DELETE", href, headers, None)
def push_objects(conn, syncdb, etagdict):
objhashes = calcurse_hashset()
new = objhashes - set([entry[1] for entry in syncdb.values()])
gone = set([entry[1] for entry in syncdb.values()]) - objhashes
added = deleted = 0
# Copy new objects to the server.
for objhash in new:
if verbose:
print("Pushing new object {} to the server.".format(objhash))
if dry_run:
continue
href, etag = push_object(conn, objhash)
syncdb[href] = (etag, objhash)
added += 1
# Remove locally deleted objects from the server.
for objhash in gone:
queue = []
for href, entry in syncdb.items():
if entry[1] == objhash:
queue.append(href)
for href in queue:
etag = syncdb[href][0]
if etagdict[href] != etag:
warn(('{} was deleted locally but modified in the CalDAV '
'calendar. Keeping the modified version on the server. '
'Run the script again to import the modified '
'object.').format(objhash))
syncdb.pop(href, None)
continue
if verbose:
print("Removing remote object {} ({}).".format(etag, href))
if dry_run:
continue
remove_remote_object(conn, etag, href)
syncdb.pop(href, None)
deleted += 1
return (added, deleted)
def pull_objects(conn, syncdb, etagdict):
missing = set()
modified = set()
for href in set(etagdict.keys()):
if href not in syncdb:
missing.add(href)
elif etagdict[href] != syncdb[href][0]:
modified.add(href)
orphan = set(syncdb.keys()) - set(etagdict.keys())
# Download and import new objects from the server.
body = (''
''
'')
for href in (missing | modified):
body += '{}'.format(href)
body += ''
headers, body = remote_query(conn, "REPORT", path, {}, body)
root = etree.fromstring(body)
added = deleted = 0
for node in root.findall(".//D:response", namespaces=nsmap):
hrefnode = node.find("./D:href", namespaces=nsmap)
if hrefnode is None:
die_atnode('Missing href.', node)
href = hrefnode.text
etagnode = node.find("./D:propstat/D:prop/D:getetag", namespaces=nsmap)
if etagnode is None:
die_atnode('Missing ETag.', node)
etag = etagnode.text.strip('"')
cdatanode = node.find("./D:propstat/D:prop/C:calendar-data",
namespaces=nsmap)
if cdatanode is None:
die_atnode('Missing calendar data.', node)
cdata = cdatanode.text
if href in modified:
if verbose:
print("Replacing object {}.".format(etag))
if dry_run:
continue
objhash = syncdb[href][1]
calcurse_remove(objhash)
else:
if verbose:
print("Importing new object {}.".format(etag))
if dry_run:
continue
objhash = calcurse_import(cdata)
syncdb[href] = (etag, objhash)
added += 1
# Delete objects that no longer exist on the server.
for href in orphan:
etag, objhash = syncdb[href]
if verbose:
print("Removing local object {}.".format(objhash))
if dry_run:
continue
calcurse_remove(objhash)
syncdb.pop(href, None)
deleted += 1
return (added, deleted)
def run_hook(name):
hook_path = hookdir + '/' + name
if not os.path.exists(hook_path):
return
subprocess.call(hook_path, shell=True)
# Initialize the XML namespace map.
nsmap = {"D": "DAV:", "C": "urn:ietf:params:xml:ns:caldav"}
# Initialize default values.
configfn = os.path.expanduser("~/.calcurse/caldav/config")
lockfn = os.path.expanduser("~/.calcurse/caldav/lock")
syncdbfn = os.path.expanduser("~/.calcurse/caldav/sync.db")
hookdir = os.path.expanduser("~/.calcurse/caldav/hooks/")
# Parse command line arguments.
parser = argparse.ArgumentParser('calcurse-caldav')
parser.add_argument('--init', action='store', dest='init', default=None,
choices=['keep-remote', 'keep-local', 'two-way'],
help='initialize the sync database')
parser.add_argument('--config', action='store', dest='configfn',
default=configfn,
help='path to the calcurse-caldav configuration')
parser.add_argument('--lockfile', action='store', dest='lockfn',
default=lockfn,
help='path to the calcurse-caldav lock file')
parser.add_argument('--syncdb', action='store', dest='syncdbfn',
default=syncdbfn,
help='path to the calcurse-caldav sync DB')
parser.add_argument('--hookdir', action='store', dest='hookdir',
default=hookdir,
help='path to the calcurse-caldav hooks directory')
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
default=False,
help='print status messages to stdout')
parser.add_argument('--debug', action='store_true', dest='debug',
default=False, help='print debug messages to stdout')
args = parser.parse_args()
init = args.init is not None
configfn = args.configfn
lockfn = args.lockfn
syncdbfn = args.syncdbfn
hookdir = args.hookdir
verbose = args.verbose
debug = args.debug
# Read configuration.
config = configparser.RawConfigParser()
if verbose:
print('Loading configuration from ' + configfn + '...')
try:
config.readfp(open(configfn))
except FileNotFoundError as e:
die('Configuration file not found: {}'.format(configfn))
hostname = config.get('General', 'HostName')
path = '/' + config.get('General', 'Path').strip('/') + '/'
if config.has_option('General', 'InsecureSSL'):
insecure_ssl = config.getboolean('General', 'InsecureSSL')
else:
insecure_ssl = False
if config.has_option('General', 'Binary'):
calcurse = config.get('General', 'Binary')
else:
calcurse = 'calcurse'
if config.has_option('General', 'DryRun'):
dry_run = config.getboolean('General', 'DryRun')
else:
dry_run = True
if not verbose and config.has_option('General', 'Verbose'):
verbose = config.getboolean('General', 'Verbose')
if not debug and config.has_option('General', 'Debug'):
debug = config.getboolean('General', 'Debug')
if config.has_option('Auth', 'UserName'):
username = config.get('Auth', 'UserName')
else:
username = None
if config.has_option('Auth', 'Password'):
password = config.get('Auth', 'Password')
else:
password = None
if config.has_section('CustomHeaders'):
custom_headers = dict(config.items('CustomHeaders'))
else:
custom_headers = {}
# Show disclaimer when performing a dry run.
if dry_run:
warn(('Dry run; nothing is imported/exported. Add "DryRun = No" to the '
'[General] section in the configuration file to enable '
'synchronization.'))
# Check whether the specified calcurse binary is executable and compatible.
ver = calcurse_version()
if ver is None:
die('Invalid calcurse binary. Make sure that the file specified in ' +
'the configuration is a valid and up-to-date calcurse binary.')
elif ver < (4, 0, 0, 96):
die('Incompatible calcurse binary detected. Version >=4.1.0 is required ' +
'to synchronize with CalDAV servers.')
# Run the pre-sync hook.
run_hook('pre-sync')
# Create lock file.
if os.path.exists(lockfn):
die('Leftover lock file detected. If there is no other synchronization ' +
'instance running, please remove the lock file manually and try ' +
'again.')
open(lockfn, 'w')
try:
# Connect to the server via HTTPs.
if verbose:
print('Connecting to ' + hostname + '...')
if insecure_ssl:
try:
context = ssl._create_unverified_context()
conn = http.client.HTTPSConnection(hostname, context=context)
except AttributeError:
# Python versions prior to 3.4.3 do not support
# ssl._create_unverified_context(). However, these versions do not
# seem to verify certificates by default so we can simply fall back
# to http.client.HTTPSConnection().
conn = http.client.HTTPSConnection(hostname)
else:
conn = http.client.HTTPSConnection(hostname)
if init:
# In initialization mode, start with an empty synchronization database.
if args.init == 'keep-remote':
calcurse_wipe()
elif args.init == 'keep-local':
remote_wipe(conn)
syncdb = {}
else:
# Read the synchronization database.
syncdb = get_syncdb(syncdbfn)
if not syncdb:
die('Sync database not found or empty. Please initialize the ' +
'database first.\n\nSupported initialization modes are:\n' +
' --init=keep-remote Remove all local calcurse items\n' +
' --init=keep-local Remove all remote objects\n' +
' --init=two-way Copy local items to the server and vice versa')
# Query the server and build a dictionary that maps ETags to paths on the
# server.
etagdict = get_etags(conn)
# Retrieve new objects from the server, delete local items that no longer
# exist on the server.
local_new, local_del = pull_objects(conn, syncdb, etagdict)
# Push new objects to the server, remove items from the server if they no
# longer exist locally.
remote_new, remote_del = push_objects(conn, syncdb, etagdict)
# Write the synchronization database.
save_syncdb(syncdbfn, syncdb)
# Close the HTTPs connection.
conn.close()
finally:
# Remove lock file.
os.remove(lockfn)
# Run the post-sync hook.
run_hook('post-sync')
# Print a summary to stdout.
print("{} items imported, {} items removed locally.".
format(local_new, local_del))
print("{} items exported, {} items removed from the server.".
format(remote_new, remote_del))
calcurse-4.2.1/contrib/caldav/Makefile.am 0000644 0001750 0001750 00000000304 12731203344 015162 0000000 0000000 AUTOMAKE_OPTIONS = foreign
dist_bin_SCRIPTS = \
calcurse-caldav
EXTRA_DIST = \
calcurse-caldav.py
CLEANFILES = \
calcurse-caldav
calcurse-caldav: calcurse-caldav.py
cp "$(srcdir)/$<" "$@"
calcurse-4.2.1/contrib/caldav/calcurse-caldav 0000755 0001750 0001750 00000042055 13005352607 016120 0000000 0000000 #!/usr/bin/python3
import argparse
import base64
import configparser
import http.client
import os
import re
import ssl
import subprocess
import sys
import textwrap
import xml.etree.ElementTree as etree
def msgfmt(msg, prefix=''):
lines = []
for line in msg.splitlines():
lines += textwrap.wrap(line, 80 - len(prefix))
return '\n'.join([prefix + line for line in lines])
def warn(msg):
print(msgfmt(msg, "warning: "))
def die(msg):
sys.exit(msgfmt(msg, "error: "))
def die_atnode(msg, node):
if debug:
msg += '\n\n'
msg += 'The error occurred while processing the following XML node:\n'
msg += etree.tostring(node).decode('utf-8')
die(msg)
def calcurse_wipe():
if verbose:
print('Removing all local calcurse objects...')
if dry_run:
return
subprocess.call([calcurse, '-F', '--filter-hash=XXX'])
def calcurse_import(icaldata):
p = subprocess.Popen([calcurse, '-i', '-', '--dump-imported', '-q',
'--format-recur-apt=%(hash)\\n',
'--format-event=%(hash)\\n',
'--format-recur-event=%(hash)\\n',
'--format-todo=%(hash)\\n'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
return p.communicate(icaldata.encode('utf-8'))[0].decode('utf-8').rstrip()
def calcurse_export(objhash):
p = subprocess.Popen([calcurse, '-x', 'ical', '--export-uid',
'--filter-hash=' + objhash], stdout=subprocess.PIPE)
return p.communicate()[0].decode('utf-8').rstrip()
def calcurse_hashset():
p = subprocess.Popen([calcurse, '-G', '--format-apt=%(hash)\\n',
'--format-recur-apt=%(hash)\\n',
'--format-event=%(hash)\\n',
'--format-recur-event=%(hash)\\n',
'--format-todo=%(hash)\\n'], stdout=subprocess.PIPE)
return set(p.communicate()[0].decode('utf-8').rstrip().splitlines())
def calcurse_remove(objhash):
subprocess.call([calcurse, '-F', '--filter-hash=!' + objhash])
def calcurse_version():
p = subprocess.Popen([calcurse, '--version'], stdout=subprocess.PIPE)
m = re.match(r'calcurse ([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9]+)-)?',
p.communicate()[0].decode('utf-8'))
if not m:
return None
return tuple([int(group) for group in m.groups(0)])
def get_auth_headers():
if not username or not password:
return {}
user_password = ('{}:{}'.format(username, password)).encode('ascii')
user_password = base64.b64encode(user_password).decode('ascii')
headers = {'Authorization': 'Basic {}'.format(user_password)}
return headers
def remote_query(conn, cmd, path, additional_headers, body):
headers = custom_headers.copy()
headers.update(get_auth_headers())
if cmd == 'PUT':
headers['Content-Type'] = 'text/calendar; charset=utf-8'
else:
headers['Content-Type'] = 'application/xml; charset=utf-8'
headers.update(additional_headers)
if debug:
print("> {} {}".format(cmd, path))
print("> Headers: " + repr(headers))
if body:
for line in body.splitlines():
print("> " + line)
print()
if isinstance(body, str):
body = body.encode('utf-8')
conn.request(cmd, path, headers=headers, body=body)
resp = conn.getresponse()
if not resp:
return (None, None)
headers = resp.getheaders()
body = resp.read().decode('utf-8')
if debug:
print("< Headers: " + repr(headers))
for line in body.splitlines():
print("< " + line)
print()
if resp.status - (resp.status % 100) != 200:
die(("The server at {} replied with HTTP status code {} ({}) " +
"while trying to access {}.").format(hostname, resp.status,
resp.reason, path))
return (headers, body)
def get_etags(conn, hrefs=[]):
if len(hrefs) > 0:
body = (''
''
'')
for href in hrefs:
body += '{}'.format(href)
body += ''
else:
body = (''
''
''
''
'')
headers, body = remote_query(conn, "REPORT", path, {}, body)
if not headers:
return {}
root = etree.fromstring(body)
etagdict = {}
for node in root.findall(".//D:response", namespaces=nsmap):
etagnode = node.find("./D:propstat/D:prop/D:getetag", namespaces=nsmap)
if etagnode is None:
die_atnode('Missing ETag.', node)
etag = etagnode.text.strip('"')
hrefnode = node.find("./D:href", namespaces=nsmap)
if hrefnode is None:
die_atnode('Missing href.', node)
href = hrefnode.text
etagdict[href] = etag
return etagdict
def remote_wipe(conn):
if verbose:
print('Removing all objects from the CalDAV server...')
if dry_run:
return
remote_query(conn, "DELETE", path, {}, None)
def get_syncdb(fn):
if not os.path.exists(fn):
return {}
if verbose:
print('Loading synchronization database from ' + fn + '...')
syncdb = {}
with open(fn, 'r') as f:
for line in f.readlines():
href, etag, objhash = line.rstrip().split(' ')
syncdb[href] = (etag, objhash)
return syncdb
def save_syncdb(fn, syncdb):
if verbose:
print('Saving synchronization database to ' + fn + '...')
if dry_run:
return
with open(fn, 'w') as f:
for href, (etag, objhash) in syncdb.items():
print("{} {} {}".format(href, etag, objhash), file=f)
def push_object(conn, objhash):
href = path + objhash + ".ics"
body = calcurse_export(objhash)
headers, body = remote_query(conn, "PUT", href, {}, body)
if not headers:
return None
etag = None
headerdict = dict((key.lower(), value) for key, value in headers)
if 'etag' in headerdict:
etag = headerdict['etag']
while not etag:
etagdict = get_etags(conn, [href])
if etagdict:
etag = next(iter(etagdict.values()))
etag = etag.strip('"')
return (href, etag)
def remove_remote_object(conn, etag, href):
headers = {'If-Match': '"' + etag + '"'}
remote_query(conn, "DELETE", href, headers, None)
def push_objects(conn, syncdb, etagdict):
objhashes = calcurse_hashset()
new = objhashes - set([entry[1] for entry in syncdb.values()])
gone = set([entry[1] for entry in syncdb.values()]) - objhashes
added = deleted = 0
# Copy new objects to the server.
for objhash in new:
if verbose:
print("Pushing new object {} to the server.".format(objhash))
if dry_run:
continue
href, etag = push_object(conn, objhash)
syncdb[href] = (etag, objhash)
added += 1
# Remove locally deleted objects from the server.
for objhash in gone:
queue = []
for href, entry in syncdb.items():
if entry[1] == objhash:
queue.append(href)
for href in queue:
etag = syncdb[href][0]
if etagdict[href] != etag:
warn(('{} was deleted locally but modified in the CalDAV '
'calendar. Keeping the modified version on the server. '
'Run the script again to import the modified '
'object.').format(objhash))
syncdb.pop(href, None)
continue
if verbose:
print("Removing remote object {} ({}).".format(etag, href))
if dry_run:
continue
remove_remote_object(conn, etag, href)
syncdb.pop(href, None)
deleted += 1
return (added, deleted)
def pull_objects(conn, syncdb, etagdict):
missing = set()
modified = set()
for href in set(etagdict.keys()):
if href not in syncdb:
missing.add(href)
elif etagdict[href] != syncdb[href][0]:
modified.add(href)
orphan = set(syncdb.keys()) - set(etagdict.keys())
# Download and import new objects from the server.
body = (''
''
'')
for href in (missing | modified):
body += '{}'.format(href)
body += ''
headers, body = remote_query(conn, "REPORT", path, {}, body)
root = etree.fromstring(body)
added = deleted = 0
for node in root.findall(".//D:response", namespaces=nsmap):
hrefnode = node.find("./D:href", namespaces=nsmap)
if hrefnode is None:
die_atnode('Missing href.', node)
href = hrefnode.text
etagnode = node.find("./D:propstat/D:prop/D:getetag", namespaces=nsmap)
if etagnode is None:
die_atnode('Missing ETag.', node)
etag = etagnode.text.strip('"')
cdatanode = node.find("./D:propstat/D:prop/C:calendar-data",
namespaces=nsmap)
if cdatanode is None:
die_atnode('Missing calendar data.', node)
cdata = cdatanode.text
if href in modified:
if verbose:
print("Replacing object {}.".format(etag))
if dry_run:
continue
objhash = syncdb[href][1]
calcurse_remove(objhash)
else:
if verbose:
print("Importing new object {}.".format(etag))
if dry_run:
continue
objhash = calcurse_import(cdata)
syncdb[href] = (etag, objhash)
added += 1
# Delete objects that no longer exist on the server.
for href in orphan:
etag, objhash = syncdb[href]
if verbose:
print("Removing local object {}.".format(objhash))
if dry_run:
continue
calcurse_remove(objhash)
syncdb.pop(href, None)
deleted += 1
return (added, deleted)
def run_hook(name):
hook_path = hookdir + '/' + name
if not os.path.exists(hook_path):
return
subprocess.call(hook_path, shell=True)
# Initialize the XML namespace map.
nsmap = {"D": "DAV:", "C": "urn:ietf:params:xml:ns:caldav"}
# Initialize default values.
configfn = os.path.expanduser("~/.calcurse/caldav/config")
lockfn = os.path.expanduser("~/.calcurse/caldav/lock")
syncdbfn = os.path.expanduser("~/.calcurse/caldav/sync.db")
hookdir = os.path.expanduser("~/.calcurse/caldav/hooks/")
# Parse command line arguments.
parser = argparse.ArgumentParser('calcurse-caldav')
parser.add_argument('--init', action='store', dest='init', default=None,
choices=['keep-remote', 'keep-local', 'two-way'],
help='initialize the sync database')
parser.add_argument('--config', action='store', dest='configfn',
default=configfn,
help='path to the calcurse-caldav configuration')
parser.add_argument('--lockfile', action='store', dest='lockfn',
default=lockfn,
help='path to the calcurse-caldav lock file')
parser.add_argument('--syncdb', action='store', dest='syncdbfn',
default=syncdbfn,
help='path to the calcurse-caldav sync DB')
parser.add_argument('--hookdir', action='store', dest='hookdir',
default=hookdir,
help='path to the calcurse-caldav hooks directory')
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
default=False,
help='print status messages to stdout')
parser.add_argument('--debug', action='store_true', dest='debug',
default=False, help='print debug messages to stdout')
args = parser.parse_args()
init = args.init is not None
configfn = args.configfn
lockfn = args.lockfn
syncdbfn = args.syncdbfn
hookdir = args.hookdir
verbose = args.verbose
debug = args.debug
# Read configuration.
config = configparser.RawConfigParser()
if verbose:
print('Loading configuration from ' + configfn + '...')
try:
config.readfp(open(configfn))
except FileNotFoundError as e:
die('Configuration file not found: {}'.format(configfn))
hostname = config.get('General', 'HostName')
path = '/' + config.get('General', 'Path').strip('/') + '/'
if config.has_option('General', 'InsecureSSL'):
insecure_ssl = config.getboolean('General', 'InsecureSSL')
else:
insecure_ssl = False
if config.has_option('General', 'Binary'):
calcurse = config.get('General', 'Binary')
else:
calcurse = 'calcurse'
if config.has_option('General', 'DryRun'):
dry_run = config.getboolean('General', 'DryRun')
else:
dry_run = True
if not verbose and config.has_option('General', 'Verbose'):
verbose = config.getboolean('General', 'Verbose')
if not debug and config.has_option('General', 'Debug'):
debug = config.getboolean('General', 'Debug')
if config.has_option('Auth', 'UserName'):
username = config.get('Auth', 'UserName')
else:
username = None
if config.has_option('Auth', 'Password'):
password = config.get('Auth', 'Password')
else:
password = None
if config.has_section('CustomHeaders'):
custom_headers = dict(config.items('CustomHeaders'))
else:
custom_headers = {}
# Show disclaimer when performing a dry run.
if dry_run:
warn(('Dry run; nothing is imported/exported. Add "DryRun = No" to the '
'[General] section in the configuration file to enable '
'synchronization.'))
# Check whether the specified calcurse binary is executable and compatible.
ver = calcurse_version()
if ver is None:
die('Invalid calcurse binary. Make sure that the file specified in ' +
'the configuration is a valid and up-to-date calcurse binary.')
elif ver < (4, 0, 0, 96):
die('Incompatible calcurse binary detected. Version >=4.1.0 is required ' +
'to synchronize with CalDAV servers.')
# Run the pre-sync hook.
run_hook('pre-sync')
# Create lock file.
if os.path.exists(lockfn):
die('Leftover lock file detected. If there is no other synchronization ' +
'instance running, please remove the lock file manually and try ' +
'again.')
open(lockfn, 'w')
try:
# Connect to the server via HTTPs.
if verbose:
print('Connecting to ' + hostname + '...')
if insecure_ssl:
try:
context = ssl._create_unverified_context()
conn = http.client.HTTPSConnection(hostname, context=context)
except AttributeError:
# Python versions prior to 3.4.3 do not support
# ssl._create_unverified_context(). However, these versions do not
# seem to verify certificates by default so we can simply fall back
# to http.client.HTTPSConnection().
conn = http.client.HTTPSConnection(hostname)
else:
conn = http.client.HTTPSConnection(hostname)
if init:
# In initialization mode, start with an empty synchronization database.
if args.init == 'keep-remote':
calcurse_wipe()
elif args.init == 'keep-local':
remote_wipe(conn)
syncdb = {}
else:
# Read the synchronization database.
syncdb = get_syncdb(syncdbfn)
if not syncdb:
die('Sync database not found or empty. Please initialize the ' +
'database first.\n\nSupported initialization modes are:\n' +
' --init=keep-remote Remove all local calcurse items\n' +
' --init=keep-local Remove all remote objects\n' +
' --init=two-way Copy local items to the server and vice versa')
# Query the server and build a dictionary that maps ETags to paths on the
# server.
etagdict = get_etags(conn)
# Retrieve new objects from the server, delete local items that no longer
# exist on the server.
local_new, local_del = pull_objects(conn, syncdb, etagdict)
# Push new objects to the server, remove items from the server if they no
# longer exist locally.
remote_new, remote_del = push_objects(conn, syncdb, etagdict)
# Write the synchronization database.
save_syncdb(syncdbfn, syncdb)
# Close the HTTPs connection.
conn.close()
finally:
# Remove lock file.
os.remove(lockfn)
# Run the post-sync hook.
run_hook('post-sync')
# Print a summary to stdout.
print("{} items imported, {} items removed locally.".
format(local_new, local_del))
print("{} items exported, {} items removed from the server.".
format(remote_new, remote_del))
calcurse-4.2.1/contrib/caldav/Makefile.in 0000644 0001750 0001750 00000035207 13005352576 015214 0000000 0000000 # Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/caldav
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
$(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(bindir)"
SCRIPTS = $(dist_bin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \
README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
A2X = @A2X@
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
dist_bin_SCRIPTS = \
calcurse-caldav
EXTRA_DIST = \
calcurse-caldav.py
CLEANFILES = \
calcurse-caldav
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/caldav/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/caldav/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-dist_binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-dist_binSCRIPTS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-dist_binSCRIPTS
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
ctags-am distclean distclean-generic distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dist_binSCRIPTS install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-dist_binSCRIPTS
.PRECIOUS: Makefile
calcurse-caldav: calcurse-caldav.py
cp "$(srcdir)/$<" "$@"
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
calcurse-4.2.1/scripts/ 0000755 0001750 0001750 00000000000 13005352607 012010 5 0000000 0000000 calcurse-4.2.1/scripts/Makefile.am 0000644 0001750 0001750 00000000551 12675732512 013776 0000000 0000000 AUTOMAKE_OPTIONS = foreign
dist_bin_SCRIPTS = \
calcurse-upgrade
EXTRA_DIST = \
calcurse-upgrade.sh.in
CLEANFILES = \
calcurse-upgrade
edit = sed \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g'
calcurse-upgrade: calcurse-upgrade.sh.in
$(AM_V_at)$(RM) "$@"
$(AM_V_GEN)$(edit) <"$(srcdir)/$<" >"$@"
$(AM_V_at)chmod +x "$@"
$(AM_V_at)chmod a-w "$@"
calcurse-4.2.1/scripts/Makefile.in 0000644 0001750 0001750 00000035415 13005352576 014012 0000000 0000000 # Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = scripts
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
$(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(bindir)"
SCRIPTS = $(dist_bin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
A2X = @A2X@
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
dist_bin_SCRIPTS = \
calcurse-upgrade
EXTRA_DIST = \
calcurse-upgrade.sh.in
CLEANFILES = \
calcurse-upgrade
edit = sed \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g'
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign scripts/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-dist_binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-dist_binSCRIPTS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-dist_binSCRIPTS
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
ctags-am distclean distclean-generic distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dist_binSCRIPTS install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-dist_binSCRIPTS
.PRECIOUS: Makefile
calcurse-upgrade: calcurse-upgrade.sh.in
$(AM_V_at)$(RM) "$@"
$(AM_V_GEN)$(edit) <"$(srcdir)/$<" >"$@"
$(AM_V_at)chmod +x "$@"
$(AM_V_at)chmod a-w "$@"
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
calcurse-4.2.1/scripts/calcurse-upgrade.sh.in 0000644 0001750 0001750 00000012664 12731203344 016126 0000000 0000000 #!/bin/sh
export TEXTDOMAIN='calcurse'
set -e
CONFFILE=$HOME/.calcurse/conf
if [ "$#" -gt 0 ]; then
if [ "$1" = "--config" ]; then
CONFFILE=$2
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "calcurse-upgrade @PACKAGE_VERSION@"
echo "$(gettext "Usage: calcurse-upgrade [-h|-v|--config ]")"
elif [ "$1" = "-v" -o "$1" = "--version" ]; then
echo "calcurse-upgrade @PACKAGE_VERSION@"
echo "$(gettext "
Copyright (c) 2004-2016 calcurse Development Team.
This is free software; see the source for copying conditions.
")"
else
echo "$(gettext "unrecognized option:") \"$1\"" >&2
exit 1
fi
fi
if [ ! -e "$CONFFILE" ]; then
echo "$(gettext "Configuration file not found:") $CONFFILE" >&2
exit 1
fi
if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '^confirm_quit=' -e '^confirm_delete=' -e '^skip_system_dialogs=' \
-e '^skip_progress_bar=' -e '^calendar_default_view=' \
-e '^week_begins_on_monday=' -e '^color-theme=' -e '^layout=' \
-e '^side-bar_width=' -e '^notify-bar_show=' -e '^notify-bar_date=' \
-e '^notify-bar_clock=' -e '^notify-bar_warning=' -e '^notify-bar_command=' \
-e '^notify-all=' -e '^output_datefmt=' -e '^input_datefmt=' \
-e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then
echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
echo -n "$(gettext "Create temporary backup of the configuration file...")"
backupfile="$CONFFILE.calcurse-upgrade.old"
if [ -e "$backupfile" ]; then
echo
echo "$(gettext "Old backup file found:") \"$backupfile\"" >&2
echo "$(gettext "
If a previous conversion did not complete, please try to restore your
configuration from this backup and then remove the backup file.")" >&2
exit 1
fi
cp "$CONFFILE" "$backupfile"
echo -n ' '
echo "$(gettext 'done')"
tmpfile="$CONFFILE.calcurse-upgrade.tmp"
if [ -e "$tmpfile" ]; then
echo "$(gettext "Old temporary file found:") \"$tmpfile\"" >&2
echo "$(gettext "
If a previous conversion did not complete, please try to remove this file and
start over with a backup of your old configuration file.")" >&2
exit 1
fi
echo -n "$(gettext "Upgrade configuration directives...")"
sed -e 's/^auto_save=/general.autosave=/' \
-e 's/^auto_gc=/general.autogc=/' \
-e 's/^periodic_save=/general.periodicsave=/' \
-e 's/^confirm_quit=/general.confirmquit=/' \
-e 's/^confirm_delete=/general.confirmdelete=/' \
-e 's/^skip_system_dialogs=/general.systemdialogs=/' \
-e 's/^skip_progress_bar=/general.progressbar=/' \
-e 's/^calendar_default_view=/appearance.calendarview=/' \
-e 's/^week_begins_on_monday=/general.firstdayofweek=/' \
-e 's/^color-theme=/appearance.theme=/' \
-e 's/^layout=/appearance.layout=/' \
-e 's/^side-bar_width=/appearance.sidebarwidth=/' \
-e 's/^notify-bar_show=/appearance.notifybar=/' \
-e 's/^notify-bar_date=/format.notifydate=/' \
-e 's/^notify-bar_clock=/format.notifytime=/' \
-e 's/^notify-bar_warning=/notification.warning=/' \
-e 's/^notify-bar_command=/notification.command=/' \
-e 's/^notify-all=/notification.notifyall=/' \
-e 's/^output_datefmt=/format.outputdate=/' \
-e 's/^input_datefmt=/format.inputdate=/' \
-e 's/^notify-daemon_enable=/daemon.enable=/' \
-e 's/^notify-daemon_log=/daemon.log=/' "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
if grep -q -e '^[^#=][^#=]*$' -e '^[^#=][^#=]*#.*$' "$CONFFILE"; then
sed '
/^general.autosave=/{
N
s/\n//
}
/^general.autogc=/{
N
s/\n//
}
/^general.periodicsave=/{
N
s/\n//
}
/^general.confirmquit=/{
N
s/\n//
}
/^general.confirmdelete=/{
N
s/\n//
}
/^general.systemdialogs=/{
N
s/\n//
}
/^general.progressbar=/{
N
s/\n//
}
/^appearance.calendarview=/{
N
s/\n//
}
/^general.firstdayofweek=/{
N
s/\n//
}
/^appearance.theme=/{
N
s/\n//
}
/^appearance.layout=/{
N
s/\n//
}
/^appearance.sidebarwidth=/{
N
s/\n//
}
/^appearance.notifybar=/{
N
s/\n//
}
/^format.notifydate=/{
N
s/\n//
}
/^format.notifytime=/{
N
s/\n//
}
/^notification.warning=/{
N
s/\n//
}
/^notification.command=/{
N
s/\n//
}
/^notification.notifyall=/{
N
s/\n//
}
/^format.outputdate=/{
N
s/\n//
}
/^format.inputdate=/{
N
s/\n//
}
/^daemon.enable=/{
N
s/\n//
}
/^daemon.log=/{
N
s/\n//
}' "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
fi
awk '
BEGIN { FS=OFS="=" }
$1 == "general.systemdialogs" || $1 == "general.progressbar" \
{ $2 = ($2 == "yes") ? "no" : "yes" }
$1 == "general.firstdayofweek" { $2 = ($2 == "yes") ? "monday" : "sunday" }
$1 == "appearance.calendarview" { $2 = ($2 == 0) ? "monthly" : \
($2 == 1) ? "weekly" : $2 }
{ print }
' < "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
echo -n ' '
echo "$(gettext 'done')"
echo -n "$(gettext "Remove temporary backup...")"
rm "$backupfile"
echo -n ' '
echo "$(gettext 'done')"
fi
calcurse-4.2.1/scripts/calcurse-upgrade 0000555 0001750 0001750 00000012634 13005352607 015110 0000000 0000000 #!/bin/sh
export TEXTDOMAIN='calcurse'
set -e
CONFFILE=$HOME/.calcurse/conf
if [ "$#" -gt 0 ]; then
if [ "$1" = "--config" ]; then
CONFFILE=$2
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "calcurse-upgrade 4.2.1"
echo "$(gettext "Usage: calcurse-upgrade [-h|-v|--config ]")"
elif [ "$1" = "-v" -o "$1" = "--version" ]; then
echo "calcurse-upgrade 4.2.1"
echo "$(gettext "
Copyright (c) 2004-2016 calcurse Development Team.
This is free software; see the source for copying conditions.
")"
else
echo "$(gettext "unrecognized option:") \"$1\"" >&2
exit 1
fi
fi
if [ ! -e "$CONFFILE" ]; then
echo "$(gettext "Configuration file not found:") $CONFFILE" >&2
exit 1
fi
if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '^confirm_quit=' -e '^confirm_delete=' -e '^skip_system_dialogs=' \
-e '^skip_progress_bar=' -e '^calendar_default_view=' \
-e '^week_begins_on_monday=' -e '^color-theme=' -e '^layout=' \
-e '^side-bar_width=' -e '^notify-bar_show=' -e '^notify-bar_date=' \
-e '^notify-bar_clock=' -e '^notify-bar_warning=' -e '^notify-bar_command=' \
-e '^notify-all=' -e '^output_datefmt=' -e '^input_datefmt=' \
-e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then
echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
echo -n "$(gettext "Create temporary backup of the configuration file...")"
backupfile="$CONFFILE.calcurse-upgrade.old"
if [ -e "$backupfile" ]; then
echo
echo "$(gettext "Old backup file found:") \"$backupfile\"" >&2
echo "$(gettext "
If a previous conversion did not complete, please try to restore your
configuration from this backup and then remove the backup file.")" >&2
exit 1
fi
cp "$CONFFILE" "$backupfile"
echo -n ' '
echo "$(gettext 'done')"
tmpfile="$CONFFILE.calcurse-upgrade.tmp"
if [ -e "$tmpfile" ]; then
echo "$(gettext "Old temporary file found:") \"$tmpfile\"" >&2
echo "$(gettext "
If a previous conversion did not complete, please try to remove this file and
start over with a backup of your old configuration file.")" >&2
exit 1
fi
echo -n "$(gettext "Upgrade configuration directives...")"
sed -e 's/^auto_save=/general.autosave=/' \
-e 's/^auto_gc=/general.autogc=/' \
-e 's/^periodic_save=/general.periodicsave=/' \
-e 's/^confirm_quit=/general.confirmquit=/' \
-e 's/^confirm_delete=/general.confirmdelete=/' \
-e 's/^skip_system_dialogs=/general.systemdialogs=/' \
-e 's/^skip_progress_bar=/general.progressbar=/' \
-e 's/^calendar_default_view=/appearance.calendarview=/' \
-e 's/^week_begins_on_monday=/general.firstdayofweek=/' \
-e 's/^color-theme=/appearance.theme=/' \
-e 's/^layout=/appearance.layout=/' \
-e 's/^side-bar_width=/appearance.sidebarwidth=/' \
-e 's/^notify-bar_show=/appearance.notifybar=/' \
-e 's/^notify-bar_date=/format.notifydate=/' \
-e 's/^notify-bar_clock=/format.notifytime=/' \
-e 's/^notify-bar_warning=/notification.warning=/' \
-e 's/^notify-bar_command=/notification.command=/' \
-e 's/^notify-all=/notification.notifyall=/' \
-e 's/^output_datefmt=/format.outputdate=/' \
-e 's/^input_datefmt=/format.inputdate=/' \
-e 's/^notify-daemon_enable=/daemon.enable=/' \
-e 's/^notify-daemon_log=/daemon.log=/' "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
if grep -q -e '^[^#=][^#=]*$' -e '^[^#=][^#=]*#.*$' "$CONFFILE"; then
sed '
/^general.autosave=/{
N
s/\n//
}
/^general.autogc=/{
N
s/\n//
}
/^general.periodicsave=/{
N
s/\n//
}
/^general.confirmquit=/{
N
s/\n//
}
/^general.confirmdelete=/{
N
s/\n//
}
/^general.systemdialogs=/{
N
s/\n//
}
/^general.progressbar=/{
N
s/\n//
}
/^appearance.calendarview=/{
N
s/\n//
}
/^general.firstdayofweek=/{
N
s/\n//
}
/^appearance.theme=/{
N
s/\n//
}
/^appearance.layout=/{
N
s/\n//
}
/^appearance.sidebarwidth=/{
N
s/\n//
}
/^appearance.notifybar=/{
N
s/\n//
}
/^format.notifydate=/{
N
s/\n//
}
/^format.notifytime=/{
N
s/\n//
}
/^notification.warning=/{
N
s/\n//
}
/^notification.command=/{
N
s/\n//
}
/^notification.notifyall=/{
N
s/\n//
}
/^format.outputdate=/{
N
s/\n//
}
/^format.inputdate=/{
N
s/\n//
}
/^daemon.enable=/{
N
s/\n//
}
/^daemon.log=/{
N
s/\n//
}' "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
fi
awk '
BEGIN { FS=OFS="=" }
$1 == "general.systemdialogs" || $1 == "general.progressbar" \
{ $2 = ($2 == "yes") ? "no" : "yes" }
$1 == "general.firstdayofweek" { $2 = ($2 == "yes") ? "monday" : "sunday" }
$1 == "appearance.calendarview" { $2 = ($2 == 0) ? "monthly" : \
($2 == 1) ? "weekly" : $2 }
{ print }
' < "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
echo -n ' '
echo "$(gettext 'done')"
echo -n "$(gettext "Remove temporary backup...")"
rm "$backupfile"
echo -n ' '
echo "$(gettext 'done')"
fi
calcurse-4.2.1/README 0000644 0001750 0001750 00000002710 12731203344 011117 0000000 0000000 calcurse
========
Building
--------
If you are using a release tarball, the following commands can be used to build
and install calcurse:
$ ./configure
$ make
$ make install
Note that `make install` needs to be run as root. When working on a Git
checkout, you need to run `./autogen.sh` before `./configure`.
Package Overview
----------------
* `src`: contains calcurse sources
* `test`: contains a test suite and test cases for calcurse
* `scripts`: contains additional scripts, such as `calcurse-upgrade`
* `doc`: contains detailed documentation in plain text and HTML
Authors
-------
* Lukas Fleischer (Maintainer)
* Frederic Culot (Original Author)
Contributors
------------
* RegEx support: Erik Saule
* Dutch translation: Jeremy Roon, 2007-2010
* French translation: Frédéric Culot, 2006-2010
* French translation: Toucouch, 2007
* French translation: Erik Saule, 2011-2012
* French translation: Stéphane Aulery, 2012
* French translation: Baptiste Jonglez, 2012
* German translation: Michael Schulz, 2006-2010
* German translation: Chris M., 2006
* German translation: Benjamin Moeller, 2010
* German translation: Lukas Fleischer, 2011-2012
* Portuguese (Brazil) translation: Rafael Ferreira, 2012
* Russian translation: Aleksey Mechonoshin, 2011-2012
* Spanish translation: Jose Lopez, 2006-2010
Also check the `Thanks` section in the manual for a list of people who have
contributed by reporting bugs, sending fixes, or suggesting improvements.
calcurse-4.2.1/test-driver 0000755 0001750 0001750 00000011040 13005352576 012440 0000000 0000000 #! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2013-07-13.22; # UTC
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <$log_file 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
tweaked_estatus=1
else
tweaked_estatus=$estatus
fi
case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report the test outcome and exit status in the logs, so that one can
# know whether the test passed or failed simply by looking at the '.log'
# file, without the need of also peaking into the corresponding '.trs'
# file (automake bug#11814).
echo "$res $test_name (exit status: $estatus)" >>$log_file
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
calcurse-4.2.1/depcomp 0000755 0001750 0001750 00000056016 13005352576 011633 0000000 0000000 #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva .
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
calcurse-4.2.1/install-sh 0000755 0001750 0001750 00000034523 13005352576 012261 0000000 0000000 #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
calcurse-4.2.1/config.h.in 0000644 0001750 0001750 00000006730 13005352576 012277 0000000 0000000 /* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you want memory debug. */
#undef CALCURSE_MEMORY_DEBUG
/* Define to 1 if you do not want memory debug. */
#undef CALCURSE_MEMORY_DEBUG_DISABLED
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the header file. */
#undef HAVE_CTYPE_H
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the header file. */
#undef HAVE_GETOPT_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the 'math' library (-lm). */
#undef HAVE_LIBMATH
/* Define to 1 if you have the 'pthread' library (-pthread). */
#undef HAVE_LIBPTHREAD
/* Define to 1 if you have the header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the header file. */
#undef HAVE_MATH_H
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the header file. */
#undef HAVE_NCURSESW_NCURSES_H
/* Define to 1 if you have the header file. */
#undef HAVE_NCURSES_H
/* Define to 1 if you have the header file. */
#undef HAVE_NCURSES_NCURSES_H
/* Define to 1 if you have the header file. */
#undef HAVE_PATHS_H
/* Define to 1 if you have the header file. */
#undef HAVE_PTHREAD_H
/* Define to 1 if you have the header file. */
#undef HAVE_REGEX_H
/* Define to 1 if you have the header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the header file. */
#undef HAVE_TIME_H
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
calcurse-4.2.1/INSTALL 0000644 0001750 0001750 00000022432 12675732512 011306 0000000 0000000 Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
calcurse-4.2.1/test/ 0000755 0001750 0001750 00000000000 13005352607 011300 5 0000000 0000000 calcurse-4.2.1/test/appointment-009.sh 0000755 0001750 0001750 00000000326 12675732512 014435 0000000 0000000 #!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-009" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
rm -f errors
calcurse-4.2.1/test/ical-003.sh 0000755 0001750 0001750 00000003744 12675732512 013010 0000000 0000000 #!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
if [ "$1" = 'actual' ]; then
mkdir .calcurse || exit 1
cp "$DATA_DIR/conf" .calcurse || exit 1
"$CALCURSE" -D "$PWD/.calcurse" -i "$DATA_DIR/ical-003.ical"
"$CALCURSE" -D "$PWD/.calcurse" -s01/01/2000 -r365
rm -rf .calcurse || exit 1
elif [ "$1" = 'expected' ]; then
cat < 01:30
Recurring appointment
- 00:00 -> 01:30
Weekly appointment
01/03/00:
- 00:00 -> 01:30
Recurring appointment
01/05/00:
- 00:00 -> 01:30
Recurring appointment
01/07/00:
- 00:00 -> 01:30
Recurring appointment
01/08/00:
- 00:00 -> 01:30
Weekly appointment
01/09/00:
- 00:00 -> 01:30
Recurring appointment
01/11/00:
- 00:00 -> 01:30
Recurring appointment
01/13/00:
- 00:00 -> 01:30
Recurring appointment
01/15/00:
- 00:00 -> 01:30
Weekly appointment
01/17/00:
- 00:00 -> 01:30
Recurring appointment
01/19/00:
- 00:00 -> 01:30
Recurring appointment
01/21/00:
- 00:00 -> 01:30
Recurring appointment
01/25/00:
- 00:00 -> 01:30
Recurring appointment
01/27/00:
- 00:00 -> 01:30
Recurring appointment
01/29/00:
- 00:00 -> 01:30
Recurring appointment
- 00:00 -> 01:30
Weekly appointment
01/31/00:
- 00:00 -> 01:30
Recurring appointment
02/01/00:
- 00:00 -> 01:30
Recurring appointment
02/03/00:
- 00:00 -> 01:30
Recurring appointment
02/05/00:
- 00:00 -> 01:30
Recurring appointment
02/07/00:
- 00:00 -> 01:30
Recurring appointment
02/09/00:
- 00:00 -> 01:30
Recurring appointment
02/11/00:
- 00:00 -> 01:30
Recurring appointment
02/13/00:
- 00:00 -> 01:30
Recurring appointment
02/17/00:
- 00:00 -> 01:30
Recurring appointment
02/19/00:
- 00:00 -> 01:30
Recurring appointment
02/21/00:
- 00:00 -> 01:30
Recurring appointment
02/25/00:
- 00:00 -> 01:30
Recurring appointment
02/27/00:
- 00:00 -> 01:30
Recurring appointment
02/29/00:
- 00:00 -> 01:30
Recurring appointment
EOD
else
./run-test "$0"
fi
calcurse-4.2.1/test/README 0000644 0001750 0001750 00000011445 12675732512 012116 0000000 0000000 calcurse Test Suite
===================
This directory holds of a couple of test cases and some helpers to simplify the
task of creating new tests. Test cases are intended to test a specified set of
behaviors and to avoid reintroduction of bugs that have already been fixed. The
idea is that a new test should be added for each bug report that is received
and for each bug that is fixed in the development branch.
Running tests
-------------
The easiest way to run tests is running `make check`. This will prepare and
compile all needed components and start all test cases. A summary is displayed
when all tests are finished.
You can also run tests manually. Test cases are usually shell scripts or
binaries. To run an individual test, just invoke the corresponding executable.
The `CALCURSE` and `DATA_DIR` environment variables can be used to specify an
alternative calcurse binary and data directory.
Passing another data directory might cause some failures since many tests are
adapted for the `test/` directory provided by the test suite:
$ CALCURSE=../src/calcurse DATA_DIR="$HOME/.calcurse/" ./next-001.sh
Running ./next-001.sh... FAIL
Writing tests
-------------
Writing test cases is as simple as creating a new shell script and adding some
test code. Success and failure are reported by setting the exit status. Setting
the exit status to `0` indicates success, a non-zero value indicates failure
(which reflects the usual exit code semantics of POSIX systems).
To enable a test, just add it to the `TESTS` variable in `test/Makefile.am`. If
your test case is written in a non-interpretable language, you may need to add
some compilation directives as well. Please note that we only accept
POSIX-compatible shell scripts and C in mainline, so please avoid using other
languages if you plan to get your test case integrated upstream.
If your test case invokes the calcurse binary, please continue reading the
following sections, also.
The `run-test` helper
---------------------
The `run-test` helper is a simple C program that makes writing script-based
test cases much easier. Tests for the calcurse command line interface usually
invoke the calcurse binary with some special command line options and compare
the output with a hardcoded set of expected results. Unfortunately, comparing
the output of two commands is not exactly easy in POSIX shell: this is where
the `run-test` helper comes in handy.
If you run the `run-test` helper, you can pass one or more executable files as
parameters. The helper then invokes each of the specified scripts twice: Once
passing `actual` as a command line parameter and once passing `expected`. It
then compares the outputs of both invocations and checks if they are equal or
not. If the `actual`/`expected` outputs differ for one of the programs passed
to `run-test`, if displays `FAIL` and exits with a non-zero exit status. It
returns success otherwise.
Here is a simple example on how to use `run-test`:
#!/bin/sh
if [ "$1" = 'actual' ]; then
echo 'obrocodobro' | sed 's/o/a/g'
elif [ "$1" = 'expected' ]; then
echo 'abracadabra'
else
./run-test "$0"
fi
If the script is run without any parameters, it simply invokes `run-test`,
passing itself as a command line parameter (see the `else` branch). `run-test`
then reruns the script, passing `actual` as the first parameter. This starts
the actual test (see the `if` branch). It reruns the script a second time,
passing `expected` as the first parameter which results in the script printing
the expected result for this test (see the `elif` branch). Finally, `run-test`
compares both outputs, prints a message indicating whether they are equal and
sets the exit status accordingly. This exit status is then passed on to the
original instance of the test script and returned since `./run-test "$0"` is
the last command that is run if the script is invoked without any parameters.
You should stick to this strategy whenever you want to check the output of a
non-interactive calcurse instance in a test. Check the following tests for some
more examples:
* `todo-001.sh`
* `todo-002.sh`
* `todo-003.sh`
Using libfaketime
-----------------
Some tests might require faking current date and time. We currently use
libfaketime to achieve this. Check the following files for examples:
* `appointment-001.sh`
* `next-001.sh`
* `range-001.sh`
* `range-002.sh`
* `range-003.sh`
NOTE: Please do not forget to check for libfaketime presence at the beginning
of your test. Otherwise, your test is likely to fail on systems that are not
supported by libfaketime.
Additional notes
----------------
Most tests, that invoke the calcurse binary, pass the `--read-only` parameter
to make sure the data directory is not modified by calcurse, preventing
unexpected side effects. Please follow this guideline if you plan to submit
your patch upstream.
calcurse-4.2.1/test/appointment-012.sh 0000755 0001750 0001750 00000000326 12675732512 014427 0000000 0000000 #!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-012" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
rm -f errors
calcurse-4.2.1/test/recur-002.sh 0000755 0001750 0001750 00000000531 12675732512 013206 0000000 0000000 #!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-recur" \
-d02/01/2000 --format-recur-apt=''
elif [ "$1" = 'expected' ]; then
cat <