/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: Björn Påhlsson
  • Date: 2011-11-09 17:16:03 UTC
  • mfrom: (518.1.1 mandos-persistent)
  • Revision ID: belorn@fukt.bsnet.se-20111109171603-srz21uoclpldp5ve
merge persistent state

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
version=1.4.1
27
27
SED=sed
28
28
 
29
 
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
30
 
GROUP=$(firstword $(subst :, ,$(shell getent group _mandos || getent group nobody || echo 65534)))
31
 
 
32
29
## Use these settings for a traditional /usr/local install
33
30
# PREFIX=$(DESTDIR)/usr/local
34
31
# CONFDIR=$(DESTDIR)/etc/mandos
35
32
# KEYDIR=$(DESTDIR)/etc/mandos/keys
36
33
# MANDIR=$(PREFIX)/man
37
34
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
38
 
# STATEDIR=$(DESTDIR)/var/lib/mandos
39
35
##
40
36
 
41
37
## These settings are for a package-type install
44
40
KEYDIR=$(DESTDIR)/etc/keys/mandos
45
41
MANDIR=$(PREFIX)/share/man
46
42
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
47
 
STATEDIR=$(DESTDIR)/var/lib/mandos
48
43
##
49
44
 
50
45
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
235
230
distclean: clean
236
231
mostlyclean: clean
237
232
maintainer-clean: clean
238
 
        -rm --force --recursive keydir confdir statedir
 
233
        -rm --force --recursive keydir confdir
239
234
 
240
235
check:  all
241
236
        ./mandos --check
255
250
        @echo "###################################################################"
256
251
        ./plugin-runner --plugin-dir=plugins.d \
257
252
                --config-file=plugin-runner.conf \
258
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
 
253
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
259
254
                $(CLIENTARGS)
260
255
 
261
256
# Used by run-client
265
260
 
266
261
# Run the server with a local config
267
262
run-server: confdir/mandos.conf confdir/clients.conf
268
 
        ./mandos --debug --no-dbus --configdir=confdir \
269
 
                --statedir=statedir $(SERVERARGS)
 
263
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
270
264
 
271
265
# Used by run-server
272
266
confdir/mandos.conf: mandos.conf
277
271
        install --mode=u=rw $< $@
278
272
# Add a client password
279
273
        ./mandos-keygen --dir keydir --password >> $@
280
 
statedir:
281
 
        install --directory statedir
282
274
 
283
275
install: install-server install-client-nokey
284
276
 
289
281
 
290
282
install-server: doc
291
283
        install --directory $(CONFDIR)
292
 
        install --directory --mode=u=rwx --owner=$(USER) \
293
 
                --group=$(GROUP) $(STATEDIR)
294
284
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
295
285
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
296
286
                mandos-ctl
328
318
                install --mode=u=rwx \
329
319
                        --directory "$(CONFDIR)/plugins.d"; \
330
320
        fi
331
 
        install --mode=u=rwx,go=rx --directory \
332
 
                "$(CONFDIR)/network-hooks.d"
333
321
        install --mode=u=rwx,go=rx \
334
322
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
335
323
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \