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 # These are used for cross-compiling and for saving the configure script
9 # from having to guess our platform (since we know it already)
10 export DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
11 export DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
13 ifeq ($(DEB_BUILD_GNU_TYPE
),$(DEB_HOST_GNU_TYPE
))
14 HOSTSPEC
:= --build
$(DEB_HOST_GNU_TYPE
)
16 HOSTSPEC
:= --build
$(DEB_BUILD_GNU_TYPE
) --host
$(DEB_HOST_GNU_TYPE
)
19 LINGUAS
:= $(patsubst po
/%.po
, %, $(wildcard po
/*.po
))
21 WMAKER_OPTIONS
:= --disable-locale
--enable-modelock
--enable-xinerama
$(HOSTSPEC
)
22 #not-enabled --enable-usermenu --disable-shape --disable-shm --enable-xrandr
23 #not-enabled --disable-xpm --disable-png --disable-jpeg --disable-gif --disable-tiff
25 # Debian packages destination folders
26 DEBIAN_TMP
:= debian
/tmp
27 DEBDIR_FILES
:= debian
/debianfiles
28 LIBWRASTERDEV_TMP
:= debian
/libwraster3-dev
29 LIBWINGSDEV_TMP
:= debian
/libwings-dev
31 # Be careful with the leading / because some of these values are going
32 # to be hardcoded into the executables
35 INCLUDEDIR
:= $(BASEDIR
)/include
36 SHAREDIR
:= $(BASEDIR
)/share
37 BINDIR
:= $(BASEDIR
)/bin
38 MANDIR
:= $(SHAREDIR
)/man
39 NLSDIR
:= $(SHAREDIR
)/locale
40 GNUSTEPDIR
:= $(SHAREDIR
)/lib
/GNUstep
/System
41 WMSHAREDIR
:= $(SHAREDIR
)/WindowMaker
42 PIXMAPDIR
:= $(INCLUDEDIR
)/X11
/pixmaps
43 WPREFSAPPDIR
:= $(GNUSTEPDIR
)/Applications
/WPrefs.app
/WPrefs
45 COMMON_OPTIONS
:= --prefix=$(BASEDIR
) \
47 --includedir=$(INCLUDEDIR
) \
48 --sysconfdir
=$(CONFDIR
) \
49 --datadir=$(SHAREDIR
) \
50 --with-nlsdir
=$(NLSDIR
) \
51 --with-pixmapdir
=$(PIXMAPDIR
) \
52 --with-gnustepdir
=$(GNUSTEPDIR
)
55 dh
$@
--parallel
--with autotools-dev
57 override_dh_auto_configure
:
59 LINGUAS
="$(LINGUAS)" .
/configure
$(COMMON_OPTIONS
) \
60 $(WMAKER_OPTIONS
) $(shell dpkg-buildflags
--export=configure
)
62 override_dh_installmenu
:
63 dh_installmenu
-a
--noscripts
66 # Fix perms for /usr/share/WindowMaker/*sh before install them
67 chmod
+x
$(DEBIAN_TMP
)$(WMSHAREDIR
)/autostart.sh
68 chmod
+x
$(DEBIAN_TMP
)$(WMSHAREDIR
)/exitscript.sh
70 # Readmes - Copy+rename before install
71 # We use the root of the temporal directory debian/tmp
72 cp po
/README
$(DEBIAN_TMP
)/README.po
73 cp README.definable-cursor
$(DEBIAN_TMP
)/README.definable-cursor
74 cp WPrefs.app
/README
$(DEBIAN_TMP
)/README.WPrefs
75 cp WPrefs.app
/po
/README
$(DEBIAN_TMP
)/README.WPrefs.po
77 # Now, change the #wmdatadir# string to $(WMSHAREDIR)
78 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' `find $(DEBIAN_TMP)/$(WMSHAREDIR) -name plmenu.*`
79 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP
)$(WMSHAREDIR
)/wmmacros
80 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP
)$(WMSHAREDIR
)/plmenu
85 # Fix the get-*-flags scripts
86 perl
-pi
-e
'/^WCFLAGS/ && s:=.*:="-I/usr/X11R6/include":; /^WLFLAGS/ && s:=.*:="-L/usr/X11R6/lib":;' `find $(LIBWRASTERDEV_TMP) -name get-*-flags`
87 perl
-pi
-e
'/^WCFLAGS/ && s:=.*:="-I/usr/X11R6/include":; /^WLFLAGS/ && s:=.*:="-L/usr/X11R6/lib":;' `find $(LIBWINGSDEV_TMP) -name get-*-flags`
88 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lwraster":' `find $(LIBWRASTERDEV_TMP) -name get-wraster-flags`
89 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lWINGs -lwraster -lXft":' `find $(LIBWINGSDEV_TMP) -name get-wings-flags`
90 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lWUtil -lX11":' `find $(LIBWINGSDEV_TMP) -name get-wutil-flags`
93 dh_strip
--dbg-package
=wmaker-dbg