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
|
#!/usr/bin/make -f
DISABLE_UPDATE_UPLOADERS := 1
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
STAMP_DIR := debian/stampdir
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
LDFLAGS += -Wl,-Bsymbolic -Wl,-O1 -Wl,-z,defs -Wl,--as-needed
DEBVERSION := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
VERSION := $(shell echo $(DEBVERSION) | sed -e 's/-[^-]*$$//')
SONAME := 0
configure_flags := \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--sysconfdir=/etc \
--disable-schemas-install
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
configure_flags += --build=$(DEB_BUILD_GNU_TYPE)
else
configure_flags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
$(STAMP_DIR)/configure-stamp:
dh_testdir
mkdir $(STAMP_DIR)
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(configure_flags)
touch $@
configure: $(STAMP_DIR)/configure-stamp
$(STAMP_DIR)/build-stamp: $(STAMP_DIR)/configure-stamp
dh_testdir
$(MAKE)
touch $@
build: $(STAMP_DIR)/build-stamp
$(STAMP_DIR)/check-stamp: $(STAMP_DIR)/build-stamp
dh_testdir
# testsuite failures are ignored
-$(MAKE) check
touch $@
check: $(STAMP_DIR)/check-stamp
$(STAMP_DIR)/install-stamp: $(STAMP_DIR)/build-stamp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
touch $@
install: $(STAMP_DIR)/install-stamp
# gross kludge to force control generation with the %.in target
clean::
touch debian/control.in
debian/%: debian/%.in
dh_testdir
sed \
-e "s#@SONAME@#$(SONAME)#g" \
-e "s#@VERSION@#$(VERSION)#g" \
-e "s#@GNOME_TEAM@#$(UPLOADERS)#g" \
$@.in > $@
clean:: debian/control
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
-rm -rf $(STAMP_DIR)
-rm -f debian/libgail-gnome-module.docs
dh_clean
maybe_check = $(if $(findstring nocheck,$(DEB_BUILD_OPTIONS)),,check)
binary-indep:
binary-arch: build $(maybe_check) install debian/libgail-gnome-module.docs
dh_testdir
dh_testroot
dh_install -a
dh_installchangelogs -plibgail-gnome-module ChangeLog
dh_installdocs -plibgail-gnome-module
dh_link -a
dh_gconf -a
dh_strip -a --dbg-package=libgail-gnome-dbg
dh_compress -a
dh_fixperms -a
dh_installdeb -a
# override shlibs for libraries from this source before computing
# dependencies of packages generated from this source; we already have
# inter-dependencies expressed manually in the control file, we do not
# need the shlibs to add duplicates
cat debian/*/DEBIAN/shlibs | \
sed -n -r -e 's/(([^ ]+: )?([^ ]+) ([^ ]+)) .*/\1/p' \
>debian/shlibs.local
dh_shlibdeps -a
-rm -f debian/shlibs.local
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: configure build check install clean binary-indep binary-arch binary
|