/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2008-09-05 08:38:30 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080905083830-6y9v2rb2us0m45kn
* Makefile (PIDDIR, USER, GROUP): New variables.
  (install-server): Create $(PIDDIR).  Copy "init.d-mandos" and
                    "default-mandos" into place.  Install init script
                    using "update-rc.d".
  (uninstall-server): Remove links to init script using "update-rc.d".
  (purge-server): Remove /etc/init.d/mandos and /etc/default/mandos.

* default-mandos: New file.  Will install as "/etc/default/mandos".
* init.d-mandos:            - '' -           "/etc/init.d/mandos".

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
KEYDIR=$(DESTDIR)/etc/keys/mandos
22
22
# MANDIR=/usr/local/man
23
23
MANDIR=$(DESTDIR)/usr/share/man
 
24
PIDDIR=/var/run/mandos
 
25
USER=nobody
 
26
GROUP=nogroup
24
27
 
25
28
GNUTLS_CFLAGS=$(shell libgnutls-config --cflags)
26
29
GNUTLS_LIBS=$(shell libgnutls-config --libs)
135
138
install-server: doc
136
139
        install --directory $(CONFDIR) $(MANDIR)/man5 \
137
140
                $(MANDIR)/man8
 
141
        install --mode=u=rwx,go=rx --owner=$(USER) --group=$(GROUP) \
 
142
                --directory $(PIDDIR)
138
143
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
139
 
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) mandos.conf
 
144
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
 
145
                mandos.conf
140
146
        install --mode=u=rw,g=r --target-directory=$(CONFDIR) \
141
147
                clients.conf
 
148
        install --mode=u=rwx,go=rx init.d-mandos /etc/init.d/mandos
 
149
        install --mode=u=rw,go=r default-mandos /etc/default/mandos
 
150
        update-rc.d mandos defaults
142
151
        gzip --best --to-stdout mandos.8 \
143
152
                > $(MANDIR)/man8/mandos.8.gz
144
153
        gzip --best --to-stdout mandos.conf.5 \
150
159
        install --directory $(PREFIX)/lib/mandos $(CONFDIR) \
151
160
                $(MANDIR)/man8
152
161
        install --directory --mode=u=rwx $(KEYDIR)
153
 
        install --directory --mode=u=rwx $(PREFIX)/lib/mandos/plugins.d
 
162
        install --directory --mode=u=rwx \
 
163
                $(PREFIX)/lib/mandos/plugins.d
154
164
        if [ "$(CONFDIR)/plugins.d" \
155
165
                        != "$(PREFIX)/lib/mandos/plugins.d" ]; then \
156
166
                        install --directory "$(CONFDIR)/plugins.d"; \
157
167
                fi
158
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/lib/mandos \
159
 
                plugin-runner
 
168
        install --mode=u=rwx,go=rx \
 
169
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
160
170
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
161
171
                mandos-keygen
162
172
        install --mode=u=rwx,go=rx \
194
204
                $(MANDIR)/man8/mandos.8.gz \
195
205
                $(MANDIR)/man5/mandos.conf.5.gz \
196
206
                $(MANDIR)/man5/mandos-clients.conf.5.gz
197
 
        -rmdir $(CONFDIR)
 
207
        update-rc.d -f mandos remove
 
208
        -rmdir $(CONFDIR) $(PIDDIR)
198
209
 
199
210
uninstall-client:
200
211
# Refuse to uninstall client if /etc/crypttab is explicitly configured
218
229
purge: purge-server purge-client
219
230
 
220
231
purge-server: uninstall-server
221
 
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf
 
232
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
 
233
                /etc/default/mandos /etc/init.d/mandos
222
234
        -rmdir $(CONFDIR)
223
235
 
224
236
purge-client: uninstall-client