Adding debian version 0.3.8.1-1.
[debian/lxpanel.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 include /usr/share/dpatch/dpatch.make
13
14 # These are used for cross-compiling and for saving the configure script
15 # from having to guess our platform (since we know it already)
16 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
19 CFLAGS = -Wall -g
20 INSTALL = install
21 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
22 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
23 INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
24 INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
25
26 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
27     CFLAGS += -O0
28 else
29     CFLAGS += -O2 -fprofile-arcs
30 endif
31 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
32     INSTALL_PROGRAM += -s
33 endif
34 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
35     NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
36     MAKEFLAGS += -j$(NUMJOBS)
37 endif
38
39 config.status: configure patch-stamp
40         dh_testdir
41         # Add here commands to configure the package.
42 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
43         cp -f /usr/share/misc/config.sub config.sub
44 endif
45 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
46         cp -f /usr/share/misc/config.guess config.guess
47 endif
48         ./configure \
49         --host=$(DEB_HOST_GNU_TYPE) \
50         --build=$(DEB_BUILD_GNU_TYPE) \
51         --prefix=/usr \
52         --mandir=\$${prefix}/share/man \
53         --infodir=\$${prefix}/share/info \
54         CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,--as-needed"
55
56
57 build: build-stamp
58
59 build-stamp:  config.status
60         dh_testdir
61
62         # Add here commands to compile the package.
63         $(MAKE)
64         #docbook-to-man debian/lxpanel.sgml > lxpanel.1
65
66         touch $@
67
68 clean: unpatch
69         dh_testdir
70         dh_testroot
71         rm -f build-stamp 
72
73         # Add here commands to clean up after the build process.
74         [ ! -f Makefile ] || $(MAKE) distclean
75         rm -f config.sub config.guess
76         rm -f intltool-extract \
77               intltool-update \
78               intltool-merge \
79               man/lxpanel.1  \
80               man/lxpanelctl.1
81
82         dh_clean 
83
84 install: build
85         dh_testdir
86         dh_testroot
87         dh_clean -k 
88         dh_installdirs
89
90         # Add here commands to install the package into debian/lxpanel.
91         $(MAKE) DESTDIR=$(CURDIR)/debian/lxpanel install
92
93         # Install .desktop files
94         install -d $(CURDIR)/debian/lxpanel/usr/share/applications
95         install -m644 $(CURDIR)/debian/lxde-x-www-browser.desktop \
96                         $(CURDIR)/debian/lxpanel/usr/share/applications
97
98         # Install lintian-overrides
99         install -d $(CURDIR)/debian/lxpanel/usr/share/lintian/overrides
100         install -m644 $(CURDIR)/debian/lxpanel.lintian-overrides \
101                         $(CURDIR)/debian/lxpanel/usr/share/lintian/overrides
102
103 # Build architecture-independent files here.
104 binary-indep: build install
105 # We have nothing to do by default.
106
107 # Build architecture-dependent files here.
108 binary-arch: build install
109         dh_testdir
110         dh_testroot
111         dh_installchangelogs
112         dh_installdocs
113         dh_installexamples
114         dh_movefiles --sourcedir=debian/lxpanel
115 #       dh_install
116 #       dh_installmenu
117 #       dh_installdebconf       
118 #       dh_installlogrotate
119 #       dh_installemacsen
120 #       dh_installpam
121 #       dh_installmime
122 #       dh_python
123 #       dh_installinit
124 #       dh_installcron
125 #       dh_installinfo
126         dh_desktop -A lxde-x-terminal-emulator.desktop lxde-x-www-browser.desktop
127         dh_installman
128         dh_link
129         dh_strip
130         dh_compress
131         dh_fixperms
132 #       dh_perl
133 #       dh_makeshlibs
134         dh_installdeb
135         dh_shlibdeps
136         dh_gencontrol
137         dh_md5sums
138         dh_builddeb
139
140 binary: binary-indep binary-arch
141 .PHONY: build clean binary-indep binary-arch binary install