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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
#!/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 Back version:
v_back := $(shell . ./Version; echo $$VERSION)
# GNUstep Back SONAME version:
sov_back := $(shell . ./Version; echo $$GNUSTEP_BACK_MAJOR_VERSION.$$GNUSTEP_BACK_MINOR_VERSION)
# GNUstep Back INTERFACE version:
ifv_back := $(shell . ./Version; echo $$INTERFACE_VERSION_NUMBER)
# GNUstep GUI version:
v_gui := $(v_back)
# GNUstep GUI SONAME version:
sov_gui := $(sov_back)
#### PACKAGES NAMES #############################################
p_back = gnustep-back$(sov_back)
p_cairo = gnustep-back$(sov_back)-cairo
p_headless = gnustep-back$(sov_back)-headless
p_xlib = gnustep-back$(sov_back)-xlib
p_common = gnustep-back-common
#### DIRS #######################################################
# build dirs
b_cairo = $(CURDIR)/build-cairo
b_headless = $(CURDIR)/build-headless
b_xlib = $(CURDIR)/build-xlib
#################################################################
%:
dh $@
# Ensure that debian/control is always up-to-date.
override_dh_testdir:
m4 \
-DV_GUI='$(v_gui)' \
-DSOV_GUI='$(sov_gui)' \
-DSOV_BACK='$(sov_back)' \
debian/templates/control.m4 > debian/control
override_dh_auto_configure:
# Generate gnustep-back-common.bug-script file.
sed -e 's:@IFVER@:$(ifv_back):g' \
debian/templates/$(p_common).bug-script.in \
> debian/$(p_common).bug-script
# Generate gnustep-backN-cairo.postinst file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
-e 's:@PRIORITY@:15:g' \
debian/templates/gnustep-backN-backend.postinst.in > debian/$(p_cairo).postinst
# Generate gnustep-backN-cairo.prerm file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
-e 's:@PRIORITY@:15:g' \
debian/templates/gnustep-backN-backend.prerm.in > debian/$(p_cairo).prerm
# Generate gnustep-backN-headless.postinst file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:headless:g' \
-e 's:@PRIORITY@:1:g' \
debian/templates/gnustep-backN-backend.postinst.in > debian/$(p_headless).postinst
# Generate gnustep-backN-headless.prerm file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:headless:g' \
-e 's:@PRIORITY@:1:g' \
debian/templates/gnustep-backN-backend.prerm.in > debian/$(p_headless).prerm
# Generate gnustep-backN-xlib.postinst file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:xlib:g' \
-e 's:@PRIORITY@:5:g' \
debian/templates/gnustep-backN-backend.postinst.in > debian/$(p_xlib).postinst
# Generate gnustep-backN-xlib.prerm file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:xlib:g' \
-e 's:@PRIORITY@:5:g' \
debian/templates/gnustep-backN-backend.prerm.in > debian/$(p_xlib).prerm
# Generate gnustep-backN-cairo.install file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
debian/templates/gnustep-backN-backend.install.in > debian/$(p_cairo).install
# Generate gnustep-backN-headless.install file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:headless:g' \
debian/templates/gnustep-backN-backend.install.in > debian/$(p_headless).install
# Generate gnustep-backN-xlib.install file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:xlib:g' \
debian/templates/gnustep-backN-backend.install.in > debian/$(p_xlib).install
# Generate gnustep-backN-cairo.links file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
debian/templates/gnustep-backN-backend.links.in > debian/$(p_cairo).links
# Generate gnustep-backN-headless.links file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:headless:g' \
debian/templates/gnustep-backN-backend.links.in > debian/$(p_headless).links
# Generate gnustep-backN-xlib.links file.
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:xlib:g' \
debian/templates/gnustep-backN-backend.links.in > debian/$(p_xlib).links
# Generate gnustep-backN.docs file.
sed -e 's,@GS_LIBRARY@,$(GNUSTEP_SYSTEM_LIBRARY),g' \
debian/templates/gnustep-backN.docs.in > debian/$(p_back).docs
# Configure cairo backend.
dh_auto_configure -- --enable-graphics=cairo --with-name=cairo
# Configure the headless backend in a separate build dir. Note the
# addition of --enable-server.
dh_auto_configure --builddirectory=$(b_headless) -- \
--enable-server=headless --enable-graphics=headless \
--with-name=headless
cp Source -r $(b_headless)/Source
ln -sf \
../Version ../Headers ../configure ../back.make.in \
../GNUmakefile ../GNUmakefile.postamble \
$(b_headless)
# Configure xlib backend in a separate build dir.
dh_auto_configure --builddirectory=$(b_xlib) -- \
--enable-graphics=xlib --with-name=xlib
cp Source -r $(b_xlib)/Source
cp Tools -r $(b_xlib)/Tools
ln -sf \
../Version ../Headers ../configure ../back.make.in \
../GNUmakefile ../GNUmakefile.postamble \
$(b_xlib)
# dpkg-buildflags must be supplied on the command line because
# gnustep-make resets OBJCFLAGS and CFLAGS.
override_dh_auto_build:
dh_auto_build -- -C Documentation
# Build cairo backend
dh_auto_build -- $(verbose) $(optim) SERIAL_SUBDIRECTORIES=Source \
$(shell dpkg-buildflags --export=cmdline)
# Build the headless backend.
dh_auto_build --builddirectory=$(b_headless) -- \
$(verbose) $(optim) SERIAL_SUBDIRECTORIES=Source \
$(shell dpkg-buildflags --export=cmdline)
# Build xlib + tools
dh_auto_build --builddirectory=$(b_xlib) -- \
$(verbose) $(optim) fonts=no \
$(shell dpkg-buildflags --export=cmdline)
override_dh_auto_install:
dh_auto_install -- -C Documentation
# Install cairo backend
dh_auto_install -- SERIAL_SUBDIRECTORIES=Source
# Install the headless backend.
dh_auto_install --builddirectory=$(b_headless) -- \
SERIAL_SUBDIRECTORIES=Source
# Install the xlib backend along with the tools.
dh_auto_install --builddirectory=$(b_xlib) -- fonts=no
# Delete duplicate files already shipped at /usr/share/doc/.
$(RM) -r debian/tmp$(GNUSTEP_SYSTEM_DOC)/Developer/Back/ReleaseNotes
override_dh_auto_clean:
-dh_auto_clean -- -C Documentation
dh_auto_clean
rm -rf $(b_cairo) $(b_headless) $(b_xlib)
execute_before_dh_link:
gsdh_gnustep
# gnustep-gui's shlibs *must* be overridden, otherwise there are
# circular dependencies (#882078).
override_dh_shlibdeps:
echo \
"libgnustep-gui $(sov_back) libgnustep-gui$(sov_back) (>= $(v_gui)), gnustep-gui-runtime (>= $(v_gui))" \
> debian/shlibs.local
dh_shlibdeps
rm debian/shlibs.local
|