#!/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,--as-needed \ -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 # 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 mkdir -p $(d_app)/usr/share/GNUstep mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/UL.app/Resources \ $(d_app)/usr/share/GNUstep/UL.app # Delete empty directories (fixes a lintian warning). rm -r $(d_app)/usr/include/GNUstep/Framework \ $(d_app)/usr/lib/GNUstep/Tools # Delete the invalid .desktop file and install ours. rm $(d_app)/usr/share/GNUstep/UL.app/*.desktop find $(d_app)/usr/share/GNUstep/UL.app -type f -exec chmod -x '{}' \; chmod -x $(d_app)/usr/lib/GNUstep/Frameworks/ULFramework.framework/Versions/0/Resources/ForceFields/Enzymix/*.ffml override_dh_link: dh_gnustep dh_link usr/share/GNUstep/UL.app \ $(GNUSTEP_SYSTEM_APPS)/UL.app/Resources # We install the libraries at /usr/lib/adun.app. override_dh_makeshlibs: dh_makeshlibs -n