Really chmod the right files. Bump to 0.0.7.
[tweakr] / debian / rules
1 #!/usr/bin/make -f
2
3 include /usr/share/cdbs/1/rules/debhelper.mk
4 include /usr/share/cdbs/1/class/autotools.mk
5
6 DEB_DH_INSTALL_SOURCEDIR=debian/tmp
7 DEB_DESTDIR=$(CURDIR)/debian/tmp
8 DEB_DH_MAKESHLIBS_ARGS := --exclude=plugin --exclude=applet --exclude=glade
9
10 ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS)))
11         DEB_CONFIGURE_EXTRA_FLAGS += --enable-maemo-launcher
12 endif
13 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
14         DEB_CONFIGURE_EXTRA_FLAGS += --enable-debug
15 else
16         DEB_CONFIGURE_EXTRA_FLAGS += --disable-cast-checks
17 endif
18 ifneq (,$(findstring coverage,$(DEB_BUILD_OPTIONS)))
19         SBOX_USE_CCACHE := no
20         DEB_CONFIGURE_EXTRA_FLAGS += --enable-coverage
21 endif
22 # do not generate docs if gcov is enabled
23 ifeq (,$(findstring coverage,$(DEB_BUILD_OPTIONS)))
24         DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc
25 endif
26
27 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
28         PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
29                 sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
30         ifeq ($(DEB_BUILD_OPTIONS),$(PARALLEL_JOBS))
31                 PARALLEL_JOBS := $(shell if [ -f /proc/cpuinfo ]; \
32                         then echo `cat /proc/cpuinfo | grep 'processor' | wc -l`; \
33                                     else echo 1; fi)
34         endif
35         NJOBS := -j$(PARALLEL_JOBS)
36 endif
37 DEB_MAKE_ENVVARS := MAKEFLAGS=$(NJOBS)
38
39 debian/stamp-autotools-files:
40         autoreconf -v --install
41         intltoolize --copy --force --automake
42         touch debian/stamp-autotools-files
43
44 binary-predeb/tweakr::
45         dh_maemolauncher
46         # set the Setuid bit
47         chmod 4755 $(CURDIR)/debian/tweakr/usr/bin/tweakr-desktop-save
48         chmod 4755 $(CURDIR)/debian/tweakr/usr/bin/tweakr-mce-save