-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
70 lines (59 loc) · 1.84 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
VERSION=1.0.0
BUILD=1
prefix=/usr/local
bindir=${prefix}/bin
libdir=${prefix}/lib
mandir=${prefix}/share/man
all: certified_$(VERSION)-$(BUILD)_all.deb share/html/*.html
clean:
install: bin/* lib/* share/man/man*/*.[12345678]
install -d $(DESTDIR)$(bindir)
install bin/* $(DESTDIR)$(bindir)
install -d $(DESTDIR)$(libdir)
install -m644 lib/* $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(mandir)/man1
install -m644 share/man/man1/*.1 $(DESTDIR)$(mandir)/man1
test:
sh test.sh
uninstall:
make install DESTDIR=uninstall
-find uninstall -depth -type f -printf $(DESTDIR)/%P\n | xargs rm -f
-find uninstall -depth -type d -printf $(DESTDIR)/%P\n | xargs rmdir
rm -rf uninstall
%.deb: bin/* lib/* share/man/man*/*.[12345678]
rm -f $@
make install DESTDIR=install prefix=/usr
fakeroot fpm -a 'all' \
--description 'Generate and manage an internal CA for your company' \
--url 'https://github.com/rcrowley/certified' \
-m 'Richard Crowley <[email protected]>' \
--vendor '' \
-n certified \
--category 'misc' \
--license 'BSD-2-clause' \
-v $(VERSION)-$(BUILD) \
-d 'openssl' \
-C install -p $@ -s dir -t deb usr
rm -rf install
%.rpm: bin/* lib/* share/man/man*/*.[12345678]
rm -f $@
make install DESTDIR=install prefix=/usr
fakeroot fpm -a 'all' \
--description 'Generate and manage an internal CA for your company' \
--url 'https://github.com/rcrowley/certified' \
-m 'Richard Crowley <[email protected]>' \
--vendor '' \
-n certified \
--category 'misc' \
--license 'BSD-2-clause' \
-v $(VERSION) \
--iteration $(BUILD) \
-d 'openssl' \
-C install -p $@ -s dir -t rpm usr
rm -rf install
share/man/man1/%.1: share/man/man1/%.1.ronn
ronn --manual=Certified --roff $<
share/html/%.1.html: share/man/man1/%.1.ronn
ronn --html --manual=Certified --style=toc $<
mv $(<:.ronn=.html) $@
.PHONY: all clean install test uninstall