3 ### Build script for distorted.org.uk key management
5 ### (c) 2011 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the distorted.org.uk key management suite.
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.
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.
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.
26 pkgconfdir = $(sysconfdir)/$(PACKAGE)
27 profiledir = $(pkgconfdir)/profile.d
42 ###--------------------------------------------------------------------------
43 ### Substitution of configuration data.
45 confsubst = $(top_srcdir)/config/confsubst
46 EXTRA_DIST += config/confsubst
49 PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
51 bindir="$(bindir)" sbindir="$(sbindir)" \
52 pkgconfdir="$(pkgconfdir)" \
53 pkgstatedir="$(localstatedir)/lib/$(PACKAGE)" \
54 pkglibdir="$(pkglibdir)" \
57 V_SUBST = $(V_SUBST_$V)
58 V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
59 V_SUBST_0 = @printf " SUBST %s\n" $@;
61 SUBST = $(V_SUBST)$(confsubst)
63 ###--------------------------------------------------------------------------
66 ## Shamir secret-sharing.
68 EXTRA_DIST += shamir.in
70 shamir: shamir.in Makefile
71 $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \
72 chmod +x shamir.new && mv shamir.new shamir
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
84 ###--------------------------------------------------------------------------
85 ### Main driver program and commands.
91 keys: keys.in Makefile
92 $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \
93 chmod +x keys.new && mv keys.new keys
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
104 dist_pkglib_SCRIPTS += keys.archive
105 dist_pkglib_SCRIPTS += keys.conceal
106 dist_pkglib_SCRIPTS += keys.keeper-cards
107 dist_pkglib_SCRIPTS += keys.keeper-nub
108 dist_pkglib_SCRIPTS += keys.new-keeper
109 dist_pkglib_SCRIPTS += keys.new-recov
110 dist_pkglib_SCRIPTS += keys.recover
111 dist_pkglib_SCRIPTS += keys.reveal
112 dist_pkglib_SCRIPTS += keys.stash
114 ###--------------------------------------------------------------------------
115 ### Crypto operations.
117 ## Main driver program.
118 bin_SCRIPTS += cryptop
119 EXTRA_DIST += cryptop.in
120 CLEANFILES += cryptop
121 cryptop: cryptop.in Makefile
122 $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \
123 chmod +x cryptop.new && mv cryptop.new cryptop
125 ## Key type libraries.
126 dist_pkglib_DATA += ktype.gnupg
127 dist_profile_DATA += profile.d/01gnupg
129 dist_pkglib_DATA += ktype.seccure
130 dist_profile_DATA += profile.d/01seccure
133 dist_pkglib_SCRIPTS += cryptop.genkey
134 dist_pkglib_SCRIPTS += cryptop.list
135 dist_pkglib_SCRIPTS += cryptop.delkey
136 dist_pkglib_SCRIPTS += cryptop.recover
137 dist_pkglib_SCRIPTS += cryptop.info
138 dist_pkglib_SCRIPTS += cryptop.public
139 dist_pkglib_SCRIPTS += cryptop.encrypt
140 dist_pkglib_SCRIPTS += cryptop.decrypt
141 dist_pkglib_SCRIPTS += cryptop.sign
142 dist_pkglib_SCRIPTS += cryptop.verify
144 ## Userv services configuration.
145 noinst_DATA += userv/distorted-keys
146 EXTRA_DIST += userv/distorted-keys.in
147 CLEANFILES += userv/distorted-keys
148 userv/distorted-keys: userv/distorted-keys.in Makefile
149 $(AM_V_at)mkdir -p userv/
150 $(SUBST) $(srcdir)/userv/distorted-keys.in $(SUBSTVARS) \
151 >userv/distorted-keys.new && \
152 mv userv/distorted-keys.new userv/distorted-keys
154 ###--------------------------------------------------------------------------
155 ### Configuration snippets.
157 dist_profile_DATA += profile.d/00base
158 dist_profile_DATA += profile.d/02infra
160 ###--------------------------------------------------------------------------
164 echo $(VERSION) >$(distdir)/RELEASE
166 EXTRA_DIST += config/auto-version
168 ###--------------------------------------------------------------------------
169 ### Debian packaging.
171 EXTRA_DIST += debian/changelog debian/control debian/copyright
172 EXTRA_DIST += debian/rules debian/compat
174 EXTRA_DIST += debian/distorted-keys.install
175 EXTRA_DIST += debian/distorted-keys.postinst
177 EXTRA_DIST += debian/admin.users debian/admin.groups
179 ###----- That's all, folks --------------------------------------------------