File: rules

package info (click to toggle)
linux-atm 1%3A2.5.1-1.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,504 kB
  • ctags: 4,810
  • sloc: ansic: 36,137; sh: 9,526; yacc: 1,193; lex: 556; makefile: 315; perl: 186; awk: 1
file content (82 lines) | stat: -rwxr-xr-x 2,121 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
  CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
  CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

configure: config.status
config.status:
	dh_testdir
	autoreconf --force --install --symlink
	./configure CFLAGS="-fno-strict-aliasing $(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" $(CONFFLAGS) \
		--prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
	touch configure-stamp

build: config.status build-stamp
build-stamp:
	dh_testdir

	$(MAKE)
	cat debian/copyright.header COPYING > debian/copyright

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f debian/atm-tools.8 debian/copyright \
		src/switch/cfg_?.[ch] src/qgen/ql_?.[ch] src/test/ispl_?.[ch] \
		src/sigd/cfg_?.[ch] src/lane/lecs_db.c src/lane/load_lex.c \
		aclocal.m4 autom4te.cache/* config.h.in config.h.in~ \
		config.guess config.sub configure libtool \
		INSTALL depcomp install-sh ltmain.sh missing ylwrap \
		$$(find . -name Makefile.in)

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) DESTDIR=`pwd`/debian/tmp install

        # manpages
	/usr/bin/pod2man --section=8 --release="atm-tools $(PKG_VER)" --lax \
	--center="Debian GNU/Linux" debian/atm-tools.pod > debian/atm-tools.8

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install
	rm debian/atm-tools/usr/share/man/man8/br2684ctl.8

	dh_installdocs
	dh_installinit --init-script=atm -- start 34 0 6 . start 39 S .
	dh_installman
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -- -c4
	dh_installdeb
	dh_shlibdeps -L libatm1 -l debian/libatm1/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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