root/climm/debian/rules

Revision 2885, 2.7 kB (checked in by kuhlmann, 6 months ago)

grr

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # This is the debhelper compatibility version to use.
7 export DH_COMPAT=4
8
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13 CONFIGURE_OPTIONS = --disable-dependency-tracking
14
15 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
16         CFLAGS += -O0
17 else
18         CFLAGS += -O4
19 endif
20 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21         INSTALL_PROGRAM += -s
22 endif
23 ifneq (,$(findstring nossl,$(DEB_BUILD_OPTIONS)))
24         CONFIGURE_OPTIONS += --disable-ssl
25 else
26         CONFIGURE_OPTIONS += --enable-ssl
27 endif
28 ifneq (,$(findstring notcl,$(DEB_BUILD_OPTIONS)))
29         CONFIGURE_OPTIONS += --disable-tcl
30 else
31         CONFIGURE_OPTIONS += --enable-tcl
32 endif
33 ifneq (,$(findstring noxmpp,$(DEB_BUILD_OPTIONS)))
34         CONFIGURE_OPTIONS += --disable-xmpp
35 else
36         CONFIGURE_OPTIONS += --enable-xmpp
37 endif
38 ifneq (,$(findstring autopackage,$(DEB_BUILD_OPTIONS)))
39         CONFIGURE_OPTIONS += --enable-autopackage
40 endif
41
42 ifeq (,$(CLIMM_EXTRAVERSION))
43         CLIMM_EXTRAVERSION = Debian hand compiled
44 endif
45 export CLIMM_EXTRAVERSION
46
47 configure: configure-stamp
48 configure-stamp:
49         dh_testdir
50         ./configure --host=$(DEB_HOST_GNU_TYPE) \
51           --build=$(DEB_BUILD_GNU_TYPE) \
52           --prefix=/usr \
53           --mandir=\$${prefix}/share/man \
54           $(CONFIGURE_OPTIONS)
55         touch configure-stamp
56
57 build: configure-stamp build-stamp
58 build-stamp:
59         $(MAKE)
60         touch build-stamp
61
62 clean:
63         -$(MAKE) distclean
64         dh_clean
65         rm -rf configure-stamp build-stamp src/.cvsupdate
66
67 install:
68         dh_clean -k
69         dh_testroot
70         $(MAKE) install DESTDIR=`pwd`/debian/climm
71         mkdir -p debian/climm/etc/apt/sources.list.d
72         -. /etc/lsb-release; echo "deb http://www.climm.org/deb/ $${CLIMM_DISTRI:-$$DISTRIB_CODENAME} main" \
73           > debian/climm/etc/apt/sources.list.d/climm
74
75 binary-indep: build install
76
77 binary-arch: build install
78         dh_testroot
79         dh_installdocs
80        
81         dh_installchangelogs ChangeLog
82         install -D -m 644 doc/climm.xpm debian/climm/usr/share/pixmaps/climm.xpm
83         install -D -m 644 doc/climm@48x48.png debian/climm/usr/share/icons/hicolor/48x48/apps/climm.png
84         install -D -m 644 doc/climm@32x32.png debian/climm/usr/share/icons/hicolor/32x32/apps/climm.png
85         install -D -m 644 doc/climm@16x16.png debian/climm/usr/share/icons/hicolor/16x16/apps/climm.png
86         dh_installmenu
87        
88 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
89         dh_strip
90 endif
91         dh_compress
92         dh_fixperms
93         dh_installdeb
94         dh_shlibdeps
95         dh_gencontrol
96         dh_md5sums
97         dh_builddeb
98
99 binary: install binary-indep binary-arch
100 .PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the browser.