File: rules

package info (click to toggle)
adun.app 0.81-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,212 kB
  • sloc: objc: 71,035; ansic: 6,681; yacc: 394; python: 75; makefile: 41; cpp: 36; xml: 15; awk: 3
file content (72 lines) | stat: -rwxr-xr-x 2,575 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

# Avoid building the bundled StepTalk framework.
export external := no

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optim := debug=yes
endif

%:
	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 $(MAKE) GNUSTEP_MAKE_PARALLEL_BUILDING=no $(optim) \
	  messages=yes $(shell dpkg-buildflags --export=cmdline)
	convert UL/Resources/icon.tiff -resize 32x32 adun.xpm

override_dh_clean:
	dh_clean adun.xpm

override_dh_auto_install:
	$(MAKE) install messages=yes 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_strip:
	dh_strip --dbg-package=adun.app-dbg

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

get-orig-source:
	mkdir -p ../tarballs
	uscan --verbose --force-download --destdir=../tarballs