configure: fixed incorrect variable name that prevented --disable-xdnd to work
[wmaker-crm.git] / debian / rules
blob74dd692e8b6dd7312a093d546c56ebefa724e504
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-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-nlsdir=$(NLSDIR) \
35 --with-pixmapdir=$(PIXMAPDIR) \
36 --with-gnustepdir=$(GNUSTEPDIR)
39 dh $@ --parallel --with autotools-dev
41 override_dh_auto_configure:
42 ./autogen.sh
43 LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) \
44 $(WMAKER_OPTIONS) $(shell dpkg-buildflags --export=configure)
46 override_dh_installmenu:
47 dh_installmenu -a --noscripts
49 override_dh_install:
50 # Fix perms for /usr/share/WindowMaker/*sh before install them
51 chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/autostart.sh
52 chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/exitscript.sh
54 # Readmes - Copy+rename before install
55 # We use the root of the temporal directory debian/tmp
56 cp po/README $(DEBIAN_TMP)/README.po
57 cp README.definable-cursor $(DEBIAN_TMP)/README.definable-cursor
58 cp WPrefs.app/README $(DEBIAN_TMP)/README.WPrefs
59 cp WPrefs.app/po/README $(DEBIAN_TMP)/README.WPrefs.po
61 # Now, change the #wmdatadir# string to $(WMSHAREDIR)
62 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' `find $(DEBIAN_TMP)/$(WMSHAREDIR) -name plmenu.*`
63 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/wmmacros
64 perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/plmenu
66 # Install files
67 dh_install
69 override_dh_strip:
70 dh_strip --dbg-package=wmaker-dbg