File: Makefile

package info (click to toggle)
debian-builder 1.8.0
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 120 kB
  • sloc: perl: 434; makefile: 60; sh: 17
file content (60 lines) | stat: -rw-r--r-- 1,916 bytes parent folder | download
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

#
#  Only used to build distribution tarballs.
#
DIST_PREFIX = /tmp
VERSION     = 1.8
BASE        = debian-builder


PREFIX ?= /usr/local/


clean:
	find . -name '*~' -exec rm \{\} \;
	find . -name 'install-stamp' -exec rm \{\} \;
	find . -name 'build-stamp' -exec rm \{\} \;
	find . -name 'debian-builder.1' -exec rm \{\} \;

install: manpage
	-mkdir -p $(DESTDIR)/var/cache/debian-builder
	-mkdir -p $(DESTDIR)/var/cache/debian-builder/tmp
	-mkdir -p $(DESTDIR)/var/cache/debian-builder/log
	-mkdir -p $(DESTDIR)/var/cache/debian-builder/deb
	-mkdir -p $(DESTDIR)/etc/debian-builder/
	-mkdir -p $(DESTDIR)$(PREFIX)/bin
	-mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
	chmod -R 775 $(DESTDIR)/var/cache/debian-builder
	cp bin/debian-builder $(DESTDIR)$(PREFIX)/bin
	cp etc/debian-builder.conf $(DESTDIR)/etc/debian-builder
	cp doc/debian-builder.1 $(DESTDIR)$(PREFIX)/share/man/man1

uninstall:
	-rm -rf /var/cache/debian-builder/tmp
	-rm -rf /var/cache/debian-builder/deb
	-rm -rf /var/cache/debian-builder/log
	-rmdir /var/cache/debian-builder/
	-rm /usr/bin/debian-builder
	-rm /etc/debian-builder/debian-builder.conf
	-rm /usr/share/man/man1/debian-builder.1.gz

test:
	prove --shuffle tests/

test-verbose:
	prove --shuffle --verbose tests/

manpage:
	pod2man bin/debian-builder > doc/debian-builder.1

release:   clean manpage
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)
	rm -f $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz
	cp -R . $(DIST_PREFIX)/$(BASE)-$(VERSION)
	find  $(DIST_PREFIX)/$(BASE)-$(VERSION) -name "CVS" -print | xargs rm -rf
	find  $(DIST_PREFIX)/$(BASE)-$(VERSION) -name ".cvsignore" -exec rm -f \{\} \;
	cd $(DIST_PREFIX) && tar -cvf $(DIST_PREFIX)/$(BASE)-$(VERSION).tar --exclude=debian/* $(BASE)-$(VERSION)/
	gzip $(DIST_PREFIX)/$(BASE)-$(VERSION).tar
	mv $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz .
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)
	gpg --armour --detach-sign $(BASE)-$(VERSION).tar.gz