4 CFLAGS
= -g
-Wall
-DGLOBAL_DEFAULTS_SUBDIR
="\\\"GNUstep/Defaults\\\""
6 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
12 ifneq (,$(findstring debug
,$(DEB_BUILD_OPTIONS
)))
16 # These are used for cross-compiling and for saving the configure script
17 # from having to guess our platform (since we know it already)
18 export DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
19 export DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
21 ifeq ($(DEB_BUILD_GNU_TYPE
),$(DEB_HOST_GNU_TYPE
))
22 HOSTSPEC
:= --build
$(DEB_HOST_GNU_TYPE
)
24 HOSTSPEC
:= --build
$(DEB_BUILD_GNU_TYPE
) --host
$(DEB_HOST_GNU_TYPE
)
27 LINGUAS
:= $(patsubst po
/%.po
, %, $(wildcard po
/*.po
))
29 WMAKER_OPTIONS
:= --disable-locale
--enable-modelock
--enable-xinerama
$(HOSTSPEC
)
30 #not-enabled --enable-usermenu --disable-shape --disable-shm --enable-xrandr
31 #not-enabled --disable-xpm --disable-png --disable-jpeg --disable-gif --disable-tiff
33 # Debian packages destination folders
34 DEBIAN_TMP
:= debian
/tmp
35 DEBDIR_FILES
:= debian
/debianfiles
36 LIBWRASTERDEV_TMP
:= debian
/libwraster3-dev
37 LIBWINGSDEV_TMP
:= debian
/libwings-dev
39 # Be careful with the leading / because some of these values are going
40 # to be hardcoded into the executables
43 INCLUDEDIR
:= $(BASEDIR
)/include
44 SHAREDIR
:= $(BASEDIR
)/share
45 BINDIR
:= $(BASEDIR
)/bin
46 MANDIR
:= $(SHAREDIR
)/man
47 NLSDIR
:= $(SHAREDIR
)/locale
48 GNUSTEPDIR
:= $(SHAREDIR
)/lib
/GNUstep
/System
49 WMSHAREDIR
:= $(SHAREDIR
)/WindowMaker
50 PIXMAPDIR
:= $(INCLUDEDIR
)/X11
/pixmaps
51 WPREFSAPPDIR
:= $(GNUSTEPDIR
)/Applications
/WPrefs.app
/WPrefs
53 COMMON_OPTIONS
:= --prefix=$(BASEDIR
) \
55 --includedir=$(INCLUDEDIR
) \
56 --sysconfdir
=$(CONFDIR
) \
57 --datadir=$(SHAREDIR
) \
58 --with-nlsdir
=$(NLSDIR
) \
59 --with-pixmapdir
=$(PIXMAPDIR
) \
60 --with-gnustepdir
=$(GNUSTEPDIR
)
63 dh
$@
--parallel
--with autotools-dev
65 override_dh_auto_configure
:
67 LINGUAS
="$(LINGUAS)" .
/configure
$(COMMON_OPTIONS
) \
68 $(WMAKER_OPTIONS
) CFLAGS
="$(CFLAGS)"
70 override_dh_installmenu
:
71 dh_installmenu
-a
--noscripts
74 # Fix perms for /usr/share/WindowMaker/*sh before install them
75 chmod
+x
$(DEBIAN_TMP
)$(WMSHAREDIR
)/autostart.sh
76 chmod
+x
$(DEBIAN_TMP
)$(WMSHAREDIR
)/exitscript.sh
78 # Readmes - Copy+rename before install
79 # We use the root of the temporal directory debian/tmp
80 cp po
/README
$(DEBIAN_TMP
)/README.po
81 cp README.definable-cursor
$(DEBIAN_TMP
)/README.definable-cursor
82 cp WPrefs.app
/README
$(DEBIAN_TMP
)/README.WPrefs
83 cp WPrefs.app
/po
/README
$(DEBIAN_TMP
)/README.WPrefs.po
85 # Now, change the #wmdatadir# string to $(WMSHAREDIR)
86 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' `find $(DEBIAN_TMP)/$(WMSHAREDIR) -name plmenu.*`
87 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP
)$(WMSHAREDIR
)/wmmacros
88 perl
-pi
-e
's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP
)$(WMSHAREDIR
)/plmenu
93 # Fix the get-*-flags scripts
94 perl
-pi
-e
'/^WCFLAGS/ && s:=.*:="-I/usr/X11R6/include":; /^WLFLAGS/ && s:=.*:="-L/usr/X11R6/lib":;' `find $(LIBWRASTERDEV_TMP) -name get-*-flags`
95 perl
-pi
-e
'/^WCFLAGS/ && s:=.*:="-I/usr/X11R6/include":; /^WLFLAGS/ && s:=.*:="-L/usr/X11R6/lib":;' `find $(LIBWINGSDEV_TMP) -name get-*-flags`
96 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lwraster":' `find $(LIBWRASTERDEV_TMP) -name get-wraster-flags`
97 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lWINGs -lwraster -lXft":' `find $(LIBWINGSDEV_TMP) -name get-wings-flags`
98 perl
-pi
-e
'/^WLIBS/ && s:=.*:="-lWUtil -lX11":' `find $(LIBWINGSDEV_TMP) -name get-wutil-flags`
101 dh_strip
--dbg-package
=wmaker-dbg