chiark / gitweb /
keyfunc.sh.in: Make sure we can match the `0' string.
[distorted-keys] / Makefile.am
index c733758..48251c8 100644 (file)
 ### along with distorted-keys; if not, write to the Free Software Foundation,
 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+pkgconfdir              = $(sysconfdir)/$(PACKAGE)
+profiledir              = $(pkgconfdir)/profile.d
+
 bin_SCRIPTS             =
 sbin_SCRIPTS            =
 dist_pkglib_SCRIPTS     =
 dist_pkglib_DATA        =
-noinst_DATA             =
 pkglib_DATA             =
-noinst_SCRIPTS          =
+dist_profile_DATA       =
+noinst_DATA             =
+USERV_CONFIG            =
+KEYS_CONFIG             =
+TOPLEVEL_CONFIG                 =
 
 EXTRA_DIST              =
 CLEANFILES              =
@@ -45,12 +51,16 @@ SUBSTVARS = \
        PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
        PYTHON="$(PYTHON)" \
        bindir="$(bindir)" sbindir="$(sbindir)" \
-       pkgconfdir="$(sysconfdir)/$(PACKAGE)" \
-       pkgstatedir="$(localstatedir)/$(PACKAGE)" \
+       sysconfdir="$(sysconfdir)" pkgconfdir="$(pkgconfdir)" \
+       pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
        pkglibdir="$(pkglibdir)" \
        user="$(user)"
 
-SUBST = $(AM_V_GEN)$(confsubst)
+V_SUBST = $(V_SUBST_$V)
+V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
+V_SUBST_0 = @printf "  SUBST  %s\n" $@;
+
+SUBST = $(V_SUBST)$(confsubst)
 
 ###--------------------------------------------------------------------------
 ### Utility programs.
@@ -77,7 +87,7 @@ extract-profile: extract-profile.in Makefile
 ### Main driver program and commands.
 
 ## Main driver.
-bin_SCRIPTS            += keys
+sbin_SCRIPTS           += keys
 EXTRA_DIST             += keys.in
 CLEANFILES             += keys
 keys: keys.in Makefile
@@ -93,20 +103,37 @@ keyfunc.sh: keyfunc.sh.in Makefile
                mv keyfunc.sh.new keyfunc.sh
 
 ## Commands.
-dist_pkglib_SCRIPTS    += keys.archive
 dist_pkglib_SCRIPTS    += keys.conceal
+dist_pkglib_SCRIPTS    += keys.delete-keeper
 dist_pkglib_SCRIPTS    += keys.keeper-cards
+dist_pkglib_SCRIPTS    += keys.keeper-nub
+dist_pkglib_SCRIPTS    += keys.list-keepers
+dist_pkglib_SCRIPTS    += keys.list-recov
 dist_pkglib_SCRIPTS    += keys.new-keeper
 dist_pkglib_SCRIPTS    += keys.new-recov
 dist_pkglib_SCRIPTS    += keys.recover
 dist_pkglib_SCRIPTS    += keys.reveal
 dist_pkglib_SCRIPTS    += keys.stash
 
+## Common profiles.
+dist_profile_DATA      += profile.d/00base
+dist_profile_DATA      += profile.d/02infra
+
+## Other configuration.
+KEYS_CONFIG            += keys.conf
+EXTRA_DIST             += keys.conf
+
+KEYS_CONFIG            += admin.users admin.groups
+EXTRA_DIST             += admin.users admin.groups
+
+KEYS_CONFIG            += keeper-cards.tex
+EXTRA_DIST             += keeper-cards.tex
+
 ###--------------------------------------------------------------------------
 ### Crypto operations.
 
 ## Main driver program.
-sbin_SCRIPTS           += cryptop
+bin_SCRIPTS            += cryptop
 EXTRA_DIST             += cryptop.in
 CLEANFILES             += cryptop
 cryptop: cryptop.in Makefile
@@ -115,9 +142,13 @@ cryptop: cryptop.in Makefile
 
 ## Key type libraries.
 dist_pkglib_DATA       += ktype.gnupg
+dist_profile_DATA      += profile.d/01gnupg
+
 dist_pkglib_DATA       += ktype.seccure
+dist_profile_DATA      += profile.d/01seccure
 
 ## Commands.
+dist_pkglib_SCRIPTS    += cryptop.archive
 dist_pkglib_SCRIPTS    += cryptop.genkey
 dist_pkglib_SCRIPTS    += cryptop.list
 dist_pkglib_SCRIPTS    += cryptop.delkey
@@ -130,12 +161,122 @@ dist_pkglib_SCRIPTS      += cryptop.sign
 dist_pkglib_SCRIPTS    += cryptop.verify
 
 ## Userv services configuration.
-noinst_DATA            += distorted-keys.userv
-EXTRA_DIST             += distorted-keys.userv.in
-CLEANFILES             += distorted-keys.userv
-distorted-keys.userv: distorted-keys.userv.in Makefile
-       $(SUBST) $(srcdir)/distorted-keys.userv.in $(SUBSTVARS) \
-                       >distorted-keys.userv.new && \
-               mv distorted-keys.userv.new distorted-keys.userv
+USERV_CONFIG           += userv/distorted-keys
+EXTRA_DIST             += userv/distorted-keys.in
+CLEANFILES             += userv/distorted-keys
+userv/distorted-keys: userv/distorted-keys.in Makefile
+       $(AM_V_at)mkdir -p userv/
+       $(SUBST) $(srcdir)/userv/distorted-keys.in $(SUBSTVARS) \
+                       >userv/distorted-keys.new && \
+               mv userv/distorted-keys.new userv/distorted-keys
+
+###--------------------------------------------------------------------------
+### Standalone operations on public keys.
+
+bin_SCRIPTS            += pubkeyop
+EXTRA_DIST             += pubkeyop.in
+CLEANFILES             += pubkeyop
+pubkeyop: pubkeyop.in Makefile
+       $(SUBST) $(srcdir)/pubkeyop.in $(SUBSTVARS) >pubkeyop.new && \
+               chmod +x pubkeyop.new && mv pubkeyop.new pubkeyop
+
+###--------------------------------------------------------------------------
+### Secure storage management.
+
+## Ephemeral filesystem construction.
+sbin_SCRIPTS           += mount-ephemeral
+EXTRA_DIST             += mount-ephemeral
+
+## Directory claiming service.
+USERV_CONFIG           += userv/claim-dir
+EXTRA_DIST             += userv/claim-dir.in
+CLEANFILES             += userv/claim-dir
+userv/claim-dir: userv/claim-dir.in Makefile
+       $(AM_V_at)mkdir -p userv/
+       $(SUBST) $(srcdir)/userv/claim-dir.in $(SUBSTVARS) \
+                       >userv/claim-dir.new && \
+               mv userv/claim-dir.new userv/claim-dir
+
+## Configuration file.
+TOPLEVEL_CONFIG                += claim-dir.tab
+EXTRA_DIST             += claim-dir.tab
+
+###--------------------------------------------------------------------------
+### Installing configuration.
+
+## Install userv configuration.
+noinst_DATA            += $(USERV_CONFIG)
+install-data-local::
+       $(MKDIR_P) $(DESTDIR)$(uservconfdir)
+       @for i in $(USERV_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         if [ -f $(DESTDIR)$(uservconfdir)/$$b ]; then continue; fi; \
+         if [ -f $$i ]; then s=$$i; else s=$(srcdir)/$$i; fi; \
+         echo $(INSTALL_DATA) $$s $(DESTDIR)$(uservconfdir); \
+         $(INSTALL_DATA) $$s $(DESTDIR)$(uservconfdir) || exit 1; \
+       done
+uninstall-local::
+       @for i in $(USERV_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         echo rm -f $(DESTDIR)$(uservconfdir)/$$b; \
+         rm -f $(DESTDIR)$(uservconfdir)/$$b; \
+       done
+
+## Install keys configuration.
+noinst_DATA            += $(KEYS_CONFIG)
+install-data-local::
+       $(MKDIR_P) $(DESTDIR)$(pkgconfdir)
+       @for i in $(KEYS_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         if [ -f $(DESTDIR)$(pkgconfdir)/$$b ]; then continue; fi; \
+         if [ -f $$i ]; then s=$$i; else s=$(srcdir)/$$i; fi; \
+         echo $(INSTALL_DATA) $$s $(DESTDIR)$(pkgconfdir); \
+         $(INSTALL_DATA) $$s $(DESTDIR)$(pkgconfdir) || exit 1; \
+       done
+uninstall-local::
+       @for i in $(KEYS_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         echo rm -f $(DESTDIR)$(pkgconfdir)/$$b; \
+         rm -f $(DESTDIR)$(pkgconfdir)/$$b; \
+       done
+
+## Install toplevel configuration.
+noinst_DATA            += $(TOPLEVEL_CONFIG)
+install-data-local::
+       $(MKDIR_P) $(DESTDIR)$(sysconfdir)
+       @for i in $(TOPLEVEL_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         if [ -f $(DESTDIR)$(sysconfdir)/$$b ]; then continue; fi; \
+         if [ -f $$i ]; then s=$$i; else s=$(srcdir)/$$i; fi; \
+         echo $(INSTALL_DATA) $$s $(DESTDIR)$(sysconfdir); \
+         $(INSTALL_DATA) $$s $(DESTDIR)$(sysconfdir) || exit 1; \
+       done
+uninstall-local::
+       @for i in $(TOPLEVEL_CONFIG); do \
+         b=$$(expr /$$i : '.*/\([^/]*\)$$'); \
+         echo rm -f $(DESTDIR)$(sysconfdir)/$$b; \
+         rm -f $(DESTDIR)$(sysconfdir)/$$b; \
+       done
+
+###--------------------------------------------------------------------------
+### Release setup.
+
+dist-hook::
+       echo $(VERSION) >$(distdir)/RELEASE
+
+EXTRA_DIST             += config/auto-version
+
+###--------------------------------------------------------------------------
+### Debian packaging.
+
+EXTRA_DIST             += debian/changelog debian/control debian/copyright
+EXTRA_DIST             += debian/rules debian/compat
+
+EXTRA_DIST             += debian/distorted-keys-base.install
+
+EXTRA_DIST             += debian/distorted-keys.install
+EXTRA_DIST             += debian/distorted-keys.postinst
+
+EXTRA_DIST             += debian/claim-dir.install
 
 ###----- That's all, folks --------------------------------------------------