Commit a19020ea authored by Yavor Doganov's avatar Yavor Doganov

rules: Rewrite for modern dh.

parent 64421adf
wrapperfactory.app (0.1.0-5) UNRELEASED; urgency=medium
* debian/rules: Rewrite for modern dh. Don't include dpatch.make.
Don't generate/install the .xpm icon. Enable all hardening.
-- Yavor Doganov <yavor@gnu.org> Thu, 10 May 2018 09:01:30 +0300
wrapperfactory.app (0.1.0-4) unstable; urgency=low
* debian/compat: Set to 7.
......
......@@ -2,84 +2,36 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
include /usr/share/GNUstep/debian/config.mk
export GNUSTEP_MAKEFILES := $(GS_MAKE_DIR)
d_app := $(CURDIR)/debian/wrapperfactory.app
DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Make sure there are no undefined symbols and avoid unnecessary
# dependencies.
LDFLAGS := -Wl,-z,defs -Wl,--as-needed -Wl,-rpath,/usr/lib/wrapperfactory.app
DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined -Wl,--as-needed \
-Wl,-rpath,/usr/lib/wrapperfactory.app
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optim := debug=yes
endif
%:
dh $@
build: patch build-stamp
override_dh_auto_build:
dh_auto_build -- $(optim) messages=yes \
$(shell dpkg-buildflags --export=cmdline)
build-stamp:
dh_testdir
$(MAKE) $(optim) LDFLAGS="$(LDFLAGS)" messages=yes
convert WrapperFactory/Icons/WrapperFactory.tiff \
-resize 32x32 WrapperFactory.xpm
touch $@
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
$(MAKE) distclean
dh_clean build-stamp WrapperFactory.xpm
install: build
dh_testdir
dh_testroot
dh_prep
override_dh_auto_install:
# Install libGSWrapper as a private library.
$(MAKE) install DESTDIR=$(d_app) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
GNUSTEP_SYSTEM_LIBRARIES=/usr/lib/wrapperfactory.app
dh_auto_install -- GNUSTEP_SYSTEM_LIBRARIES=/usr/lib/wrapperfactory.app
# Remove invalid .desktop file and install ours.
rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/*.app/Resources/*.desktop
install -D -m 644 debian/WrapperFactory.desktop \
$(d_app)/usr/share/applications/WrapperFactory.desktop
# Install the XPM icon.
install -D -m 644 WrapperFactory.xpm \
$(d_app)/usr/share/pixmaps/WrapperFactory.xpm
# Remove the helper tool; it's in the app bundle.
rm $(d_app)/usr/bin/GSWrapper_Launcher
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installmenu
dh_installman debian/WrapperFactory.1
ifeq ($(GS_USE_FHS),yes)
gsdh_gnustep
override_dh_link:
dh_installdirs usr/share/GNUstep/WrapperFactory.app
# Move the images only; the helper tool must be in Resources, and it's
# arch-dependent so we can't symlink the whole directory.
for i in $(d_app)$(GNUSTEP_SYSTEM_APPS)/WrapperFactory.app/Resources/*.tiff; do \
for i in $(d_app)$(GNUSTEP_SYSTEM_APPS)/*.app/Resources/*.tiff; do \
mv $$i $(d_app)/usr/share/GNUstep/WrapperFactory.app/ \
&& dh_link usr/share/GNUstep/WrapperFactory.app/`basename $$i` \
$(GNUSTEP_SYSTEM_APPS)/WrapperFactory.app/Resources/`basename $$i`; \
done
endif
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment