2005-12-05 [colin] 1.9.100cvs67
[claws.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9
10 # These are used for cross-compiling and for saving the configure script
11 # from having to guess our platform (since we know it already)
12 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14
15
16 CFLAGS = -Wall -g
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O0
20 else
21         CFLAGS += -O2
22 endif
23 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24         INSTALL_PROGRAM += -s
25 endif
26
27 config.status: configure
28         dh_testdir
29         # Add here commands to configure the package.
30         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
31                 --build=$(DEB_BUILD_GNU_TYPE) \
32                 --prefix=/usr \
33                 --mandir=\$${prefix}/share/man \
34                 --infodir=\$${prefix}/share/info \
35                 --with-manualdir=\$${prefix}/share/doc/sylpheed-doc/manual \
36                 --with-faqdir=\$${prefix}/share/doc/sylpheed-doc/faq \
37                 --enable-openssl \
38                 --enable-gpgme \
39                 --enable-ipv6 \
40                 --enable-aspell \
41                 --enable-jpilot \
42                 --enable-ldap \
43                 --enable-spamassassin-plugin=yes \
44                 --enable-clamav-plugin=yes \
45                 --with-config-dir=.sylpheed-claws
46
47 build: build-stamp
48
49 build-stamp:  config.status
50         dh_testdir
51
52         # Add here commands to compile the package.
53         $(MAKE)
54
55         touch build-stamp
56
57 clean:
58         dh_testdir
59         dh_testroot
60         rm -f build-stamp 
61
62         # Add here commands to clean up after the build process.
63         -$(MAKE) distclean
64 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
65         cp -f /usr/share/misc/config.sub config.sub
66 endif
67 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
68         cp -f /usr/share/misc/config.guess config.guess
69 endif
70
71
72         dh_clean 
73
74 install: build
75         dh_testdir
76         dh_testroot
77         dh_clean -k 
78         dh_installdirs
79
80         # Add here commands to install the package into debian/sylpheed-claws.
81         $(MAKE) install DESTDIR=$(CURDIR)/debian/sylpheed-claws
82         rm -rf $(CURDIR)/debian/sylpheed-claws/usr/share/doc/sylpheed-doc
83         rm -f $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/*.a
84         rm -f $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/*.la
85         #________________________________________[libsylpheed-claws-dev]__
86         mkdir -m 755 -p $(CURDIR)/debian/libsylpheed-claws-dev/usr/lib/pkgconfig
87         mv $(CURDIR)/debian/sylpheed-claws/usr/include \
88             $(CURDIR)/debian/libsylpheed-claws-dev/usr/include
89         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/pkgconfig/sylpheed-claws.pc \
90            $(CURDIR)/debian/libsylpheed-claws-dev/usr/lib/pkgconfig
91         #__________________________________________[sylpheed-claws-i18n]__
92         mkdir -m 755 -p $(CURDIR)/debian/sylpheed-claws-i18n/usr/share/locale
93         mv $(CURDIR)/debian/sylpheed-claws/usr/share/locale/* \
94            $(CURDIR)/debian/sylpheed-claws-i18n/usr/share/locale
95         #________________________________________[sylpheed-claws-clamav]__
96         mkdir -m 755 -p \
97              $(CURDIR)/debian/sylpheed-claws-clamav/usr/lib/sylpheed-claws/plugins
98         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/clamav* \
99            $(CURDIR)/debian/sylpheed-claws-clamav/usr/lib/sylpheed-claws/plugins
100         #__________________________________[sylpheed-claws-dillo-viewer]__
101         mkdir -m 755 -p \
102               $(CURDIR)/debian/sylpheed-claws-dillo-viewer/usr/lib/sylpheed-claws/plugins
103         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/dillo* \
104            $(CURDIR)/debian/sylpheed-claws-dillo-viewer/usr/lib/sylpheed-claws/plugins
105         #__________________________________[sylpheed-claws-spamassassin]__
106         mkdir -m 755 -p \
107               $(CURDIR)/debian/sylpheed-claws-spamassassin/usr/lib/sylpheed-claws/plugins
108         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/spamassassin* \
109            $(CURDIR)/debian/sylpheed-claws-spamassassin/usr/lib/sylpheed-claws/plugins
110         #______________________________________[sylpheed-claws-trayicon]__
111         mkdir -m 755 -p \
112               $(CURDIR)/debian/sylpheed-claws-trayicon/usr/lib/sylpheed-claws/plugins
113         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/trayicon* \
114            $(CURDIR)/debian/sylpheed-claws-trayicon/usr/lib/sylpheed-claws/plugins
115         #_______________________________________[sylpheed-claws-pgpmime]__
116         mkdir -m 755 -p \
117               $(CURDIR)/debian/sylpheed-claws-pgpmime/usr/lib/sylpheed-claws/plugins
118         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/pgpmime.* \
119            $(CURDIR)/debian/sylpheed-claws-pgpmime/usr/lib/sylpheed-claws/plugins
120         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/pgpcore.so \
121            $(CURDIR)/debian/sylpheed-claws-pgpmime/usr/lib/sylpheed-claws/plugins
122         #_____________________________________[sylpheed-claws-pgpinline]__
123         mkdir -m 755 -p \
124               $(CURDIR)/debian/sylpheed-claws-pgpinline/usr/lib/sylpheed-claws/plugins
125         mv $(CURDIR)/debian/sylpheed-claws/usr/lib/sylpheed-claws/plugins/pgpinline.* \
126            $(CURDIR)/debian/sylpheed-claws-pgpinline/usr/lib/sylpheed-claws/plugins
127         #_______________________________________________[sylpheed-claws]__
128         # application icons
129         mkdir -m 755 -p \
130            $(CURDIR)/debian/sylpheed-claws/usr/share/pixmaps/
131         cp $(CURDIR)/sylpheed*.png \
132            $(CURDIR)/debian/sylpheed-claws/usr/share/pixmaps/
133         # desktop entry
134         mkdir -m 755 -p \
135            $(CURDIR)/debian/sylpheed-claws/usr/share/applications
136         cp $(CURDIR)/debian/sylpheed-claws.desktop \
137            $(CURDIR)/debian/sylpheed-claws/usr/share/applications/sylpheed-claws.desktop
138
139 # Build architecture-independent files here.
140 binary-indep: build install
141 # We have nothing to do by default.
142
143 # Build architecture-dependent files here.
144 binary-arch: build install
145         dh_testdir
146         dh_testroot
147         dh_installchangelogs ChangeLog
148         dh_installdocs
149         dh_installexamples
150         dh_installman
151         dh_installmenu
152         dh_link
153         dh_strip
154         dh_compress
155         dh_fixperms
156         dh_installdeb
157         dh_shlibdeps
158         dh_gencontrol
159         dh_md5sums
160         dh_builddeb
161
162 binary: binary-indep binary-arch
163 .PHONY: build clean binary-indep binary-arch binary install