1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
SHELL := /bin/bash
include /usr/share/GNUstep/debian/config.mk
d_app := $(CURDIR)/debian/gnustep-examples
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined
%:
dh $@
override_dh_auto_build:
dh_auto_build -- $(optim) $(verbose) \
$(shell dpkg-buildflags --export=cmdline)
override_dh_installman:
dh_installman debian/gnustep-examples.7
# Create symlinks for the manpage. Deliberately do not derive the
# programs' list from /usr/bin -- if an app is added upstream; the
# manpage has to be updated.
for p in Calculator CurrencyConverter Finger GFractal GSTest \
HostAddress Ink md5Digest MyGL NSBrowserTest NSImageTest \
NSPanelTest NSScreenTest PowerPaint TestDrawing; do \
dh_link usr/share/man/man7/gnustep-examples.7.gz \
usr/share/man/man1/$$p.1.gz; \
done
override_dh_link:
find $(d_app)$(GNUSTEP_SYSTEM_APPS) -name \*.desktop -delete
# Move arch-independent Resources to /usr/share.
gsdh_gnustep --bug-script
dh_installdirs usr/share/GNUstep/GSTest.app
# As above, deliberately hardcode the apps to notice the appearance of
# an offending one (lintian will emit a warning image-file-in-usr-lib).
for p in Calculator CurrencyConverter Finger Ink md5Digest \
NSBrowserTest NSPanelTest PowerPaint; do \
mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/$$p.app/Resources \
$(d_app)/usr/share/GNUstep/$$p.app \
&& dh_link usr/share/GNUstep/$$p.app \
$(GNUSTEP_SYSTEM_APPS)/$$p.app/Resources; \
done
# Convert a translation to fix lintian W: national-encoding.
iconv --from-code=ISO-8859-1 --to-code=UTF-8 \
< gui/Classes/NSPanelTest/Test.strings > \
$(d_app)/usr/share/GNUstep/NSPanelTest.app/Test.strings
# Create PNG icons for the .desktop files.
convert gui/Calculator/Calculator.app.tiff -resize 64x64 \
$(d_app)/usr/share/GNUstep/Calculator.app/Calculator.png
convert gui/Finger/finger.tiff -resize 64x64 \
$(d_app)/usr/share/GNUstep/Finger.app/Finger.png
convert gui/Ink/Ink_app.tiff -resize 64x64 \
$(d_app)/usr/share/GNUstep/Ink.app/Ink.png
# We cannot symlink Resources straight away because they contain
# arch-dependent executables.
for i in \
$(d_app)$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/Image-test.bundle/Resources/*.{tiff,png,svg,pdf}; do \
mv $$i $(d_app)/usr/share/GNUstep/GSTest.app/ \
&& dh_link usr/share/GNUstep/GSTest.app/$${i##*/} \
$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/Image-test.bundle/Resources/$${i##*/}; \
done
for i in \
$(d_app)$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/ImageSelection-test.bundle/Resources/*.{tiff,icns}; do \
mv $$i $(d_app)/usr/share/GNUstep/GSTest.app/ \
&& dh_link usr/share/GNUstep/GSTest.app/$${i##*/} \
$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/ImageSelection-test.bundle/Resources/$${i##*/}; \
done
for i in \
$(d_app)$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/PixelExactDrawing-test.bundle/Resources/*.tiff; do \
mv $$i $(d_app)/usr/share/GNUstep/GSTest.app/ \
&& dh_link usr/share/GNUstep/GSTest.app/$${i##*/} \
$(GNUSTEP_SYSTEM_APPLICATION_SUPPORT)/GSTest/PixelExactDrawing-test.bundle/Resources/$${i##*/}; \
done
|