/mandos/release

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

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: teddy at recompile
  • Date: 2020-11-30 16:19:48 UTC
  • mto: This revision was merged to the branch mainline in revision 402.
  • Revision ID: teddy@recompile.se-20201130161948-jozzftghviuvk7kb
Fix debconf template syntax
  
* debian/mandos-client.templates: Rename "_description" header to
  "_Description".

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
LANGUAGE:=-std=gnu11
44
44
FEATURES:=-D_FILE_OFFSET_BITS=64
45
45
htmldir:=man
46
 
version:=1.8.9
 
46
version:=1.8.12
47
47
SED:=sed
48
48
PKG_CONFIG?=pkg-config
49
49
 
156
156
 
157
157
objects:=$(addsuffix .o,$(CPROGS))
158
158
 
 
159
.PHONY: all
159
160
all: $(PROGS) mandos.lsm
160
161
 
 
162
.PHONY: doc
161
163
doc: $(DOCS)
162
164
 
 
165
.PHONY: html
163
166
html: $(htmldocs)
164
167
 
165
168
%.5: %.xml common.ent legalnotice.xml
295
298
dracut-module/password-agent: CFLAGS += $(GLIB_CFLAGS)
296
299
dracut-module/password-agent: LDLIBS += $(GLIB_LIBS) -lpthread
297
300
 
298
 
.PHONY : all doc html clean distclean mostlyclean maintainer-clean \
299
 
        check run-client run-server install install-html \
300
 
        install-server install-client-nokey install-client uninstall \
301
 
        uninstall-server uninstall-client purge purge-server \
302
 
        purge-client
303
 
 
 
301
.PHONY: clean
304
302
clean:
305
303
        -rm --force $(CPROGS) $(objects) $(htmldocs) $(DOCS) core
306
304
 
 
305
.PHONY: distclean
307
306
distclean: clean
 
307
.PHONY: mostlyclean
308
308
mostlyclean: clean
 
309
.PHONY: maintainer-clean
309
310
maintainer-clean: clean
310
311
        -rm --force --recursive keydir confdir statedir
311
312
 
 
313
.PHONY: check
312
314
check: all
313
315
        ./mandos --check
314
316
        ./mandos-ctl --check
318
320
        ./dracut-module/password-agent --test
319
321
 
320
322
# Run the client with a local config and key
 
323
.PHONY: run-client
321
324
run-client: all keydir/seckey.txt keydir/pubkey.txt \
322
325
                        keydir/tls-privkey.pem keydir/tls-pubkey.pem
323
326
        @echo '######################################################'
351
354
keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem: mandos-keygen
352
355
        install --directory keydir
353
356
        ./mandos-keygen --dir keydir --force
 
357
        if ! [ -e keydir/tls-privkey.pem ]; then \
 
358
                install --mode=u=rw /dev/null keydir/tls-privkey.pem; \
 
359
        fi
 
360
        if ! [ -e keydir/tls-pubkey.pem ]; then \
 
361
                install --mode=u=rw /dev/null keydir/tls-pubkey.pem; \
 
362
        fi
354
363
 
355
364
# Run the server with a local config
 
365
.PHONY: run-server
356
366
run-server: confdir/mandos.conf confdir/clients.conf statedir
357
367
        ./mandos --debug --no-dbus --configdir=confdir \
358
368
                --statedir=statedir $(SERVERARGS)
369
379
statedir:
370
380
        install --directory statedir
371
381
 
 
382
.PHONY: install
372
383
install: install-server install-client-nokey
373
384
 
 
385
.PHONY: install-html
374
386
install-html: html
375
387
        install --directory $(htmldir)
376
388
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
377
389
                $(htmldocs)
378
390
 
 
391
.PHONY: install-server
379
392
install-server: doc
380
393
        install --directory $(CONFDIR)
381
394
        if install --directory --mode=u=rwx --owner=$(USER) \
428
441
        gzip --best --to-stdout intro.8mandos \
429
442
                > $(MANDIR)/man8/intro.8mandos.gz
430
443
 
 
444
.PHONY: install-client-nokey
431
445
install-client-nokey: all doc
432
446
        install --directory $(LIBDIR)/mandos $(CONFDIR)
433
447
        install --directory --mode=u=rwx $(KEYDIR) \
512
526
        gzip --best --to-stdout dracut-module/password-agent.8mandos \
513
527
                > $(MANDIR)/man8/password-agent.8mandos.gz
514
528
 
 
529
.PHONY: install-client
515
530
install-client: install-client-nokey
516
531
# Post-installation stuff
517
532
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
527
542
        fi
528
543
        echo "Now run mandos-keygen --password --dir $(KEYDIR)"
529
544
 
 
545
.PHONY: uninstall
530
546
uninstall: uninstall-server uninstall-client
531
547
 
 
548
.PHONY: uninstall-server
532
549
uninstall-server:
533
550
        -rm --force $(PREFIX)/sbin/mandos \
534
551
                $(PREFIX)/sbin/mandos-ctl \
541
558
        update-rc.d -f mandos remove
542
559
        -rmdir $(CONFDIR)
543
560
 
 
561
.PHONY: uninstall-client
544
562
uninstall-client:
545
563
# Refuse to uninstall client if /etc/crypttab is explicitly configured
546
564
# to use it.
582
600
            done; \
583
601
        fi
584
602
 
 
603
.PHONY: purge
585
604
purge: purge-server purge-client
586
605
 
 
606
.PHONY: purge-server
587
607
purge-server: uninstall-server
588
608
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
589
609
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
594
614
                $(DESTDIR)/var/run/mandos.pid
595
615
        -rmdir $(CONFDIR)
596
616
 
 
617
.PHONY: purge-client
597
618
purge-client: uninstall-client
598
619
        -shred --remove $(KEYDIR)/seckey.txt $(KEYDIR)/tls-privkey.pem
599
620
        -rm --force $(CONFDIR)/plugin-runner.conf \