#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # +pie breaks linking: libgsl.so: undefined reference to cblas_* export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow include /usr/share/GNUstep/debian/config.mk d_app := $(CURDIR)/debian/tmp export DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined \ -Wl,-rpath,/usr/lib/adun.app export DEB_CFLAGS_MAINT_APPEND := -fgnu89-inline # As of GCC 7, the build log gets flooded with warnings for unportable # gnustep-base version macros (-Wexpansion-to-defined, enabled by # -Wextra). Silence the warnings to make the build log readable; the # macros are perfectly fine for Debian where a capable preprocessor is # used on all architectures. export DEB_OBJCFLAGS_MAINT_APPEND := -Wno-expansion-to-defined # Silence warnings for casts between incompatible function types, # enabled by -Wextra. It is perfectly fine to cast IMP to another # function provided the prototypes match (which upstream code does). DEB_OBJCFLAGS_MAINT_APPEND += -Wno-cast-function-type # All of the package's libraries/frameworks have incomplete APIs with # stubs or incomplete functions/methods which cause a lot of # unused-parameter compiler warnings. Rather than adding # __attribute__ ((unused)) everywhere or removing the unused # parameters, suppress these warnings explicitly. DEB_OBJCFLAGS_MAINT_APPEND += -Wno-unused-parameter # Do the same for the C library libadun_base although most of the # warnings are fixed in gcc-warnings.patch. DEB_CFLAGS_MAINT_APPEND += -Wno-unused-parameter # Avoid building the bundled StepTalk framework. export external := no %: dh $@ override_dh_auto_build: # Upstream's makefiles have conditionals based on $(MAKELEVEL) so that # building separate components and the whole package from toplevel # works. They all evaluate to false when building the Debian package, # because debian/rules is itself a makefile -- resetting MAKELEVEL # does the trick. # GNUstep Make 2.2.0 gained support for parallel (-jN) building, which # is implemented by delegating the actual compilation to sub-makes # which run in parallel (i.e. the build system invokes # $(MAKE) -f GNUmakefile ...). This is the default mode of operation, # even if no -j option is used. GNUSTEP_MAKE_PARALLEL_BUILDING=no # prevents messing the MAKELEVEL again. MAKELEVEL=0 dh_auto_build -- GNUSTEP_MAKE_PARALLEL_BUILDING=no \ $(optim) $(verbose) $(shell dpkg-buildflags --export=cmdline) override_dh_auto_install: dh_auto_install -- $(verbose) DESTDIR=$(d_app) \ GNUSTEP_SYSTEM_LIBRARIES=/usr/lib/adun.app \ GNUSTEP_INSTALLATION_DOMAIN=SYSTEM # Delete empty directories (fixes a lintian warning). rm -r $(d_app)$(GNUSTEP_SYSTEM_HEADERS)/Framework \ $(d_app)$(GNUSTEP_SYSTEM_LIBRARY)/Tools execute_before_dh_link: gsdh_gnustep -padun.app --app --bundle gsdh_gnustep -padun-core convert UL/Resources/icon.tiff -resize 64x64 \ debian/adun.app/usr/share/GNUstep/UL.app/UL.png execute_after_dh_fixperms: find debian/adun.app/usr/share/GNUstep/UL.app -type f \ -exec chmod -x '{}' \; chmod -x debian/adun-core$(GNUSTEP_SYSTEM_FRAMEWORKS)/ULFramework.framework/Versions/0/Resources/ForceFields/Enzymix/*.ffml # We install the libraries at /usr/lib/adun.app. override_dh_makeshlibs: dh_makeshlibs -n