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)" \ |
c0979a8f MW |
52 | pkgconfdir="$(pkgconfdir)" \ |
53 | pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \ | |
c122b713 MW |
54 | pkglibdir="$(pkglibdir)" \ |
55 | user="$(user)" | |
53263601 MW |
56 | |
57 | SUBST = $(AM_V_GEN)$(confsubst) | |
58 | ||
59 | ###-------------------------------------------------------------------------- | |
60 | ### Utility programs. | |
61 | ||
62 | ## Shamir secret-sharing. | |
63 | bin_SCRIPTS += shamir | |
64 | EXTRA_DIST += shamir.in | |
65 | CLEANFILES += shamir | |
66 | shamir: shamir.in Makefile | |
67 | $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \ | |
68 | chmod +x shamir.new && mv shamir.new shamir | |
69 | ||
c47f2aba MW |
70 | ## Property expansion. |
71 | bin_SCRIPTS += extract-profile | |
72 | EXTRA_DIST += extract-profile.in | |
73 | CLEANFILES += extract-profile | |
74 | extract-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 | ||
53263601 MW |
80 | ###-------------------------------------------------------------------------- |
81 | ### Main driver program and commands. | |
82 | ||
83 | ## Main driver. | |
84 | bin_SCRIPTS += keys | |
85 | EXTRA_DIST += keys.in | |
86 | CLEANFILES += keys | |
87 | keys: keys.in Makefile | |
88 | $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \ | |
89 | chmod +x keys.new && mv keys.new keys | |
90 | ||
91 | ## Utilities library. | |
92 | pkglib_DATA += keyfunc.sh | |
93 | EXTRA_DIST += keyfunc.sh.in | |
94 | CLEANFILES += keyfunc.sh | |
95 | keyfunc.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. | |
0a155096 | 100 | dist_pkglib_SCRIPTS += keys.archive |
c47f2aba MW |
101 | dist_pkglib_SCRIPTS += keys.conceal |
102 | dist_pkglib_SCRIPTS += keys.keeper-cards | |
d516ebd0 | 103 | dist_pkglib_SCRIPTS += keys.keeper-nub |
c47f2aba MW |
104 | dist_pkglib_SCRIPTS += keys.new-keeper |
105 | dist_pkglib_SCRIPTS += keys.new-recov | |
106 | dist_pkglib_SCRIPTS += keys.recover | |
107 | dist_pkglib_SCRIPTS += keys.reveal | |
108 | dist_pkglib_SCRIPTS += keys.stash | |
53263601 | 109 | |
8f2a76c1 MW |
110 | ###-------------------------------------------------------------------------- |
111 | ### Crypto operations. | |
112 | ||
113 | ## Main driver program. | |
114 | sbin_SCRIPTS += cryptop | |
115 | EXTRA_DIST += cryptop.in | |
116 | CLEANFILES += cryptop | |
117 | cryptop: cryptop.in Makefile | |
118 | $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \ | |
119 | chmod +x cryptop.new && mv cryptop.new cryptop | |
120 | ||
121 | ## Key type libraries. | |
122 | dist_pkglib_DATA += ktype.gnupg | |
c0979a8f MW |
123 | dist_profile_DATA += profile.d/01gnupg |
124 | ||
8f2a76c1 | 125 | dist_pkglib_DATA += ktype.seccure |
c0979a8f | 126 | dist_profile_DATA += profile.d/01seccure |
8f2a76c1 MW |
127 | |
128 | ## Commands. | |
129 | dist_pkglib_SCRIPTS += cryptop.genkey | |
f5673211 | 130 | dist_pkglib_SCRIPTS += cryptop.list |
8f2a76c1 MW |
131 | dist_pkglib_SCRIPTS += cryptop.delkey |
132 | dist_pkglib_SCRIPTS += cryptop.recover | |
133 | dist_pkglib_SCRIPTS += cryptop.info | |
134 | dist_pkglib_SCRIPTS += cryptop.public | |
135 | dist_pkglib_SCRIPTS += cryptop.encrypt | |
136 | dist_pkglib_SCRIPTS += cryptop.decrypt | |
137 | dist_pkglib_SCRIPTS += cryptop.sign | |
138 | dist_pkglib_SCRIPTS += cryptop.verify | |
139 | ||
c122b713 | 140 | ## Userv services configuration. |
14e6d4c9 MW |
141 | noinst_DATA += userv/distorted-keys |
142 | EXTRA_DIST += userv/distorted-keys.in | |
143 | CLEANFILES += userv/distorted-keys | |
144 | userv/distorted-keys: userv/distorted-keys.in Makefile | |
145 | $(AM_V_at)mkdir -p userv/ | |
146 | $(SUBST) $(srcdir)/userv/distorted-keys.in $(SUBSTVARS) \ | |
147 | >userv/distorted-keys.new && \ | |
148 | mv userv/distorted-keys.new userv/distorted-keys | |
c122b713 | 149 | |
c0979a8f MW |
150 | ###-------------------------------------------------------------------------- |
151 | ### Configuration snippets. | |
152 | ||
153 | dist_profile_DATA += profile.d/00base | |
154 | dist_profile_DATA += profile.d/02infra | |
155 | ||
d38dc450 MW |
156 | ###-------------------------------------------------------------------------- |
157 | ### Release setup. | |
158 | ||
159 | dist-hook:: | |
160 | echo $(VERSION) >$(distdir)/RELEASE | |
161 | ||
162 | EXTRA_DIST += config/auto-version | |
163 | ||
f012ad83 MW |
164 | ###-------------------------------------------------------------------------- |
165 | ### Debian packaging. | |
166 | ||
167 | EXTRA_DIST += debian/changelog debian/control debian/copyright | |
168 | EXTRA_DIST += debian/rules debian/compat | |
169 | ||
170 | EXTRA_DIST += debian/distorted-keys.install | |
171 | EXTRA_DIST += debian/distorted-keys.postinst | |
172 | ||
53263601 | 173 | ###----- That's all, folks -------------------------------------------------- |