File: rules

package info (click to toggle)
firestarter 1.0.3-11
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,548 kB
  • sloc: ansic: 14,749; sh: 8,068; makefile: 187
file content (99 lines) | stat: -rwxr-xr-x 2,560 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#! /usr/bin/make -f

## debian/rules for firestarter


ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS="-O0 -Wall -g"
else
	CFLAGS="-O2 -Wall -g"
endif
						
configure: configure-stamp
configure-stamp:
	dh_testdir
	
	cp config.guess config.guess.orig
	cp config.sub config.sub.orig
	@cp -f /usr/share/misc/config.guess .
	@cp -f /usr/share/misc/config.sub .
	CFLAGS=$(CFLAGS) ./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--datadir=/usr/share \
		--sysconfdir=/etc

	touch configure-stamp

build: configure-stamp build-stamp

build-stamp:
	dh_testdir
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -f intltool-extract intltool-update intltool-merge
	rm -f firestarter.schemas firestarter.desktop

	[ ! -f Makefile ] || $(MAKE) distclean
	
	dh_clean

	rm -f po/*.gmo

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1; \
	$(MAKE) install DESTDIR=$(CURDIR)/debian/firestarter
	cd $(CURDIR)/debian/firestarter/usr && mv bin sbin
	install -D -m644 pixmaps/firestarter.xpm \
		$(CURDIR)/debian/firestarter/usr/share/pixmaps/firestarter.xpm
	rm $(CURDIR)/debian/firestarter/usr/share/gnome/apps/Internet/firestarter.desktop
	rm -r $(CURDIR)/debian/firestarter/usr/share/gnome
	install -D -m644 firestarter.desktop \
		$(CURDIR)/debian/firestarter/usr/share/applications/firestarter.desktop
	# install script in i(p|f)-(up|down).d to restart guarddog
	# whenever interfaces are brought up/down
	install -D -m755 debian/firestarter.ifupdown \
		$(CURDIR)/debian/firestarter/etc/ppp/ip-up.d/50firestarter
	install -D -m755 debian/firestarter.ifupdown \
		$(CURDIR)/debian/firestarter/etc/ppp/ip-down.d/50firestarter
	install -D -m755 debian/firestarter.ifupdown \
		$(CURDIR)/debian/firestarter/etc/network/if-up.d/50firestarter
	install -D -m755 debian/firestarter.ifupdown \
		$(CURDIR)/debian/firestarter/etc/network/if-down.d/50firestarter
	# remote RPATH from binary
	chrpath -d $(CURDIR)/debian/firestarter/usr/sbin/firestarter

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installmenu
	dh_installman
	dh_installchangelogs ChangeLog
	dh_installinit --no-start --update-rcd-params="start 65 S ."
	dh_gconf
	dh_link
	dh_strip
	dh_compress
	dh_fixperms -X "50firestarter"
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install