File: rules

package info (click to toggle)
adun.app 0.81-13
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,600 kB
  • sloc: objc: 70,912; ansic: 6,662; yacc: 394; python: 75; cpp: 36; makefile: 33; xml: 15; awk: 3
file content (72 lines) | stat: -rwxr-xr-x 3,141 bytes parent folder | download
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
#!/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