chiark / gitweb /
pubkeyop.in: New script for doing stuff with public keys.
[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 sysconfdir="$(sysconfdir)" pkgconfdir="$(pkgconfdir)" \
53 pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
54 pkglibdir="$(pkglibdir)" \
55 user="$(user)"
56
57V_SUBST = $(V_SUBST_$V)
58V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
59V_SUBST_0 = @printf " SUBST %s\n" $@;
60
61SUBST = $(V_SUBST)$(confsubst)
62
63###--------------------------------------------------------------------------
64### Utility programs.
65
66## Shamir secret-sharing.
67bin_SCRIPTS += shamir
68EXTRA_DIST += shamir.in
69CLEANFILES += shamir
70shamir: shamir.in Makefile
71 $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \
72 chmod +x shamir.new && mv shamir.new shamir
73
74## Property expansion.
75bin_SCRIPTS += extract-profile
76EXTRA_DIST += extract-profile.in
77CLEANFILES += extract-profile
78extract-profile: extract-profile.in Makefile
79 $(SUBST) $(srcdir)/extract-profile.in $(SUBSTVARS) \
80 >extract-profile.new && \
81 chmod +x extract-profile.new && \
82 mv extract-profile.new extract-profile
83
84###--------------------------------------------------------------------------
85### Main driver program and commands.
86
87## Main driver.
88sbin_SCRIPTS += keys
89EXTRA_DIST += keys.in
90CLEANFILES += keys
91keys: keys.in Makefile
92 $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \
93 chmod +x keys.new && mv keys.new keys
94
95## Utilities library.
96pkglib_DATA += keyfunc.sh
97EXTRA_DIST += keyfunc.sh.in
98CLEANFILES += keyfunc.sh
99keyfunc.sh: keyfunc.sh.in Makefile
100 $(SUBST) $(srcdir)/keyfunc.sh.in $(SUBSTVARS) >keyfunc.sh.new && \
101 mv keyfunc.sh.new keyfunc.sh
102
103## Commands.
104dist_pkglib_SCRIPTS += keys.conceal
105dist_pkglib_SCRIPTS += keys.keeper-cards
106dist_pkglib_SCRIPTS += keys.keeper-nub
107dist_pkglib_SCRIPTS += keys.list-keepers
108dist_pkglib_SCRIPTS += keys.list-recov
109dist_pkglib_SCRIPTS += keys.new-keeper
110dist_pkglib_SCRIPTS += keys.new-recov
111dist_pkglib_SCRIPTS += keys.recover
112dist_pkglib_SCRIPTS += keys.reveal
113dist_pkglib_SCRIPTS += keys.stash
114
115###--------------------------------------------------------------------------
116### Crypto operations.
117
118## Main driver program.
119bin_SCRIPTS += cryptop
120EXTRA_DIST += cryptop.in
121CLEANFILES += cryptop
122cryptop: cryptop.in Makefile
123 $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \
124 chmod +x cryptop.new && mv cryptop.new cryptop
125
126## Key type libraries.
127dist_pkglib_DATA += ktype.gnupg
128dist_profile_DATA += profile.d/01gnupg
129
130dist_pkglib_DATA += ktype.seccure
131dist_profile_DATA += profile.d/01seccure
132
133## Commands.
134dist_pkglib_SCRIPTS += cryptop.archive
135dist_pkglib_SCRIPTS += cryptop.genkey
136dist_pkglib_SCRIPTS += cryptop.list
137dist_pkglib_SCRIPTS += cryptop.delkey
138dist_pkglib_SCRIPTS += cryptop.recover
139dist_pkglib_SCRIPTS += cryptop.info
140dist_pkglib_SCRIPTS += cryptop.public
141dist_pkglib_SCRIPTS += cryptop.encrypt
142dist_pkglib_SCRIPTS += cryptop.decrypt
143dist_pkglib_SCRIPTS += cryptop.sign
144dist_pkglib_SCRIPTS += cryptop.verify
145
146## Userv services configuration.
147noinst_DATA += userv/distorted-keys
148EXTRA_DIST += userv/distorted-keys.in
149CLEANFILES += userv/distorted-keys
150userv/distorted-keys: userv/distorted-keys.in Makefile
151 $(AM_V_at)mkdir -p userv/
152 $(SUBST) $(srcdir)/userv/distorted-keys.in $(SUBSTVARS) \
153 >userv/distorted-keys.new && \
154 mv userv/distorted-keys.new userv/distorted-keys
155
156###--------------------------------------------------------------------------
157### Standalone operations on public keys.
158
159bin_SCRIPTS += pubkeyop
160EXTRA_DIST += pubkeyop.in
161CLEANFILES += pubkeyop
162pubkeyop: pubkeyop.in Makefile
163 $(SUBST) $(srcdir)/pubkeyop.in $(SUBSTVARS) >pubkeyop.new && \
164 chmod +x pubkeyop.new && mv pubkeyop.new pubkeyop
165
166###--------------------------------------------------------------------------
167### Secure storage management.
168
169## Ephemeral filesystem construction.
170sbin_SCRIPTS += mount-ephemeral
171EXTRA_DIST += mount-ephemeral
172
173## Directory claiming service.
174noinst_DATA += userv/claim-dir
175EXTRA_DIST += userv/claim-dir.in
176CLEANFILES += userv/claim-dir
177userv/claim-dir: userv/claim-dir.in Makefile
178 $(AM_V_at)mkdir -p userv/
179 $(SUBST) $(srcdir)/userv/claim-dir.in $(SUBSTVARS) \
180 >userv/claim-dir.new && \
181 mv userv/claim-dir.new userv/claim-dir
182
183## Configuration file.
184EXTRA_DIST += claim-dir.tab
185
186###--------------------------------------------------------------------------
187### Configuration snippets.
188
189dist_profile_DATA += profile.d/00base
190dist_profile_DATA += profile.d/02infra
191
192EXTRA_DIST += keys.conf
193
194###--------------------------------------------------------------------------
195### Release setup.
196
197dist-hook::
198 echo $(VERSION) >$(distdir)/RELEASE
199
200EXTRA_DIST += config/auto-version
201
202###--------------------------------------------------------------------------
203### Debian packaging.
204
205EXTRA_DIST += debian/changelog debian/control debian/copyright
206EXTRA_DIST += debian/rules debian/compat
207
208EXTRA_DIST += debian/distorted-keys.install
209EXTRA_DIST += debian/distorted-keys.postinst
210
211EXTRA_DIST += debian/claim-dir.install
212
213EXTRA_DIST += debian/admin.users debian/admin.groups
214
215###----- That's all, folks --------------------------------------------------