]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - debian/rules
b059de0b9bea232eec26135edd0feefcf10125e9
[sven/tclcurl.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         --mandir=/usr/share/man \
20         --infodir=/usr/share/info \
21         --enable-threads
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: configure-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/tclcurl
65
66 # Build architecture-independent files here.
67 binary-indep: build install
68 # We have nothing to do by default.
69
70 # Build architecture-dependent files here.
71 binary-arch: build install
72         dh_testdir
73         dh_testroot
74         dh_installdocs Changes.txt
75         dh_installman
76         dh_installchangelogs ChangeLog.txt
77         dh_link
78         dh_strip
79         dh_compress
80         dh_fixperms
81         dh_installdeb
82         dh_shlibdeps
83         tcltk-depends
84         dh_gencontrol
85         dh_md5sums
86         dh_builddeb
87
88 binary: binary-indep binary-arch
89
90 .PHONY: build clean binary-arch binary-indep binary install configure