chiark / gitweb /
3566e3a692c17d09d3fd1a09f594d3080e5470af
[distorted-keys] / Makefile.am
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
26 bin_SCRIPTS              =
27 sbin_SCRIPTS             =
28 dist_pkglib_SCRIPTS      =
29 dist_pkglib_DATA         =
30 noinst_DATA              =
31 pkglib_DATA              =
32 noinst_SCRIPTS           =
33
34 EXTRA_DIST               =
35 CLEANFILES               =
36 DISTCLEANFILES           =
37
38 ###--------------------------------------------------------------------------
39 ### Substitution of configuration data.
40
41 confsubst = $(top_srcdir)/config/confsubst
42 EXTRA_DIST              += config/confsubst
43
44 SUBSTVARS = \
45         PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
46         PYTHON="$(PYTHON)" \
47         bindir="$(bindir)" sbindir="$(sbindir)" \
48         pkgconfdir="$(sysconfdir)/$(PACKAGE)" \
49         pkgstatedir="$(localstatedir)/$(PACKAGE)" \
50         pkglibdir="$(pkglibdir)" \
51         user="$(user)"
52
53 SUBST = $(AM_V_GEN)$(confsubst)
54
55 ###--------------------------------------------------------------------------
56 ### Utility programs.
57
58 ## Shamir secret-sharing.
59 bin_SCRIPTS             += shamir
60 EXTRA_DIST              += shamir.in
61 CLEANFILES              += shamir
62 shamir: shamir.in Makefile
63         $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \
64                 chmod +x shamir.new && mv shamir.new shamir
65
66 ## Property expansion.
67 bin_SCRIPTS             += extract-profile
68 EXTRA_DIST              += extract-profile.in
69 CLEANFILES              += extract-profile
70 extract-profile: extract-profile.in Makefile
71         $(SUBST) $(srcdir)/extract-profile.in $(SUBSTVARS) \
72                         >extract-profile.new && \
73                 chmod +x extract-profile.new && \
74                 mv extract-profile.new extract-profile
75
76 ###--------------------------------------------------------------------------
77 ### Main driver program and commands.
78
79 ## Main driver.
80 bin_SCRIPTS             += keys
81 EXTRA_DIST              += keys.in
82 CLEANFILES              += keys
83 keys: keys.in Makefile
84         $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \
85                 chmod +x keys.new && mv keys.new keys
86
87 ## Utilities library.
88 pkglib_DATA             += keyfunc.sh
89 EXTRA_DIST              += keyfunc.sh.in
90 CLEANFILES              += keyfunc.sh
91 keyfunc.sh: keyfunc.sh.in Makefile
92         $(SUBST) $(srcdir)/keyfunc.sh.in $(SUBSTVARS) >keyfunc.sh.new && \
93                 mv keyfunc.sh.new keyfunc.sh
94
95 ## Commands.
96 dist_pkglib_SCRIPTS     += keys.conceal
97 dist_pkglib_SCRIPTS     += keys.keeper-cards
98 dist_pkglib_SCRIPTS     += keys.new-keeper
99 dist_pkglib_SCRIPTS     += keys.new-recov
100 dist_pkglib_SCRIPTS     += keys.recover
101 dist_pkglib_SCRIPTS     += keys.reveal
102 dist_pkglib_SCRIPTS     += keys.stash
103
104 ###--------------------------------------------------------------------------
105 ### Crypto operations.
106
107 ## Main driver program.
108 sbin_SCRIPTS            += cryptop
109 EXTRA_DIST              += cryptop.in
110 CLEANFILES              += cryptop
111 cryptop: cryptop.in Makefile
112         $(SUBST) $(srcdir)/cryptop.in $(SUBSTVARS) >cryptop.new && \
113                 chmod +x cryptop.new && mv cryptop.new cryptop
114
115 ## Key type libraries.
116 dist_pkglib_DATA        += ktype.gnupg
117 dist_pkglib_DATA        += ktype.seccure
118
119 ## Commands.
120 dist_pkglib_SCRIPTS     += cryptop.genkey
121 dist_pkglib_SCRIPTS     += cryptop.delkey
122 dist_pkglib_SCRIPTS     += cryptop.recover
123 dist_pkglib_SCRIPTS     += cryptop.info
124 dist_pkglib_SCRIPTS     += cryptop.public
125 dist_pkglib_SCRIPTS     += cryptop.encrypt
126 dist_pkglib_SCRIPTS     += cryptop.decrypt
127 dist_pkglib_SCRIPTS     += cryptop.sign
128 dist_pkglib_SCRIPTS     += cryptop.verify
129
130 ## Userv services configuration.
131 noinst_DATA             += distorted-keys.userv
132 EXTRA_DIST              += distorted-keys.userv.in
133 CLEANFILES              += distorted-keys.userv
134 distorted-keys.userv: distorted-keys.userv.in Makefile
135         $(SUBST) $(srcdir)/distorted-keys.userv.in $(SUBSTVARS) \
136                         >distorted-keys.userv.new && \
137                 mv distorted-keys.userv.new distorted-keys.userv
138
139 ###----- That's all, folks --------------------------------------------------