File: rules

package info (click to toggle)
ebtables 2.0.8.2-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 616 kB
  • ctags: 1,310
  • sloc: ansic: 7,930; sh: 445; makefile: 258; perl: 45
file content (61 lines) | stat: -rwxr-xr-x 1,529 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
#!/usr/bin/make -f
# Debian rules file for ebtables.
# Created by Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>,
# based on the debhelper templates.

MAKE_PATH_REDIRECTIONS:=LIBDIR=/lib/ebtables \
			BINDIR=/sbin \
			DESTDIR=debian/ebtables

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  DEBCFLAGS+=-O0
else
  DEBCFLAGS+=-O2
endif

build: build-stamp
build-stamp:
	dh_testdir
	dpatch apply-all
	make CFLAGS="$(DEBCFLAGS)" $(MAKE_PATH_REDIRECTIONS)
	touch build-stamp

clean:
	dh_testdir
	rm -f build-stamp
	make clean
	rm -f ebtables.8_ ebtables.sysv_ ebtables-config_ ebtables-save_
	dpatch deapply-all
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs
	make install $(MAKE_PATH_REDIRECTIONS)
	rm -f debian/ebtables/sbin/ebtables-save debian/ebtables/sbin/ebtables-restore
	mv debian/ebtables/etc/default/ebtables-config debian/ebtables/etc/default/ebtables
	rm -f debian/ebtables/etc/init.d/ebtables
	mkdir -p debian/ebtables/usr/share/lintian/overrides
	cp debian/ebtables.override debian/ebtables/usr/share/lintian/overrides/ebtables

binary: binary-indep binary-arch
binary-indep: build install
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_installinit -r -- start 30 S . stop 70 0 6 .
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	# Ignore warnings on /lib/ebtables libraries - they don't bear SONAMEs
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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