Commit | Line | Data |
---|---|---|
53263601 MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### Build script for distorted.org.uk key management | |
4 | ### | |
5 | ### (c) 2011 Mark Wooding | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
599c8f75 MW |
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 | |
53263601 MW |
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 | ### | |
599c8f75 | 17 | ### distorted-keys is distributed in the hope that it will be useful, |
53263601 MW |
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 | |
599c8f75 | 23 | ### along with distorted-keys; if not, write to the Free Software Foundation, |
53263601 MW |
24 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
25 | ||
c0979a8f MW |
26 | pkgconfdir = $(sysconfdir)/$(PACKAGE) |
27 | profiledir = $(pkgconfdir)/profile.d | |
28 | ||
53263601 | 29 | bin_SCRIPTS = |
c47f2aba | 30 | sbin_SCRIPTS = |
53263601 | 31 | dist_pkglib_SCRIPTS = |
c47f2aba | 32 | dist_pkglib_DATA = |
c122b713 | 33 | noinst_DATA = |
53263601 MW |
34 | pkglib_DATA = |
35 | noinst_SCRIPTS = | |
c0979a8f | 36 | dist_profile_DATA = |
53263601 MW |
37 | |
38 | EXTRA_DIST = | |
39 | CLEANFILES = | |
40 | DISTCLEANFILES = | |
41 | ||
42 | ###-------------------------------------------------------------------------- | |
43 | ### Substitution of configuration data. | |
44 | ||
45 | confsubst = $(top_srcdir)/config/confsubst | |
46 | EXTRA_DIST += config/confsubst | |
47 | ||
48 | SUBSTVARS = \ | |
a85aae03 | 49 | PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \ |
53263601 | 50 | PYTHON="$(PYTHON)" \ |
c122b713 | 51 | bindir="$(bindir)" sbindir="$(sbindir)" \ |
33aa94e8 | 52 | sysconfdir="$(sysconfdir)" pkgconfdir="$(pkgconfdir)" \ |
c0979a8f | 53 | pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \ |
c122b713 MW |
54 | pkglibdir="$(pkglibdir)" \ |
55 | user="$(user)" | |
53263601 | 56 | |
59d0e78e MW |
57 | V_SUBST = $(V_SUBST_$V) |
58 | V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) | |
59 | V_SUBST_0 = @printf " SUBST %s\n" $@; | |
60 | ||
61 | SUBST = $(V_SUBST)$(confsubst) | |
53263601 MW |
62 | |
63 | ###-------------------------------------------------------------------------- | |
64 | ### Utility programs. | |
65 | ||
66 | ## Shamir secret-sharing. | |
67 | bin_SCRIPTS += shamir | |
68 | EXTRA_DIST += shamir.in | |
69 | CLEANFILES += shamir | |
70 | shamir: shamir.in Makefile | |
71 | $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \ | |
72 | chmod +x shamir.new && mv shamir.new shamir | |
73 | ||
c47f2aba MW |
74 | ## Property expansion. |
75 | bin_SCRIPTS += extract-profile | |
76 | EXTRA_DIST += extract-profile.in | |
77 | CLEANFILES += extract-profile | |
78 | extract-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 | ###-------------------------------------------------------------------------- | |
53263601 MW |
85 | ### Main driver program and commands. |
86 | ||
87 | ## Main driver. | |
4c8c4065 | 88 | sbin_SCRIPTS += keys |
53263601 MW |
89 | EXTRA_DIST += keys.in |
90 | CLEANFILES += keys | |
91 | keys: keys.in Makefile | |
92 | $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \ | |
93 | chmod +x keys.new && mv keys.new keys | |
94 | ||
95 | ## Utilities library. | |
96 | pkglib_DATA += keyfunc.sh | |
97 | EXTRA_DIST += keyfunc.sh.in | |
98 | CLEANFILES += keyfunc.sh | |
99 | keyfunc.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. | |
c47f2aba MW |
104 | dist_pkglib_SCRIPTS += keys.conceal |
105 | dist_pkglib_SCRIPTS += keys.keeper-cards | |
d516ebd0 | 106 | dist_pkglib_SCRIPTS += keys.keeper-nub |
2235222b MW |
107 | dist_pkglib_SCRIPTS += keys.list-keepers |
108 | dist_pkglib_SCRIPTS += keys.list-recov | |
c47f2aba MW |
109 | dist_pkglib_SCRIPTS += keys.new-keeper |
110 | dist_pkglib_SCRIPTS += keys.new-recov | |
111 | dist_pkglib_SCRIPTS += keys.recover | |
112 | dist_pkglib_SCRIPTS += keys.reveal | |
113 | dist_pkglib_SCRIPTS += keys.stash | |
53263601 | 114 | |
8f2a76c1 MW |
115 | ###-------------------------------------------------------------------------- |
116 | ### Crypto operations. | |
117 | ||
118 | ## Main driver program. | |
4c8c4065 | 119 | bin_SCRIPTS += cryptop |
8f2a76c1 MW |
120 | EXTRA_DIST += cryptop.in |
121 | CLEANFILES += cryptop | |
122 | cryptop: 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. | |
127 | dist_pkglib_DATA += ktype.gnupg | |
c0979a8f MW |
128 | dist_profile_DATA += profile.d/01gnupg |
129 | ||
8f2a76c1 | 130 | dist_pkglib_DATA += ktype.seccure |
c0979a8f | 131 | dist_profile_DATA += profile.d/01seccure |
8f2a76c1 MW |
132 | |
133 | ## Commands. | |
410343d6 | 134 | dist_pkglib_SCRIPTS += cryptop.archive |
8f2a76c1 | 135 | dist_pkglib_SCRIPTS += cryptop.genkey |
f5673211 | 136 | dist_pkglib_SCRIPTS += cryptop.list |
8f2a76c1 MW |
137 | dist_pkglib_SCRIPTS += cryptop.delkey |
138 | dist_pkglib_SCRIPTS += cryptop.recover | |
139 | dist_pkglib_SCRIPTS += cryptop.info | |
140 | dist_pkglib_SCRIPTS += cryptop.public | |
141 | dist_pkglib_SCRIPTS += cryptop.encrypt | |
142 | dist_pkglib_SCRIPTS += cryptop.decrypt | |
143 | dist_pkglib_SCRIPTS += cryptop.sign | |
144 | dist_pkglib_SCRIPTS += cryptop.verify | |
145 | ||
c122b713 | 146 | ## Userv services configuration. |
14e6d4c9 MW |
147 | noinst_DATA += userv/distorted-keys |
148 | EXTRA_DIST += userv/distorted-keys.in | |
149 | CLEANFILES += userv/distorted-keys | |
150 | userv/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 | |
c122b713 | 155 | |
c0979a8f | 156 | ###-------------------------------------------------------------------------- |
b8691d14 MW |
157 | ### Standalone operations on public keys. |
158 | ||
159 | bin_SCRIPTS += pubkeyop | |
160 | EXTRA_DIST += pubkeyop.in | |
161 | CLEANFILES += pubkeyop | |
162 | pubkeyop: pubkeyop.in Makefile | |
163 | $(SUBST) $(srcdir)/pubkeyop.in $(SUBSTVARS) >pubkeyop.new && \ | |
164 | chmod +x pubkeyop.new && mv pubkeyop.new pubkeyop | |
165 | ||
166 | ###-------------------------------------------------------------------------- | |
33aa94e8 MW |
167 | ### Secure storage management. |
168 | ||
169 | ## Ephemeral filesystem construction. | |
170 | sbin_SCRIPTS += mount-ephemeral | |
171 | EXTRA_DIST += mount-ephemeral | |
172 | ||
173 | ## Directory claiming service. | |
174 | noinst_DATA += userv/claim-dir | |
175 | EXTRA_DIST += userv/claim-dir.in | |
176 | CLEANFILES += userv/claim-dir | |
177 | userv/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. | |
184 | EXTRA_DIST += claim-dir.tab | |
185 | ||
186 | ###-------------------------------------------------------------------------- | |
c0979a8f MW |
187 | ### Configuration snippets. |
188 | ||
189 | dist_profile_DATA += profile.d/00base | |
190 | dist_profile_DATA += profile.d/02infra | |
191 | ||
125f634c MW |
192 | EXTRA_DIST += keys.conf |
193 | ||
d38dc450 MW |
194 | ###-------------------------------------------------------------------------- |
195 | ### Release setup. | |
196 | ||
197 | dist-hook:: | |
198 | echo $(VERSION) >$(distdir)/RELEASE | |
199 | ||
200 | EXTRA_DIST += config/auto-version | |
201 | ||
f012ad83 MW |
202 | ###-------------------------------------------------------------------------- |
203 | ### Debian packaging. | |
204 | ||
205 | EXTRA_DIST += debian/changelog debian/control debian/copyright | |
206 | EXTRA_DIST += debian/rules debian/compat | |
207 | ||
315ad13e MW |
208 | EXTRA_DIST += debian/distorted-keys-base.install |
209 | ||
f012ad83 MW |
210 | EXTRA_DIST += debian/distorted-keys.install |
211 | EXTRA_DIST += debian/distorted-keys.postinst | |
212 | ||
33aa94e8 MW |
213 | EXTRA_DIST += debian/claim-dir.install |
214 | ||
4c8c4065 MW |
215 | EXTRA_DIST += debian/admin.users debian/admin.groups |
216 | ||
53263601 | 217 | ###----- That's all, folks -------------------------------------------------- |