File: rules

package info (click to toggle)
gnustep-gui 0.32.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,348 kB
  • sloc: objc: 178,763; ansic: 24,089; cpp: 664; yacc: 464; sh: 90; makefile: 72
file content (111 lines) | stat: -rwxr-xr-x 3,543 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/make -f
#export DH_VERBOSE = 1

include /usr/share/GNUstep/debian/config.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-undefined

##### VERSION NUMBERS #################################

# GNUstep Base version:
v_base  := 1.31

# GNUstep Gui/Back version:
v_gui   := $(shell . ./Version; echo $$VERSION)

# GNUstep Gui/Back SONAME version:
sov_gui := $(shell . ./Version; echo $$GNUSTEP_GUI_MAJOR_VERSION.$$GNUSTEP_GUI_MINOR_VERSION)

#### PACKAGES NAMES ###################################
p_com           = gnustep-gui-common
p_run           = gnustep-gui-runtime
p_lib           = libgnustep-gui$(sov_gui)
p_dev           = libgnustep-gui-dev
p_doc           = gnustep-gui-doc
#######################################################

%:
	dh $@

# Ensure that debian/control is always up-to-date.
override_dh_testdir:
	m4 \
	    -DV_BASE='$(v_base)' \
	    -DV_GUI='$(v_gui)' \
	    -DSOV_GUI='$(sov_gui)' \
	    debian/templates/control.m4 > debian/control
	dh_testdir

override_dh_auto_configure:
# Generate the lintian overrides file automatically, to avoid renames
# when the SONAME is bumped.
	m4 -DSOV_GUI='$(sov_gui)' \
	  debian/templates/libgnustep-guiN.overrides.m4 \
	  > debian/libgnustep-gui$(sov_gui).lintian-overrides
# If "nodoc" is present in DEB_BUILD_OPTIONS, the -doc package is
# created nearly empty.  If it is also in DEB_BUILD_PROFILES,
# gnustep-gui-doc is not built at all.  Manpages shipped in the
# -common package are also not installed if "nodoc" is set.
ifndef docs
	sed -i '$$d' debian/$(p_com).install
else
	cp debian/templates/$(p_doc).install.in debian/$(p_doc).install
	cp debian/templates/$(p_doc).links.in debian/$(p_doc).links
endif
	cp debian/templates/libgnustep-guiN.install.in debian/$(p_lib).install
	cp debian/templates/libgnustep-guiN.docs.in debian/$(p_lib).docs
	dh_auto_configure -- \
	  --enable-imagemagick

override_dh_auto_build-arch:
	dh_auto_build -- $(verbose) $(optim) doc=no \
	    $(shell dpkg-buildflags --export=cmdline)
	dh_auto_build -- -C Source $(verbose) doc=no shared=no

override_dh_auto_build-indep:
	dh_auto_build -- $(verbose) doc=no
ifdef docs
	dh_auto_build -- -C Documentation $(verbose) $(docs)
endif

override_dh_auto_test:
	dh_auto_test || (cat Tests/tests.log; exit 1)

override_dh_auto_install-arch:
	dh_auto_install -- doc=no
	dh_auto_install -- -C Source doc=no shared=no

override_dh_auto_install-indep:
	dh_auto_install -- doc=no
ifdef docs
	dh_auto_install -- -C Documentation $(docs)
# Delete duplicate files already shipped at /usr/share/doc/.
	$(RM) -r debian/tmp$(GNUSTEP_SYSTEM_DOC)/Developer/Gui/ReleaseNotes/0.*
endif

override_dh_auto_clean-indep:
	dh_auto_clean -- doc=yes

# Doc symlinks
override_dh_installdocs:
	dh_installdocs -p$(p_run) --link-doc=$(p_lib)
	dh_installdocs -p$(p_dev) --link-doc=$(p_lib)
	dh_installdocs --remaining-packages

execute_before_dh_link:
# Process -runtime first if it's a full build so that the symlinks to
# /usr/share are created/installed there.
ifneq (,$(filter $(p_run),$(shell dh_listpackages)))
	gsdh_gnustep -p$(p_run) --app --bundle-dir=ColorPickers \
	  --move-to=$(p_com)
	gsdh_gnustep --remaining-packages
else
	gsdh_gnustep --app --bundle-dir=ColorPickers --move-to=$(p_com)
endif

override_dh_shlibdeps:
# First calculate shlib dependencies of all -gui packages
	dh_shlibdeps
# Then recalculate dependencies of shared lib
	dh_makeshlibs -p$(p_lib) \
	    -V '$(p_lib) (>= $(v_gui)), gnustep-gui-runtime (>= $(v_gui)), gnustep-back$(sov_gui)'