po4a into autotools

This commit is contained in:
Bandie 2018-09-29 19:02:11 +02:00
parent d3fcbb8c61
commit 4db2b8d8a7
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD
4 changed files with 19 additions and 3 deletions

View File

@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = -I src
SUBDIRS = po src/pam_panic src/pam_panic_pw
SUBDIRS = po po4a src/pam_panic src/pam_panic_pw
.PHONY: all test clean

View File

@ -23,6 +23,13 @@ AM_PROG_AR
AM_GNU_GETTEXT_VERSION(0.19.8)
AM_GNU_GETTEXT([external])
AC_PATH_PROG([PO4A],po4a)
if test -z "$PO4A" ; then
AC_MSG_ERROR([Please install po4a before building pam_panic.])
fi
AC_DEFINE_UNQUOTED([PO4A], "$PO4A",
[path to po4a])
AC_PATH_PROG([REBOOT], [reboot])
AC_DEFINE_UNQUOTED([REBOOT], "$REBOOT",
[path to the reboot command])
@ -33,6 +40,10 @@ AC_PATH_PROG([CRYPTSETUP], [cryptsetup])
AC_DEFINE_UNQUOTED([CRYPTSETUP], "$CRYPTSETUP",
[path to the cryptsetup command])
AC_PATH_PROG([FIND], [find])
AC_DEFINE_UNQUOTED([FIND], "$FIND",
[path to the find command])
AC_ARG_ENABLE(securedir,
AS_HELP_STRING([--enable-securedir=DIR],
[path to location of PAMs @<:@default=LIBDIR/security@:>@]),
@ -54,6 +65,7 @@ AC_ENABLE_SHARED([yes])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
po4a/Makefile
src/pam_panic/Makefile
src/pam_panic/man/Makefile
src/pam_panic_pw/Makefile

View File

@ -10,7 +10,9 @@ nobase_dist_cant_believe_its_not_man_DATA = \
%.gz: %
{ sldr=$$(echo "$(securelibdir)" | $(SED) 's/\//\\\//g') ; bdr=$$(echo "$(bindir)" | $(SED) 's/\//\\\//g') ; $(SED) "s/__PAMPANICSO__/$$sldr\/pam_panic\\\\\&.so/; s/__PAMPANICPW__/$$bdr\/pam_panic_pw/" $< >$<.tmp ; }
gzip -c $<.tmp >$@
rm $<.tmp
clean-local:
rm ./*/*.tmp ./*/*.gz ./*/*/*.tmp ./*/*/*.gz
$(RM) ./*/*.gz
$(FIND) . -type d -not -name man8 -not -path . -exec rm -rf {} +

View File

@ -9,7 +9,9 @@ nobase_dist_cant_believe_its_not_man_DATA = \
%.gz: %
{ ppf=$$(echo "$(PPASSFILE)" | $(SED) 's/\//\\\//g') ; bdr=$$(echo "$(bindir)" | $(SED) 's/\//\\\//g') ; $(SED) "s/__PPASSFILE__/$$ppf/; s/__PAMPANICPW__/$$bdr\/pam_panic\\\\\&.so/" $< >$<.tmp ; }
gzip -c $<.tmp >$@
rm $<.tmp
clean-local:
rm -f ./*/*.tmp ./*/*.gz ./*/*/*.tmp ./*/*/*.gz
$(RM) -f ./*/*.gz
$(FIND) . -type d -not -name man1 -not -path . -exec rm -rf {} +