]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - debian/rules
Re-add dh_installexamples
[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         --with-tcl=/usr/lib \
23         --with-tclinclude=/usr/include/tcl \
24
25
26 LDFLAGS += -Wl,-z,defs -Wl,--as-needed
27
28 CFLAGS = -Wall -g
29
30 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31         CFLAGS += -O0
32 else
33         CFLAGS += -O2
34 endif
35
36
37 configure: patch configure-stamp
38 configure-stamp:
39         dh_testdir
40
41         CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
42         ./configure $(CONFIGURE_OPTIONS)
43
44         touch configure-stamp
45
46 build: configure build-stamp
47 build-stamp: configure-stamp
48         dh_testdir
49         $(MAKE)
50         touch build-stamp
51
52 clean: cleaner unpatch
53 cleaner:
54         dh_testdir
55         dh_testroot
56         rm -f build-stamp configure-stamp   
57         [ ! -f Makefile ] || $(MAKE) distclean
58         dh_clean
59
60 install: build
61         dh_testdir
62         dh_testroot
63         dh_clean -k
64         dh_installdirs
65
66         $(MAKE) install DESTDIR=$(CURDIR)/debian/tclcurl
67         mkdir $(CURDIR)/debian/tclcurl/usr/lib/tcltk
68         mv $(CURDIR)/debian/tclcurl/usr/lib/TclCurl* \
69                 $(CURDIR)/debian/tclcurl/usr/lib/tcltk
70         rm -rf \
71                 $(CURDIR)/debian/tclcurl/usr/share/man/mann \
72                 $(CURDIR)/debian/tclcurl/usr/bin \
73                 $(CURDIR)/debian/tclcurl/usr/include
74
75
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # We have nothing to do by default.
79
80 # Build architecture-dependent files here.
81 binary-arch: build install
82         dh_testdir
83         dh_testroot
84         dh_installdocs Changes.txt
85         dh_installman
86         dh_installchangelogs ChangeLog.txt
87         dh_installexamples tests
88         dh_link
89         dh_strip
90         dh_compress
91         dh_fixperms
92         dh_installdeb
93         dh_shlibdeps
94         tcltk-depends
95         dh_gencontrol
96         dh_md5sums
97         dh_builddeb
98
99 binary: binary-indep binary-arch
100 .PHONY: build clean binary-indep binary-arch binary install configure