forked from comotion/cpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
4,894 additions
and
2,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
CC=@CC@ | ||
# I used to have -Werror here but this breaks the warning which I must have | ||
# with lib GpgMe. :-( | ||
CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ @LIBGPGME_CFLAGS@ @LIBXML_CFLAGS@ -std=c89 -pedantic -Wall -DLOCALEDIR='"@prefix@/share/locale"' @CDK_VERSION_DEF@ | ||
CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ @LIBGPGME_CFLAGS@ @LIBNCURSES_CFLAGS@ @LIBXML_CFLAGS@ -std=c99 -Wall -Wformat=2 -DLOCALEDIR='"@prefix@/share/locale"' @CDK_VERSION_DEF@ | ||
INSTALL=@INSTALL@ | ||
LDFLAGS=@LDFLAGS@ @LIBS@ @LIBGPGME_LIBS@ @LIBXML_LIBS@ | ||
LDFLAGS=@LDFLAGS@ @LIBS@ @LIBGPGME_LIBS@ @LIBNCURSES_LIBS@ @LIBXML_LIBS@ | ||
SHELL=@SHELL@ | ||
DEBIAN_RELEASE=1 | ||
DEBIAN_BINARY=@PACKAGE_NAME@-@PACKAGE_VERSION@-$(DEBIAN_RELEASE)_i386.deb | ||
|
@@ -37,10 +37,10 @@ OBJECTS=cpm.o configuration.o general.o gpg.o interface_cli.o interface_gui.o in | |
# build rules | ||
|
||
.c.o: | ||
$(CC) $(CFLAGS) -c $< | ||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< | ||
|
||
.o: | ||
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@ | ||
$(CC) $^ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ | ||
|
||
|
||
# ############################################################################## | ||
|
@@ -52,7 +52,7 @@ all: dependencies cpm | |
# ############################################################################## | ||
# run the tests | ||
.PHONY: check | ||
check: cpm gettext check_backup check_clisearch check_compress check_configtest check_decrypt check_encrypt check_environment check_garbage check_gettext check_searchpattern | ||
check: permissions cpm gettext check_backup check_clisearch check_compress check_configtest check_decrypt check_encrypt check_environment check_garbage check_gettext check_searchpattern | ||
|
||
OK=\t\t\t\t[1;32mok[0m | ||
ERROR=\t\t\t\t[1;31mfailed[0m | ||
|
@@ -226,13 +226,14 @@ check_environment: | |
@echo -n "Testing [1;37menvironment [0m"; \ | ||
rm -f check-environment.log; \ | ||
$(GPG_ENV) ./cpm --config=tests/cpmrc-crypt-tests --testrun=environment > check-environment.log 2>&1 || exit 1; \ | ||
diff --brief check-environment.log tests/environment-result.txt > /dev/null; \ | ||
egrep -e "(^general: |^alpha |^numeric |^filename |^path )#[0-9]+: " check-environment.log > check-environment-2.log || exit 1; \ | ||
diff --brief check-environment-2.log tests/environment-result.txt > /dev/null; \ | ||
if [ $${?} -ne 0 ]; then \ | ||
echo -e "$(ERROR)"; \ | ||
exit 1; \ | ||
else \ | ||
echo -e "$(OK)"; \ | ||
rm -f check-environment.log; \ | ||
rm -f check-environment.log check-environment-2.log; \ | ||
fi | ||
|
||
.PHONY: check_garbage | ||
|
@@ -256,16 +257,17 @@ check_garbage: | |
.PHONY: check_gettext | ||
check_gettext: | ||
@echo -n "Testing [1;37mgettext 1 [0m"; \ | ||
INSTALLED=`locale -a | grep -c "^de_DE$$"`; \ | ||
if [ $${INSTALLED} -ne 1 ]; then \ | ||
INSTALLED=`locale -a | grep -c "^de_DE"`; \ | ||
if [ $${INSTALLED} -eq 0 ]; then \ | ||
echo -e "$(ERROR)"; \ | ||
exit 1; \ | ||
else \ | ||
echo -e "$(OK)"; \ | ||
fi | ||
@echo -n "Testing [1;37mgettext 2 [0m"; \ | ||
rm -f check-gettext.log; \ | ||
$(GPG_ENV) LANG=de_DE ./cpm --version | tail --lines=1 > check-gettext.log 2>&1 || exit 1; \ | ||
LANGUAGE=`locale -a | grep "^de_DE" | head --lines=1`; \ | ||
$(GPG_ENV) LANG=$${LANGUAGE} ./cpm --version | tail --lines=1 > check-gettext.log 2>&1 || exit 1; \ | ||
diff --brief check-gettext.log tests/gettext-result.txt > /dev/null; \ | ||
if [ $${?} -ne 0 ]; then \ | ||
echo -e "$(ERROR)"; \ | ||
|
@@ -322,7 +324,7 @@ debug: cpm | |
dependencies: | ||
@rm -f Makefile.dep; \ | ||
for FILE in $(OBJECTS); do \ | ||
$(CC) $(CFLAGS) -MM $${FILE%%.o}.c >> Makefile.dep; \ | ||
$(CC) $(CFLAGS) $(CPPFLAGS) -MM $${FILE%%.o}.c >> Makefile.dep; \ | ||
done | ||
|
||
|
||
|
@@ -340,17 +342,15 @@ gettext: gettext_compile | |
|
||
.PHONY: gettext_compile | ||
gettext_compile: gettext_translate | ||
cd po; \ | ||
tail --lines=+18 de_DE.po > current.txt; \ | ||
tail --lines=+18 de_DE_new.po > new.txt; \ | ||
diff -u current.txt new.txt | ||
cd po; msgfmt --check --statistics --strict de_DE.po --output=de_DE.mo | ||
cd po; \ | ||
mkdir -p ./de/LC_MESSAGES; \ | ||
cp de_DE.mo ./de/LC_MESSAGES/cpm.mo | ||
|
||
# diff fails | ||
# cd po; \ | ||
# tail --lines=+18 de_DE.po > current.txt; \ | ||
# tail --lines=+18 de_DE_new.po > new.txt; \ | ||
# diff -u current.txt new.txt | ||
|
||
|
||
# ############################################################################## | ||
# make new gettext file | ||
|
@@ -376,32 +376,57 @@ gettext_update: | |
# install everything | ||
.PHONY: install | ||
install: cpm gettext | ||
$(INSTALL) -D --mode=4755 --owner=root --group=root @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@ | ||
$(INSTALL) -D --mode=644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@[email protected] | ||
$(INSTALL) -D --mode=644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz | ||
$(INSTALL) -d $(DESTDIR)$(bindir) | ||
$(INSTALL) -d $(DESTDIR)$(localedir)/de/LC_MESSAGES | ||
$(INSTALL) -d $(DESTDIR)$(mandir)/man1 | ||
$(INSTALL) -m 4755 -o 0 -g 0 @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@ $(INSTALL) -m 644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@[email protected] | ||
$(INSTALL) -m 644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz | ||
|
||
|
||
|
||
# ############################################################################## | ||
# create the manual | ||
|
||
.PHONY: man | ||
man: | ||
txt2man -s 1 -r "@PACKAGE_NAME@ @PACKAGE_VERSION@" -v "User Commands" -t "cpm" -T ../docs/cpm.txt | gzip -9 > ../docs/cpm.1.gz | ||
txt2man -s 1 -r "@PACKAGE_NAME@ @PACKAGE_VERSION@" -v "User Commands" -t "cpm" -T ../docs/cpm.txt > /tmp/cpm.1 | ||
cat /tmp/cpm.1 | gzip -9 > ../docs/cpm.1.gz | ||
rm -f /tmp/cpm.1 | ||
|
||
|
||
# ############################################################################## | ||
# set all probably missing file permissions | ||
.PHONY: | ||
permissions: | ||
chmod 755 ../anonymize/cpm2anonymous.pl | ||
chmod 755 ../debian/postinst | ||
chmod 755 ../import/general/convert.sh | ||
chmod 755 ../import/passwordsafe/convert.pl | ||
chmod 755 ../import/*.pl ../import/*.sh | ||
chmod 755 ../import/pms/convert.pl ../import/pms/convert.sh | ||
chmod 755 ./prepare_release.sh ./publish_release.sh | ||
chmod 755 ./tests/testxml.pl | ||
chmod 755 ../wrapper/cpm-wrapper | ||
for FILE in \ | ||
../anonymize/cpm2anonymous.pl \ | ||
../debian/postinst \ | ||
../import/general/convert.sh \ | ||
../import/passwordsafe/convert.pl \ | ||
../import/*.pl ../import/*.sh \ | ||
../import/pms/convert.pl ../import/pms/convert.sh \ | ||
./prepare_release.sh ./publish_release.sh \ | ||
./tests/testxml.pl \ | ||
../wrapper/cpm-wrapper; do \ | ||
if [ -f "$${FILE}" ]; then \ | ||
echo "Setting permissions for $${FILE}"; \ | ||
chmod 755 "$${FILE}"; \ | ||
fi; \ | ||
done | ||
|
||
|
||
# ############################################################################## | ||
# clean the distribution | ||
.PHONY: distclean | ||
distclean: clean | ||
rm -fr \ | ||
config.h \ | ||
config.status \ | ||
control \ | ||
*.log \ | ||
Makefile \ | ||
Makefile.dep \ | ||
*.out | ||
|
||
|
||
# ############################################################################## | ||
|
@@ -522,6 +547,7 @@ tar: clean gettext man permissions | |
../debian/changelog \ | ||
../ChangeLog \ | ||
../docs/cpm.1.gz \ | ||
../docs/cpm.pod \ | ||
../docs/cpm.txt \ | ||
../docs/GPLv2 \ | ||
../docs/README \ | ||
|
@@ -556,7 +582,7 @@ tar: clean gettext man permissions | |
cp ./po/de_DE.mo \ | ||
./po/de_DE.po \ | ||
@PACKAGE_TARNAME@-@PACKAGE_VERSION@/po/ | ||
find tests/ -type f -maxdepth 1 -exec \ | ||
find tests/ -maxdepth 1 -type f -exec \ | ||
cp {} @PACKAGE_TARNAME@-@PACKAGE_VERSION@/tests/ \; | ||
tar cjf $(BZ2_SOURCE) @PACKAGE_TARNAME@-@PACKAGE_VERSION@/ | ||
tar czf $(TAR_SOURCE) @PACKAGE_TARNAME@-@PACKAGE_VERSION@/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,11 @@ | |
/* Define to 1 if you have the `clearenv' function. */ | ||
#define HAVE_CLEARENV 1 | ||
|
||
/* Define to 1 if you have the `environ' function. */ | ||
#define HAVE_ENVIRON 1 | ||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | ||
/* #undef HAVE_DOPRNT */ | ||
|
||
/* Define if environ extern is available */ | ||
#define HAVE_EXTERN_ENVIRON 1 | ||
|
||
/* Define to 1 if you have the <fcntl.h> header file. */ | ||
#define HAVE_FCNTL_H 1 | ||
|
@@ -32,20 +35,32 @@ | |
/* Define to 1 if you have the `crack' library (-lcrack). */ | ||
#define HAVE_LIBCRACK 1 | ||
|
||
/* Define to 1 if you have the `curses' library (-lcurses). */ | ||
/* #undef HAVE_LIBCURSES */ | ||
|
||
/* Define to 1 if you have the `dotconf' library (-ldotconf). */ | ||
#define HAVE_LIBDOTCONF 1 | ||
|
||
/* Define to 1 if you have the `gpgme' library (-lgpgme). */ | ||
#define HAVE_LIBGPGME 1 | ||
|
||
/* Define to 1 if you have the `intl' library (-lintl). */ | ||
/* #undef HAVE_LIBINTL */ | ||
|
||
/* Define to 1 if you have the <libintl.h> header file. */ | ||
#define HAVE_LIBINTL_H 1 | ||
|
||
/* Define to 1 if you have the `m' library (-lm). */ | ||
#define HAVE_LIBM 1 | ||
|
||
/* Define to 1 if you have the `ncurses' library (-lncurses). */ | ||
#define HAVE_LIBNCURSES 1 | ||
/* #undef HAVE_LIBNCURSES */ | ||
|
||
/* Define to 1 if you have the `ncursesw' library (-lncursesw). */ | ||
#define HAVE_LIBNCURSESW 1 | ||
|
||
/* Define to 1 if you have the `pdcurses' library (-lpdcurses). */ | ||
/* #undef HAVE_LIBPDCURSES */ | ||
|
||
/* Define to 1 if you have the `xml2' library (-lxml2). */ | ||
#define HAVE_LIBXML2 1 | ||
|
@@ -56,6 +71,10 @@ | |
/* Define to 1 if you have the <locale.h> header file. */ | ||
#define HAVE_LOCALE_H 1 | ||
|
||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and | ||
to 0 otherwise. */ | ||
#define HAVE_MALLOC 1 | ||
|
||
/* Define to 1 if you have the <memory.h> header file. */ | ||
#define HAVE_MEMORY_H 1 | ||
|
||
|
@@ -68,6 +87,10 @@ | |
/* Define to 1 if you have the `putenv' function. */ | ||
#define HAVE_PUTENV 1 | ||
|
||
/* Define to 1 if your system has a GNU libc compatible `realloc' function, | ||
and to 0 otherwise. */ | ||
#define HAVE_REALLOC 1 | ||
|
||
/* Define to 1 if you have the `regcomp' function. */ | ||
#define HAVE_REGCOMP 1 | ||
|
||
|
@@ -120,24 +143,33 @@ | |
/* Define to 1 if you have the <unistd.h> header file. */ | ||
#define HAVE_UNISTD_H 1 | ||
|
||
/* Define to 1 if you have the `unsetenv' function. */ | ||
#define HAVE_UNSETENV 1 | ||
|
||
/* Define to 1 if you have the `vprintf' function. */ | ||
#define HAVE_VPRINTF 1 | ||
|
||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing | ||
slash. */ | ||
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | ||
|
||
/* Define if environ decl needed */ | ||
/* #undef MANUAL_EXTERN_ENVIRON */ | ||
|
||
/* Define to the address where bug reports for this package should be sent. */ | ||
#define PACKAGE_BUGREPORT "[email protected]" | ||
|
||
/* Define to the full name of this package. */ | ||
#define PACKAGE_NAME "cpm" | ||
|
||
/* Define to the full name and version of this package. */ | ||
#define PACKAGE_STRING "cpm 0.23beta" | ||
#define PACKAGE_STRING "cpm 0.25beta" | ||
|
||
/* Define to the one symbol short name of this package. */ | ||
#define PACKAGE_TARNAME "cpm" | ||
|
||
/* Define to the version of this package. */ | ||
#define PACKAGE_VERSION "0.23beta" | ||
#define PACKAGE_VERSION "0.25beta" | ||
|
||
/* Define as the return type of signal handlers (`int' or `void'). */ | ||
#define RETSIGTYPE void | ||
|
@@ -152,7 +184,7 @@ | |
#define _FILE_OFFSET_BITS 64 | ||
|
||
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ | ||
#define _LARGEFILE_SOURCE 1 | ||
/* #undef _LARGEFILE_SOURCE */ | ||
|
||
/* Define for large files, on AIX-style hosts. */ | ||
/* #undef _LARGE_FILES */ | ||
|
@@ -163,6 +195,9 @@ | |
/* Define to `int' if <sys/types.h> doesn't define. */ | ||
/* #undef gid_t */ | ||
|
||
/* Define to rpl_malloc if the replacement function should be used. */ | ||
/* #undef malloc */ | ||
|
||
/* Define to `int' if <sys/types.h> does not define. */ | ||
/* #undef mode_t */ | ||
|
||
|
@@ -172,9 +207,15 @@ | |
/* Define to `int' if <sys/types.h> does not define. */ | ||
/* #undef pid_t */ | ||
|
||
/* Define to rpl_realloc if the replacement function should be used. */ | ||
/* #undef realloc */ | ||
|
||
/* Define to `unsigned int' if <sys/types.h> does not define. */ | ||
/* #undef size_t */ | ||
|
||
/* Define to `int' if <sys/types.h> does not define. */ | ||
/* #undef ssize_t */ | ||
|
||
/* Define to `int' if <sys/types.h> doesn't define. */ | ||
/* #undef uid_t */ | ||
|
||
|
Oops, something went wrong.