0e636819b89651ec7e0e76f6a69b6d273f2423f6
[debian/lxde-common.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
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 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
49
50
51 build: build-stamp
52
53 build-stamp:  config.status
54         dh_testdir
55
56         # Add here commands to compile the package.
57         $(MAKE)
58         #docbook-to-man debian/lxde-common.sgml > lxde-common.1
59
60         touch $@
61
62 clean: unpatch
63         dh_testdir
64         dh_testroot
65         rm -f build-stamp 
66
67         # Add here commands to clean up after the build process.
68         [ ! -f Makefile ] || $(MAKE) distclean
69         rm -f config.sub config.guess
70         rm -f lxde-settings/*.gcno
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/lxde-common.
81         $(MAKE) DESTDIR=$(CURDIR)/debian/lxde-common install
82         dh_movefiles --sourcedir=debian/lxde-common
83
84
85
86 # Build architecture-independent files here.
87 binary-indep: build install
88         dh_testdir
89         dh_testroot
90         dh_installchangelogs -Nlxde-settings-daemon
91         dh_installdocs -Nlxde-settings-daemon
92         dh_installman -Nlxde-settings-daemon 
93         dh_link usr/share/doc/lxde-common usr/share/doc/lxde
94         dh_strip -Nlxde-settings-daemon
95         dh_compress -Nlxde-settings-daemon
96         dh_fixperms -Nlxde-settings-daemon
97         dh_installdeb -Nlxde-settings-daemon
98         dh_gencontrol -Nlxde-settings-daemon
99         dh_md5sums -Nlxde-settings-daemon
100         dh_builddeb -Nlxde-settings-daemon
101
102 # Build architecture-dependent files here.
103 binary-arch: build install
104         dh_testdir
105         dh_testroot
106         dh_installchangelogs -plxde-settings-daemon
107         dh_installdocs -plxde-settings-daemon
108 #       dh_installexamples
109 #       dh_install
110 #       dh_installmenu
111 #       dh_installdebconf       
112 #       dh_installlogrotate
113 #       dh_installemacsen
114 #       dh_installpam
115 #       dh_installmime
116 #       dh_python
117 #       dh_installinit
118 #       dh_installcron
119 #       dh_installinfo
120         dh_installman -plxde-settings-daemon 
121         dh_link usr/share/doc/lxde-common usr/share/doc/lxde \
122                 usr/share/doc/lxde-common usr/share/doc/lxde-settings-daemon
123         dh_strip -plxde-settings-daemon
124         dh_compress -plxde-settings-daemon
125         dh_fixperms -plxde-settings-daemon
126 #       dh_perl
127 #       dh_makeshlibs
128         dh_installdeb -plxde-settings-daemon
129         dh_shlibdeps -L lxde-settings-daemon -l debian/lxde-settings-daemon/usr/bin
130         dh_gencontrol -plxde-settings-daemon
131         dh_md5sums -plxde-settings-daemon
132         dh_builddeb -plxde-settings-daemon
133
134 binary: binary-indep binary-arch
135 .PHONY: build clean binary-indep binary-arch binary install