/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-14 19:10:50 UTC
  • mto: (505.3.9 client-network-hooks)
  • mto: This revision was merged to the branch mainline in revision 525.
  • Revision ID: belorn@fukt.bsnet.se-20111114191050-g11po6084bl9j5kf
replace calls to fprintf with fprintf_plus.

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
        @echo "#################################################################"
 
264
        @echo "# NOTE: Please IGNORE the error about \"Could not open file      #"
 
265
        @echo "# u'/var/run/mandos.pid'\" -  it is harmless and is caused by    #"
 
266
        @echo "# the server not running as root.  Do NOT run \"make run-server\" #"
 
267
        @echo "# server as root if you didn't also unpack and compile it thus. #"
 
268
        @echo "#################################################################"
 
269
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
270
270
 
271
271
# Used by run-server
272
272
confdir/mandos.conf: mandos.conf
277
277
        install --mode=u=rw $< $@
278
278
# Add a client password
279
279
        ./mandos-keygen --dir keydir --password >> $@
280
 
statedir:
281
 
        install --directory statedir
282
280
 
283
281
install: install-server install-client-nokey
284
282
 
289
287
 
290
288
install-server: doc
291
289
        install --directory $(CONFDIR)
292
 
        install --directory --mode=u=rwx --owner=$(USER) \
293
 
                --group=$(GROUP) $(STATEDIR)
294
290
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
295
291
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
296
292
                mandos-ctl
328
324
                install --mode=u=rwx \
329
325
                        --directory "$(CONFDIR)/plugins.d"; \
330
326
        fi
331
 
        install --mode=u=rwx,go=rx --directory \
332
 
                "$(CONFDIR)/network-hooks.d"
333
327
        install --mode=u=rwx,go=rx \
334
328
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
335
329
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \