Needs a configured user name, and sbindir.
sbin_SCRIPTS =
dist_pkglib_SCRIPTS =
dist_pkglib_DATA =
+noinst_DATA =
pkglib_DATA =
noinst_SCRIPTS =
SUBSTVARS = \
PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
PYTHON="$(PYTHON)" \
- bindir="$(bindir)" \
+ bindir="$(bindir)" sbindir="$(sbindir)" \
pkgconfdir="$(sysconfdir)/$(PACKAGE)" \
pkgstatedir="$(localstatedir)/$(PACKAGE)" \
- pkglibdir="$(pkglibdir)"
+ pkglibdir="$(pkglibdir)" \
+ user="$(user)"
SUBST = $(AM_V_GEN)$(confsubst)
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
+
###----- That's all, folks --------------------------------------------------
mdw_SILENT_RULES
dnl--------------------------------------------------------------------------
+dnl Other random configuration.
+
+AC_ARG_WITH([user],
+ AS_HELP_STRING([--with-user], [which user should own the archive]),
+ [user=$withval],
+ [user=keys])
+AC_SUBST([user])
+
+dnl--------------------------------------------------------------------------
dnl Python programming environment.
AC_PATH_PROG([PYTHON], [python])
--- /dev/null
+### -*-conf-*-
+###
+### userv services configuration for distorted-keys
+
+###--------------------------------------------------------------------------
+### User crypto operations.
+
+if ( glob service cryptop
+ & glob service-user @user@
+ & grep calling-user-shell /etc/shells
+ )
+ no-suppress-args
+ require-fd 0 read
+ require-fd 1-2 write
+ ignore-fd 3-
+ no-set-environment
+ execute @sbindir@/cryptop
+fi
+
+###--------------------------------------------------------------------------
+### User profile access.
+
+if ( glob service cryptop-profile
+ & grep service-user-shell /etc/shells
+ & glob calling-user @user@
+ )
+ no-suppress-args
+ null-fd 0
+ require-fd 1-2 write
+ ignore-fd 3-
+ no-set-environment
+ execute sh -c "case $# in \
+ 1) \
+ exec @bindir@/extract-profile \"$1\" \
+ @pkgconfdir@/profile.d/ \
+ .userv/cryptop-profile \
+ ;; \
+ *) \
+ echo >&2 \"usage: cryptop-profile PROFILE\"; \
+ exit 1 \
+ ;; \
+ esac" _
+fi
+
+###----- That's all, folks --------------------------------------------------