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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
|
#! /usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export SHELL=/bin/bash
include /usr/share/quilt/quilt.make
##################### VERSION NUMBERS ###########################
# GNUstep Gui version :
v_gui := 0.18.0
# GNUstep Back version :
sov_back := $(shell . ./Version; echo $$GNUSTEP_BACK_MAJOR_VERSION.$$GNUSTEP_BACK_MINOR_VERSION)
ifv_back := $(shell . ./Version; echo $$INTERFACE_VERSION_NUMBER)
#################################################################
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
#DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
# make some files executable
dummy := $(shell chmod +x configure)
# package names
p_back = gnustep-back$(sov_back)
p_art = gnustep-back$(sov_back)-art
p_cairo = gnustep-back$(sov_back)-cairo
p_common = gnustep-back-common
p_gpbs = gnustep-gpbs
# package temp dirs
d_back = $(CURDIR)/debian/$(p_back)
d_art = $(CURDIR)/debian/$(p_art)
d_cairo = $(CURDIR)/debian/$(p_cairo)
d_common = $(CURDIR)/debian/$(p_common)
d_gpbs = $(CURDIR)/debian/$(p_gpbs)
# build dirs
b_art = build-art
b_cairo = build-cairo
#------------------------------------------------------------------------------
# GNUstep SETTINGS
# Dirs
include /usr/share/GNUstep/debian/config.mk
export GNUSTEP_MAKEFILES := /usr/share/GNUstep/Makefiles
export GNUSTEP_INSTALLATION_DOMAIN := SYSTEM
# Compiler
CC := $(shell sed -n -e '/^CC[ ]*=/s,.*= *\(.*\),\1,p' \
/$(GS_MAKE_DIR)/config.make)
LDFLAGS := -Wl,-z,defs -Wl,--as-needed
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optim := debug=yes
endif
#------------------------------------------------------------------------------
foo:
echo $(CC)
debian/control: debian/control.m4
m4 \
-DV_MAKE='$(v_make)' \
-DV_BASE='$(v_base)' \
-DV_GUI='$(v_gui)' \
-DSOV_BACK='$(sov_back)' \
debian/control.m4 > debian/control
config: debian/configure-doc-stamp debian/configure-art-stamp debian/configure-cairo-stamp
clean_files += debian/configure-doc-stamp debian/configure-art-stamp debian/configure-cairo-stamp
debian/configure-doc-stamp: debian/configure-art-stamp
@: # dummy configure, to make back.make, etc., for building docs
dh_testdir
CC="$(CC)" \
./configure \
--build=$(DEB_BUILD_GNU_TYPE) \
--host=$(DEB_HOST_GNU_TYPE) \
--target=$(DEB_HOST_GNU_TYPE) \
--with-x \
--enable-graphics=art
touch $@
debian/configure-art-stamp: configure
dh_testdir
mkdir $(b_art)
cp Source -r $(b_art)/Source
cp Tools -r $(b_art)/Tools
ln -s ../Headers ../Version ../back.make.in $(b_art)
cd $(b_art) && ln -s ../GNUmakefile* .
cd $(b_art) && CC="$(CC)" \
../configure \
--build=$(DEB_BUILD_GNU_TYPE) \
--host=$(DEB_HOST_GNU_TYPE) \
--target=$(DEB_HOST_GNU_TYPE) \
--with-x \
--enable-graphics=art \
--with-name=art
touch $@
debian/configure-cairo-stamp: configure
dh_testdir
mkdir $(b_cairo)
cp Source -r $(b_cairo)/Source
ln -s ../Headers ../Version $(b_cairo)
cd $(b_cairo) && CC="$(CC)" \
../configure \
--build=$(DEB_BUILD_GNU_TYPE) \
--host=$(DEB_HOST_GNU_TYPE) \
--target=$(DEB_HOST_GNU_TYPE) \
--with-x \
--enable-graphics=cairo \
--with-name=cairo
touch $@
build: patch build-indep build-arch
build-indep: debian/build-indep-stamp
clean_files += debian/build-indep-stamp
debian/build-indep-stamp: config
$(MAKE) -C Documentation messages=yes
touch $@
build-arch: debian/build-art-stamp debian/build-cairo-stamp
clean_files += debian/build-art-stamp debian/build-cairo-stamp
debian/build-art-stamp: debian/configure-art-stamp
dh_testdir
cd $(b_art) && $(MAKE) messages=yes fonts=no $(optim) \
LDFLAGS="$(LDFLAGS)"
touch $@
debian/build-cairo-stamp: debian/configure-cairo-stamp
dh_testdir
cd $(b_cairo)/Source && $(MAKE) messages=yes fonts=no $(optim) \
LDFLAGS="$(LDFLAGS)"
touch $@
install: install-indep install-arch
install-indep: build-indep
$(MAKE) -C Documentation install DESTDIR=$(d_common)
dh_link -p$(p_common) \
$(GNUSTEP_SYSTEM_DOC)/Developer usr/share/doc/$(p_common)/Developer
install-arch: build-arch pre-install install-art install-cairo
pre-install:
dh_prep
install-art: debian/build-art-stamp
dh_testdir
dh_testroot
dh_installdirs
cd $(b_art) && $(MAKE) install fonts=no DESTDIR=$(d_art)
: # Allow it to be used as a default backend
dh_link -p$(p_art) \
$(GNUSTEP_SYSTEM_LIBRARY)/Bundles/libgnustep-art-$(ifv_back).bundle/libgnustep-art-$(ifv_back) \
$(GNUSTEP_SYSTEM_LIBRARY)/Bundles/libgnustep-art-$(ifv_back).bundle/libgnustep-back-$(ifv_back)
: # Move gpbs to gpbs package
dh_installdirs -p$(p_gpbs) $(GNUSTEP_SYSTEM_TOOLS)
mv $(d_art)/$(GNUSTEP_SYSTEM_TOOLS)/gpbs $(d_gpbs)/$(GNUSTEP_SYSTEM_TOOLS)
rm -rf $(d_art)/$(GNUSTEP_SYSTEM_DOC_MAN) $(d_art)/usr/bin
install-cairo: debian/build-cairo-stamp
dh_testdir
dh_testroot
dh_installdirs
cd $(b_cairo)/Source && $(MAKE) install fonts=no DESTDIR=$(d_cairo)
: # Allow it to be used as a default backend
dh_link -p$(p_cairo) \
$(GNUSTEP_SYSTEM_LIBRARY)/Bundles/libgnustep-cairo-$(ifv_back).bundle/libgnustep-cairo-$(ifv_back) \
$(GNUSTEP_SYSTEM_LIBRARY)/Bundles/libgnustep-cairo-$(ifv_back).bundle/libgnustep-back-$(ifv_back)
# Build architecture-independent files here.
binary-indep: debian/control build-indep install-indep
dh_testdir -i
dh_testroot -i
dh_installchangelogs -i ChangeLog
dh_installdocs -i Documentation/{ANNOUNCE,NEWS,README}
gsdh_gnustep -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
clean_files += debian/gnustep-back$(sov_back)-*.postinst debian/gnustep-back$(sov_back)-*.prerm
binary-arch: debian/control build-arch install-arch
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a ChangeLog
dh_installdocs -a Documentation/{ANNOUNCE,NEWS,README}
gsdh_gnustep -a
dh_installman -p$(p_gpbs) Tools/gpbs.1
dh_link -a
dh_strip -a --dbg-package=gnustep-back-dbg
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:art:g' \
-e 's:@PRIORITY@:10:g' \
debian/gnustep-back.postinst.in > debian/gnustep-back$(sov_back)-art.postinst
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:art:g' \
-e 's:@PRIORITY@:10:g' \
debian/gnustep-back.prerm.in > debian/gnustep-back$(sov_back)-art.prerm
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
-e 's:@PRIORITY@:5:g' \
debian/gnustep-back.postinst.in > debian/gnustep-back$(sov_back)-cairo.postinst
sed -e 's:@GNUSTEP_LIBRARY@:$(GNUSTEP_SYSTEM_LIBRARY):g' \
-e 's:@IFVER@:$(ifv_back):g' \
-e 's:@BACKEND@:cairo:g' \
-e 's:@PRIORITY@:5:g' \
debian/gnustep-back.prerm.in > debian/gnustep-back$(sov_back)-cairo.prerm
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a -V
dh_installdeb -a
@: # override shlibs deps for gnustep-gui to avoid circular dependencies
echo "libgnustep-gui $(sov_back) libgnustep-gui$(sov_back) (>= $(v_gui)), gnustep-gui-runtime (>= $(v_gui))" > debian/shlibs.local
dh_shlibdeps -a \
-l$(d_back)/$(GNUSTEP_SYSTEM_LIBRARIES)
rm debian/shlibs.local
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
# Test that debian/control is up to date
clean_files += debian/control.tmp
test-control:
m4 \
-DV_MAKE='$(v_make)' \
-DV_BASE='$(v_base)' \
-DV_GUI='$(v_gui)' \
-DSOV_BACK='$(sov_back)' \
-DWITH_DEBUG \
debian/control.m4 > debian/control.tmp
diff debian/control debian/control.tmp
clean: clean-patched unpatch
clean-patched: test-control
dh_testdir
dh_testroot
# if config.make does not exist, then we assume that we don't need to
# make clean
if [ -e config.make ]; then \
$(MAKE) -C Documentation clean; \
$(MAKE) -C Documentation distclean; \
fi
rm -f Documentation/version.texi
rm -rf Source/*.bundle
-find -name obj | xargs rm -f
rm -f gnustep-xlib gnustep-back
rm -f Tools/xdnd.c Tools/XGCommonFont.m
rm -f config.h
rm -f config.log config.status
# rm -f Source/libgnustep-back-010Info.plist
rm -f $(clean_files)
rm -rf $(b_art) $(b_cairo)
dh_clean back.make config.make
upstream: build
dh_testdir
dh_testroot
$(MAKE) install fonts=no DESTDIR=$(CURDIR)/debian/upstream
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install upstream config
|