chiark / gitweb /
profile.d/01gnupg: Remove spurious initial `%' from `email' address.
[distorted-keys] / Makefile.am
index 2f90bbe..ce04560 100644 (file)
@@ -28,12 +28,14 @@ profiledir           = $(pkgconfdir)/profile.d
 
 bin_SCRIPTS             =
 sbin_SCRIPTS            =
 
 bin_SCRIPTS             =
 sbin_SCRIPTS            =
-dist_pkglib_SCRIPTS     =
-dist_pkglib_DATA        =
-noinst_DATA             =
-pkglib_DATA             =
-noinst_SCRIPTS          =
+dist_pkgdata_SCRIPTS    =
+dist_pkgdata_DATA       =
+pkgdata_DATA            =
 dist_profile_DATA       =
 dist_profile_DATA       =
+noinst_DATA             =
+USERV_CONFIG            =
+KEYS_CONFIG             =
+TOPLEVEL_CONFIG                 =
 
 EXTRA_DIST              =
 CLEANFILES              =
 
 EXTRA_DIST              =
 CLEANFILES              =
@@ -51,7 +53,7 @@ SUBSTVARS = \
        bindir="$(bindir)" sbindir="$(sbindir)" \
        sysconfdir="$(sysconfdir)" pkgconfdir="$(pkgconfdir)" \
        pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
        bindir="$(bindir)" sbindir="$(sbindir)" \
        sysconfdir="$(sysconfdir)" pkgconfdir="$(pkgconfdir)" \
        pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
-       pkglibdir="$(pkglibdir)" \
+       pkgdatadir="$(pkgdatadir)" \
        user="$(user)"
 
 V_SUBST = $(V_SUBST_$V)
        user="$(user)"
 
 V_SUBST = $(V_SUBST_$V)
@@ -93,7 +95,7 @@ keys: keys.in Makefile
                chmod +x keys.new && mv keys.new keys
 
 ## Utilities library.
                chmod +x keys.new && mv keys.new keys
 
 ## Utilities library.
-pkglib_DATA            += keyfunc.sh
+pkgdata_DATA           += keyfunc.sh
 EXTRA_DIST             += keyfunc.sh.in
 CLEANFILES             += keyfunc.sh
 keyfunc.sh: keyfunc.sh.in Makefile
 EXTRA_DIST             += keyfunc.sh.in
 CLEANFILES             += keyfunc.sh
 keyfunc.sh: keyfunc.sh.in Makefile
@@ -101,16 +103,31 @@ keyfunc.sh: keyfunc.sh.in Makefile
                mv keyfunc.sh.new keyfunc.sh
 
 ## Commands.
                mv keyfunc.sh.new keyfunc.sh
 
 ## Commands.
-dist_pkglib_SCRIPTS    += keys.conceal
-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
+dist_pkgdata_SCRIPTS   += keys.conceal
+dist_pkgdata_SCRIPTS   += keys.delete-keeper
+dist_pkgdata_SCRIPTS   += keys.keeper-cards
+dist_pkgdata_SCRIPTS   += keys.keeper-nub
+dist_pkgdata_SCRIPTS   += keys.list-keepers
+dist_pkgdata_SCRIPTS   += keys.list-recov
+dist_pkgdata_SCRIPTS   += keys.new-keeper
+dist_pkgdata_SCRIPTS   += keys.new-recov
+dist_pkgdata_SCRIPTS   += keys.recover
+dist_pkgdata_SCRIPTS   += keys.reveal
+dist_pkgdata_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.
 
 ###--------------------------------------------------------------------------
 ### Crypto operations.
@@ -124,27 +141,27 @@ cryptop: cryptop.in Makefile
                chmod +x cryptop.new && mv cryptop.new cryptop
 
 ## Key type libraries.
                chmod +x cryptop.new && mv cryptop.new cryptop
 
 ## Key type libraries.
-dist_pkglib_DATA       += ktype.gnupg
+dist_pkgdata_DATA      += ktype.gnupg
 dist_profile_DATA      += profile.d/01gnupg
 
 dist_profile_DATA      += profile.d/01gnupg
 
-dist_pkglib_DATA       += ktype.seccure
+dist_pkgdata_DATA      += ktype.seccure
 dist_profile_DATA      += profile.d/01seccure
 
 ## Commands.
 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
-dist_pkglib_SCRIPTS    += cryptop.recover
-dist_pkglib_SCRIPTS    += cryptop.info
-dist_pkglib_SCRIPTS    += cryptop.public
-dist_pkglib_SCRIPTS    += cryptop.encrypt
-dist_pkglib_SCRIPTS    += cryptop.decrypt
-dist_pkglib_SCRIPTS    += cryptop.sign
-dist_pkglib_SCRIPTS    += cryptop.verify
+dist_pkgdata_SCRIPTS   += cryptop.archive
+dist_pkgdata_SCRIPTS   += cryptop.genkey
+dist_pkgdata_SCRIPTS   += cryptop.list
+dist_pkgdata_SCRIPTS   += cryptop.delkey
+dist_pkgdata_SCRIPTS   += cryptop.recover
+dist_pkgdata_SCRIPTS   += cryptop.info
+dist_pkgdata_SCRIPTS   += cryptop.public
+dist_pkgdata_SCRIPTS   += cryptop.encrypt
+dist_pkgdata_SCRIPTS   += cryptop.decrypt
+dist_pkgdata_SCRIPTS   += cryptop.sign
+dist_pkgdata_SCRIPTS   += cryptop.verify
 
 ## Userv services configuration.
 
 ## Userv services configuration.
-noinst_DATA            += userv/distorted-keys
+USERV_CONFIG           += userv/distorted-keys
 EXTRA_DIST             += userv/distorted-keys.in
 CLEANFILES             += userv/distorted-keys
 userv/distorted-keys: userv/distorted-keys.in Makefile
 EXTRA_DIST             += userv/distorted-keys.in
 CLEANFILES             += userv/distorted-keys
 userv/distorted-keys: userv/distorted-keys.in Makefile
@@ -171,7 +188,7 @@ sbin_SCRIPTS                += mount-ephemeral
 EXTRA_DIST             += mount-ephemeral
 
 ## Directory claiming service.
 EXTRA_DIST             += mount-ephemeral
 
 ## Directory claiming service.
-noinst_DATA            += userv/claim-dir
+USERV_CONFIG           += userv/claim-dir
 EXTRA_DIST             += userv/claim-dir.in
 CLEANFILES             += userv/claim-dir
 userv/claim-dir: userv/claim-dir.in Makefile
 EXTRA_DIST             += userv/claim-dir.in
 CLEANFILES             += userv/claim-dir
 userv/claim-dir: userv/claim-dir.in Makefile
@@ -181,15 +198,65 @@ userv/claim-dir: userv/claim-dir.in Makefile
                mv userv/claim-dir.new userv/claim-dir
 
 ## Configuration file.
                mv userv/claim-dir.new userv/claim-dir
 
 ## Configuration file.
+TOPLEVEL_CONFIG                += claim-dir.tab
 EXTRA_DIST             += claim-dir.tab
 
 ###--------------------------------------------------------------------------
 EXTRA_DIST             += claim-dir.tab
 
 ###--------------------------------------------------------------------------
-### Configuration snippets.
-
-dist_profile_DATA      += profile.d/00base
-dist_profile_DATA      += profile.d/02infra
-
-EXTRA_DIST             += keys.conf
+### 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.
 
 ###--------------------------------------------------------------------------
 ### Release setup.
@@ -212,6 +279,4 @@ EXTRA_DIST          += debian/distorted-keys.postinst
 
 EXTRA_DIST             += debian/claim-dir.install
 
 
 EXTRA_DIST             += debian/claim-dir.install
 
-EXTRA_DIST             += debian/admin.users debian/admin.groups
-
 ###----- That's all, folks --------------------------------------------------
 ###----- That's all, folks --------------------------------------------------