/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-24 19:29:27 UTC
  • mfrom: (505.3.9 client-network-hooks)
  • mto: This revision was merged to the branch mainline in revision 525.
  • Revision ID: belorn@fukt.bsnet.se-20111124192927-drkq3qjxu48aniri
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
OPTIMIZE=-Os
24
24
LANGUAGE=-std=gnu99
25
25
htmldir=man
26
 
version=1.5.3
 
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
264
259
        ./mandos-keygen --dir keydir --force
265
260
 
266
261
# Run the server with a local config
267
 
run-server: confdir/mandos.conf confdir/clients.conf statedir
268
 
        ./mandos --debug --no-dbus --configdir=confdir \
269
 
                --statedir=statedir $(SERVERARGS)
 
262
run-server: confdir/mandos.conf confdir/clients.conf
 
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
319
315
                > $(MANDIR)/man5/mandos.conf.5.gz
320
316
        gzip --best --to-stdout mandos-clients.conf.5 \
321
317
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
322
 
        gzip --best --to-stdout intro.8mandos \
323
 
                > $(MANDIR)/man8/intro.8mandos.gz
324
318
 
325
319
install-client-nokey: all doc
326
320
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
330
324
                install --mode=u=rwx \
331
325
                        --directory "$(CONFDIR)/plugins.d"; \
332
326
        fi
333
 
        install --mode=u=rwx,go=rx --directory \
334
 
                "$(CONFDIR)/network-hooks.d"
335
327
        install --mode=u=rwx,go=rx \
336
328
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
337
329
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \