chiark / gitweb /
Makefile.am: Distinctive `SUBST' indicator for `confsubst' rules.
[distorted-keys] / Makefile.am
CommitLineData
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
26pkgconfdir = $(sysconfdir)/$(PACKAGE)
27profiledir = $(pkgconfdir)/profile.d
28
53263601 29bin_SCRIPTS =
c47f2aba 30sbin_SCRIPTS =
53263601 31dist_pkglib_SCRIPTS =
c47f2aba 32dist_pkglib_DATA =
c122b713 33noinst_DATA =
53263601
MW
34pkglib_DATA =
35noinst_SCRIPTS =
c0979a8f 36dist_profile_DATA =
53263601
MW
37
38EXTRA_DIST =
39CLEANFILES =
40DISTCLEANFILES =
41
42###--------------------------------------------------------------------------
43### Substitution of configuration data.
44
45confsubst = $(top_srcdir)/config/confsubst
46EXTRA_DIST += config/confsubst
47
48SUBSTVARS = \
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 56
59d0e78e
MW
57V_SUBST = $(V_SUBST_$V)
58V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
59V_SUBST_0 = @printf " SUBST %s\n" $@;
60
61SUBST = $(V_SUBST)$(confsubst)
53263601
MW
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
c47f2aba
MW
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###--------------------------------------------------------------------------
53263601
MW
85### Main driver program and commands.
86
87## Main driver.
4c8c4065 88sbin_SCRIPTS += keys
53263601
MW
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.
0a155096 104dist_pkglib_SCRIPTS += keys.archive
c47f2aba
MW
105dist_pkglib_SCRIPTS += keys.conceal
106dist_pkglib_SCRIPTS += keys.keeper-cards
d516ebd0 107dist_pkglib_SCRIPTS += keys.keeper-nub
c47f2aba
MW
108dist_pkglib_SCRIPTS += keys.new-keeper
109dist_pkglib_SCRIPTS += keys.new-recov
110dist_pkglib_SCRIPTS += keys.recover
111dist_pkglib_SCRIPTS += keys.reveal
112dist_pkglib_SCRIPTS += keys.stash
53263601 113
8f2a76c1
MW
114###--------------------------------------------------------------------------
115### Crypto operations.
116
117## Main driver program.
4c8c4065 118bin_SCRIPTS += cryptop
8f2a76c1
MW
119EXTRA_DIST += cryptop.in
120CLEANFILES += cryptop
121cryptop: cryptop.in Makefile
122 $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \
123 chmod +x cryptop.new && mv cryptop.new cryptop
124
125## Key type libraries.
126dist_pkglib_DATA += ktype.gnupg
c0979a8f
MW
127dist_profile_DATA += profile.d/01gnupg
128
8f2a76c1 129dist_pkglib_DATA += ktype.seccure
c0979a8f 130dist_profile_DATA += profile.d/01seccure
8f2a76c1
MW
131
132## Commands.
133dist_pkglib_SCRIPTS += cryptop.genkey
f5673211 134dist_pkglib_SCRIPTS += cryptop.list
8f2a76c1
MW
135dist_pkglib_SCRIPTS += cryptop.delkey
136dist_pkglib_SCRIPTS += cryptop.recover
137dist_pkglib_SCRIPTS += cryptop.info
138dist_pkglib_SCRIPTS += cryptop.public
139dist_pkglib_SCRIPTS += cryptop.encrypt
140dist_pkglib_SCRIPTS += cryptop.decrypt
141dist_pkglib_SCRIPTS += cryptop.sign
142dist_pkglib_SCRIPTS += cryptop.verify
143
c122b713 144## Userv services configuration.
14e6d4c9
MW
145noinst_DATA += userv/distorted-keys
146EXTRA_DIST += userv/distorted-keys.in
147CLEANFILES += userv/distorted-keys
148userv/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
c122b713 153
c0979a8f
MW
154###--------------------------------------------------------------------------
155### Configuration snippets.
156
157dist_profile_DATA += profile.d/00base
158dist_profile_DATA += profile.d/02infra
159
d38dc450
MW
160###--------------------------------------------------------------------------
161### Release setup.
162
163dist-hook::
164 echo $(VERSION) >$(distdir)/RELEASE
165
166EXTRA_DIST += config/auto-version
167
f012ad83
MW
168###--------------------------------------------------------------------------
169### Debian packaging.
170
171EXTRA_DIST += debian/changelog debian/control debian/copyright
172EXTRA_DIST += debian/rules debian/compat
173
174EXTRA_DIST += debian/distorted-keys.install
175EXTRA_DIST += debian/distorted-keys.postinst
176
4c8c4065
MW
177EXTRA_DIST += debian/admin.users debian/admin.groups
178
53263601 179###----- That's all, folks --------------------------------------------------