chiark / gitweb /
profile.d/*: Base configuration files.
[distorted-keys] / Makefile.am
... / ...
CommitLineData
1### -*-makefile-*-
2###
3### Build script for distorted.org.uk key management
4###
5### (c) 2011 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the distorted.org.uk key management suite.
11###
12### distorted-keys is free software; you can redistribute it and/or modify
13### it under the terms of the GNU General Public License as published by
14### the Free Software Foundation; either version 2 of the License, or
15### (at your option) any later version.
16###
17### distorted-keys is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU General Public License for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with distorted-keys; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26pkgconfdir = $(sysconfdir)/$(PACKAGE)
27profiledir = $(pkgconfdir)/profile.d
28
29bin_SCRIPTS =
30sbin_SCRIPTS =
31dist_pkglib_SCRIPTS =
32dist_pkglib_DATA =
33noinst_DATA =
34pkglib_DATA =
35noinst_SCRIPTS =
36dist_profile_DATA =
37
38EXTRA_DIST =
39CLEANFILES =
40DISTCLEANFILES =
41
42###--------------------------------------------------------------------------
43### Substitution of configuration data.
44
45confsubst = $(top_srcdir)/config/confsubst
46EXTRA_DIST += config/confsubst
47
48SUBSTVARS = \
49 PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
50 PYTHON="$(PYTHON)" \
51 bindir="$(bindir)" sbindir="$(sbindir)" \
52 pkgconfdir="$(pkgconfdir)" \
53 pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
54 pkglibdir="$(pkglibdir)" \
55 user="$(user)"
56
57SUBST = $(AM_V_GEN)$(confsubst)
58
59###--------------------------------------------------------------------------
60### Utility programs.
61
62## Shamir secret-sharing.
63bin_SCRIPTS += shamir
64EXTRA_DIST += shamir.in
65CLEANFILES += shamir
66shamir: shamir.in Makefile
67 $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \
68 chmod +x shamir.new && mv shamir.new shamir
69
70## Property expansion.
71bin_SCRIPTS += extract-profile
72EXTRA_DIST += extract-profile.in
73CLEANFILES += extract-profile
74extract-profile: extract-profile.in Makefile
75 $(SUBST) $(srcdir)/extract-profile.in $(SUBSTVARS) \
76 >extract-profile.new && \
77 chmod +x extract-profile.new && \
78 mv extract-profile.new extract-profile
79
80###--------------------------------------------------------------------------
81### Main driver program and commands.
82
83## Main driver.
84bin_SCRIPTS += keys
85EXTRA_DIST += keys.in
86CLEANFILES += keys
87keys: keys.in Makefile
88 $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \
89 chmod +x keys.new && mv keys.new keys
90
91## Utilities library.
92pkglib_DATA += keyfunc.sh
93EXTRA_DIST += keyfunc.sh.in
94CLEANFILES += keyfunc.sh
95keyfunc.sh: keyfunc.sh.in Makefile
96 $(SUBST) $(srcdir)/keyfunc.sh.in $(SUBSTVARS) >keyfunc.sh.new && \
97 mv keyfunc.sh.new keyfunc.sh
98
99## Commands.
100dist_pkglib_SCRIPTS += keys.archive
101dist_pkglib_SCRIPTS += keys.conceal
102dist_pkglib_SCRIPTS += keys.keeper-cards
103dist_pkglib_SCRIPTS += keys.new-keeper
104dist_pkglib_SCRIPTS += keys.new-recov
105dist_pkglib_SCRIPTS += keys.recover
106dist_pkglib_SCRIPTS += keys.reveal
107dist_pkglib_SCRIPTS += keys.stash
108
109###--------------------------------------------------------------------------
110### Crypto operations.
111
112## Main driver program.
113sbin_SCRIPTS += cryptop
114EXTRA_DIST += cryptop.in
115CLEANFILES += cryptop
116cryptop: cryptop.in Makefile
117 $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \
118 chmod +x cryptop.new && mv cryptop.new cryptop
119
120## Key type libraries.
121dist_pkglib_DATA += ktype.gnupg
122dist_profile_DATA += profile.d/01gnupg
123
124dist_pkglib_DATA += ktype.seccure
125dist_profile_DATA += profile.d/01seccure
126
127## Commands.
128dist_pkglib_SCRIPTS += cryptop.genkey
129dist_pkglib_SCRIPTS += cryptop.list
130dist_pkglib_SCRIPTS += cryptop.delkey
131dist_pkglib_SCRIPTS += cryptop.recover
132dist_pkglib_SCRIPTS += cryptop.info
133dist_pkglib_SCRIPTS += cryptop.public
134dist_pkglib_SCRIPTS += cryptop.encrypt
135dist_pkglib_SCRIPTS += cryptop.decrypt
136dist_pkglib_SCRIPTS += cryptop.sign
137dist_pkglib_SCRIPTS += cryptop.verify
138
139## Userv services configuration.
140noinst_DATA += userv/distorted-keys
141EXTRA_DIST += userv/distorted-keys.in
142CLEANFILES += userv/distorted-keys
143userv/distorted-keys: userv/distorted-keys.in Makefile
144 $(AM_V_at)mkdir -p userv/
145 $(SUBST) $(srcdir)/userv/distorted-keys.in $(SUBSTVARS) \
146 >userv/distorted-keys.new && \
147 mv userv/distorted-keys.new userv/distorted-keys
148
149###--------------------------------------------------------------------------
150### Configuration snippets.
151
152dist_profile_DATA += profile.d/00base
153dist_profile_DATA += profile.d/02infra
154
155###----- That's all, folks --------------------------------------------------