debian: Use dh_autoreconf.
[wmaker-crm.git] / debian / rules
blobfda205618b156ff41dca2c853c398c8eb18bbaf9
1 #!/usr/bin/make -f
2 # export DH_VERBOSE=1
3 export CFLAGS = `dpkg-buildflags --get CFLAGS`
4 export DEB_CFLAGS_MAINT_APPEND += -Wall -DGLOBAL_DEFAULTS_SUBDIR="\\\"GNUstep/Defaults\\\""
5 export LDFLAGS = `dpkg-buildflags --get LDFLAGS`
6 export CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
8 LINGUAS := $(patsubst po/%.po, %, $(wildcard po/*.po))
10 WMAKER_OPTIONS := --disable-locale --enable-modelock --enable-randr --enable-pango --enable-xinerama
11 #not-enabled --enable-usermenu --disable-shape --disable-shm --enable-xrandr
12 #not-enabled --disable-xpm --disable-png --disable-jpeg --disable-gif --disable-tiff
14 # Debian packages destination folder
15 DEBIAN_TMP := debian/tmp
17 # Be careful with the leading / because some of these values are going
18 # to be hardcoded into the executables
19 BASEDIR := /usr
20 CONFDIR := /etc
21 INCLUDEDIR := $(BASEDIR)/include
22 SHAREDIR := $(BASEDIR)/share
23 MANDIR := $(SHAREDIR)/man
24 NLSDIR := $(SHAREDIR)/locale
25 GNUSTEPDIR := $(SHAREDIR)/lib/GNUstep/System
26 WMSHAREDIR := $(SHAREDIR)/WindowMaker
27 PIXMAPDIR := $(INCLUDEDIR)/X11/pixmaps
29 COMMON_OPTIONS := --prefix=$(BASEDIR) \
30 --mandir=$(MANDIR) \
31 --includedir=$(INCLUDEDIR) \
32 --sysconfdir=$(CONFDIR) \
33 --datadir=$(SHAREDIR) \
34 --with-localedir=$(NLSDIR) \
35 --with-pixmapdir=$(PIXMAPDIR) \
36 --with-gnustepdir=$(GNUSTEPDIR)
39 dh $@ --parallel --with autoreconf
41 override_dh_auto_configure:
42 LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) \
43 $(WMAKER_OPTIONS) $(shell dpkg-buildflags --export=configure)
45 override_dh_installmenu:
46 dh_installmenu -a --noscripts
48 override_dh_install:
49 # Fix perms for /usr/share/WindowMaker/*sh before install them
50 chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/autostart.sh
51 chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/exitscript.sh
53 # Readmes - Copy+rename before install
54 # We use the root of the temporal directory debian/tmp
55 cp po/README $(DEBIAN_TMP)/README.po
56 cp README.definable-cursor $(DEBIAN_TMP)/README.definable-cursor
57 cp WPrefs.app/README $(DEBIAN_TMP)/README.WPrefs
58 cp WPrefs.app/po/README $(DEBIAN_TMP)/README.WPrefs.po
60 # Now, change the #wmdatadir# string to $(WMSHAREDIR)
61 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' `find $(DEBIAN_TMP)/$(WMSHAREDIR) -name plmenu.*`
62 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/wmmacros
63 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/plmenu
65 # Install files
66 dh_install
68 override_dh_strip:
69 dh_strip --dbg-package=wmaker-dbg