-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (44 loc) · 1.33 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
# Settings
PROJECT=pxzgrep
VERSION=1.0.0+dev
DISTNAME=$(PROJECT)-$(VERSION)
DISTFILES=$(PROJECT) t *.md Makefile *.spec
MANPAGE=$(PROJECT).1
# Defaults
DESTDIR:=
PREFIX:=/usr/local
INSTALL:=install
all: man
test: check
check:
prove -v t
man: $(MANPAGE)
$(MANPAGE): README.md Makefile
ronn --roff --manual="$(PROJECT) Manual" --organization="ETH Zurich IT-SeC" < $< > $@
sed -e /travis/d -i $@
gzip -9vnf $@
install: all
$(INSTALL) -dv $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -pv $(PROJECT) $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -dv $(DESTDIR)$(PREFIX)/share/man/man1/
$(INSTALL) -pv $(MANPAGE).gz $(DESTDIR)$(PREFIX)/share/man/man1/
clean:
rm -f $(MANPAGE)*
dist: ../$(DISTNAME).tar.xz
../$(DISTNAME).tar.xz: $(DISTFILES)
mkdir $(DISTNAME)
cp -pvr $(DISTFILES) $(DISTNAME)
tar cvJf $@ --exclude=t/target/\* $(DISTNAME)
rm -rv $(DISTNAME)
dist-rpm: ~/rpmbuild/SOURCES/$(PROJECT)-1.0.0+dev.tar.gz
~/rpmbuild/SOURCES/$(PROJECT)-1.0.0+dev.tar.gz: ../$(DISTNAME).tar.gz
cp -pv $< $@
dist-legacy: ../$(DISTNAME).tar.gz
../$(DISTNAME).tar.gz: $(DISTFILES)
mkdir $(DISTNAME)
cp -pvr $(DISTFILES) $(DISTNAME)
tar cvzf $@ --exclude=t/target/\* $(DISTNAME)
rm -rv $(DISTNAME)
origtarxz: ../$(PROJECT)_$(VERSION).orig.tar.xz
../$(PROJECT)_$(VERSION).orig.tar.xz: ../$(DISTNAME).tar.xz
ln -vsf $(DISTNAME).tar.xz ../$(PROJECT)_$(VERSION).orig.tar.xz