]> git.sven.stormbind.net Git - sven/mysqltcl.git/blob - debian/rules
Replaced makefiletargets patch with some rm -rf in rules to make it more obvious...
[sven/mysqltcl.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include /usr/share/quilt/quilt.make
7
8
9 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
10         CONFIGURE_OPTIONS += --build $(DEB_HOST_GNU_TYPE)
11 else
12         CONFIGURE_OPTIONS += --build $(DEB_BUILD_GNU_TYPE) \
13                 --host $(DEB_HOST_GNU_TYPE)
14 endif
15
16
17 CONFIGURE_OPTIONS += \
18                 --prefix=/usr \
19                 --enable-threads \
20                 --mandir=/usr/share/man \
21                 --infodir=/usr/share/info \
22
23
24 LDFLAGS += -Wl,-z,defs -Wl,--as-needed
25
26 CFLAGS += -Wall -g
27
28 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
29         CFLAGS += -O2
30 else
31         CFLAGS += -O0
32 endif
33
34
35 configure: patch configure-stamp
36 configure-stamp:
37         dh_testdir
38
39         CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
40         ./configure $(CONFIGURE_OPTIONS)
41
42         touch configure-stamp
43
44 build: configure build-stamp
45 build-stamp:
46         dh_testdir
47         $(MAKE)
48         touch build-stamp
49
50 clean: cleaner unpatch
51 cleaner:
52         dh_testdir
53         dh_testroot
54         rm -f build-stamp configure-stamp
55         [ ! -f Makefile ] || $(MAKE) distclean
56         dh_clean
57
58 install: build
59         dh_testdir
60         dh_testroot
61         dh_clean -k
62         dh_installdirs
63
64         $(MAKE) install DESTDIR=$(CURDIR)/debian/mysqltcl/
65         rm -rf \
66                 $(CURDIR)/debian/mysqltcl/usr/share/man/mann \
67                 $(CURDIR)/debian/mysqltcl/usr/bin \
68                 $(CURDIR)/debian/mysqltcl/usr/include
69
70
71 # Build architecture-independent files here.
72 binary-indep: build install
73 # We have nothing to do by default.
74
75 # Build architecture-dependent files here.
76 binary-arch: build install
77         dh_testdir
78         dh_testroot
79         dh_installdocs
80         dh_installman
81         dh_installchangelogs ChangeLog
82         dh_link
83         dh_strip
84         dh_compress
85         dh_fixperms
86         dh_installdeb
87         dh_shlibdeps
88         tcltk-depends
89         dh_gencontrol
90         dh_md5sums
91         dh_builddeb
92
93 binary: binary-indep binary-arch
94 .PHONY: build clean binary-indep binary-arch binary install configure