source: pkg/main/xfardic/trunk/debian/rules @ 2982

Revision 2982, 1.7 KB checked in by alanbach-guest, 5 years ago (diff)
  • Updated rules file
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
5
6
7CFLAGS = -Wall -g
8
9ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
10        CFLAGS += -O0
11else
12        CFLAGS += -O2
13endif
14
15PATCH_DIR := debian/patches
16
17patch: patch-stamp
18patch-stamp:
19        dh_testdir
20        # apply patches
21        QUILT_PATCHES=$(PATCH_DIR) \
22                quilt --quiltrc /dev/null push -a || test $$? = 2
23        touch $@
24
25configure: configure-stamp
26configure-stamp: patch-stamp
27        dh_testdir
28        CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
29        touch configure-stamp
30
31build: build-stamp
32build-stamp:
33        dh_testdir
34        $(MAKE)
35        touch build-stamp
36
37clean:
38        dh_testdir
39        dh_testroot
40        [ ! -f Makefile ] || $(MAKE) distclean
41        # unapply patches, if any
42        QUILT_PATCHES=$(PATCH_DIR) \
43                quilt --quiltrc /dev/null pop -a -R || test $$? = 2
44        -rm -rf .pc
45        rm -f install-stamp build-stamp configure-stamp patch-stamp
46        rm -f build-stamp
47        rm -rf config.cache
48        dh_clean       
49       
50install: build
51        dh_testdir
52        dh_testroot
53        dh_clean -k
54        dh_installdirs
55        $(MAKE) install DESTDIR=$(CURDIR)/debian/xfardic
56
57
58# Build architecture-independent files here.
59binary-indep: build install
60# We have nothing to do by default.
61
62# Build architecture-dependent files here.
63binary-arch: build install
64        dh_testdir
65        dh_testroot
66        dh_installchangelogs ChangeLog
67        dh_installdocs
68        dh_link
69        dh_strip
70        dh_compress
71        dh_fixperms
72        dh_installdeb
73        dh_shlibdeps
74        dh_gencontrol
75        dh_md5sums
76        dh_builddeb     
77
78binary: binary-indep binary-arch
79.PHONY: patch build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.