1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 15:12:32 +01:00
Files
wmaker/debian/rules
2017-08-15 10:34:03 +01:00

64 lines
2.2 KiB
Makefile
Executable File

#!/usr/bin/make -f
# export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND += -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
LINGUAS := $(patsubst po/%.po, %, $(wildcard po/*.po))
WMAKER_OPTIONS := --disable-xlocale --enable-modelock --enable-pango --enable-xinerama
#not-enabled --enable-usermenu --disable-shape --disable-shm --enable-randr
#not-enabled --disable-xpm --disable-png --disable-jpeg --disable-gif --disable-tiff
# Debian packages destination folder
DEBIAN_TMP := debian/tmp
# Be careful with the leading / because some of these values are going
# to be hardcoded into the executables
BASEDIR := /usr
INCLUDEDIR := $(BASEDIR)/include
SHAREDIR := $(BASEDIR)/share
GNUSTEPDIR := $(SHAREDIR)/lib/GNUstep/System
WMSHAREDIR := $(SHAREDIR)/WindowMaker
PIXMAPDIR := $(INCLUDEDIR)/X11/pixmaps
DEFSDATADIR := /etc/GNUstep/Defaults
COMMON_OPTIONS := --datadir=$(SHAREDIR) \
--with-pixmapdir=$(PIXMAPDIR) \
--with-gnustepdir=$(GNUSTEPDIR) \
--with-defsdatadir=$(DEFSDATADIR)
%:
dh $@ --parallel
override_dh_auto_configure:
env LINGUAS="$(LINGUAS)" dh_auto_configure --verbose -- \
$(COMMON_OPTIONS) $(WMAKER_OPTIONS)
override_dh_installdocs:
# Readmes - Copy+rename before install
# We use the root of the temporal directory debian/tmp
cp po/README $(DEBIAN_TMP)/README.po
cp README.definable-cursor $(DEBIAN_TMP)/README.definable-cursor
cp WPrefs.app/README $(DEBIAN_TMP)/README.WPrefs
cp WPrefs.app/po/README $(DEBIAN_TMP)/README.WPrefs.po
dh_installdocs
override_dh_install:
# Fix perms for /usr/share/WindowMaker/*sh before install them
chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/autostart.sh
chmod +x $(DEBIAN_TMP)$(WMSHAREDIR)/exitscript.sh
# Now, change the #wmdatadir# string to $(WMSHAREDIR)
perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' `find $(DEBIAN_TMP)/$(WMSHAREDIR) -name plmenu.*`
perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/wmmacros
perl -pi -e 's:#wmdatadir#:$(WMSHAREDIR):' $(DEBIAN_TMP)$(WMSHAREDIR)/plmenu
# Install files
dh_install
override_dh_installwm:
dh_installwm --priority=50