Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # makemaker is somewhat hard to convince about extra cflags or ldflags :-/
6 XCF = $(shell perl -MConfig -e 'print $$Config{ccflags}' ) $(shell dpkg-buildflags --get CFLAGS ) $(shell dpkg-buildflags --get CPPFLAGS )
7 XLF = -s $(shell perl -MConfig -e 'print $$Config{lddlflags}' ) $(shell dpkg-buildflags --get LDFLAGS )
8
9 configure: Makefile
10 Makefile: Makefile.PL
11 dh_testdir
12 perl Makefile.PL INSTALLDIRS=vendor CCFLAGS="$(XCF)" LDDLFLAGS="$(XLF)"
13
14
15 build: build-arch build-indep
16 build-arch: build-stamp
17 build-indep: build-stamp
18
19 build-stamp: configure
20 dh_testdir
21 $(MAKE)
22 touch build-stamp
23
24 clean:
25 dh_testdir
26 dh_testroot
27 rm -f build-stamp
28 [ ! -f Makefile ] || $(MAKE) distclean
29 rm -f Makefile Makefile.old
30 dh_clean
31
32 # Build architecture-independent files here.
33 binary-indep: build
34
35 # Build architecture-dependent files here.
36 binary-arch: build
37 dh_testdir
38 dh_testroot
39 dh_clean
40 dh_installdirs
41 # test suite requires the current file system to have ext attrs available
42 # and enabled
43 setfattr -n user.foo -v bar MYMETA.yml 2>/dev/null && $(MAKE) test || true
44 $(MAKE) install DESTDIR=$(CURDIR)/debian/libfile-extattr-perl/
45 dh_install
46 dh_shlibdeps
47 dh_installdocs -n
48 dh_installexamples
49 dh_installchangelogs
50 dh_compress
51 dh_fixperms
52 dh_installdeb
53 dh_perl
54 dh_gencontrol
55 dh_md5sums
56 dh_builddeb
57
58 binary: binary-indep binary-arch
59 .PHONY: build clean binary-indep binary-arch binary configure