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
|
include /usr/share/dpkg/pkg-info.mk
upstreamversion=$(DEB_VERSION_UPSTREAM)
versionh=$(shell echo $(upstreamversion) | sed -e 's/\.[^.]*$$//')
versiont=$(shell echo $(upstreamversion) | sed -e 's/^.*\.//')
nextupstreamversion=$(shell echo $(versionh).$$(expr $(versiont) + 1))
epoch=$(shell perl -nE 'print $$1 if m{^m4_define\S\[goffice_version_epoch\],\s*\[(\d+)\]};' configure.ac)
somajor=$(shell perl -nE 'print $$1 if m{^m4_define\S\[goffice_version_major\],\s*\[(\d+)\]};' configure.ac)
apiver=$(epoch).$(somajor)
pruntime=libgoffice-$(apiver)-$(somajor)
pcommon=$(pruntime)-common
pdevel=libgoffice-$(apiver)-dev
pdoc=libgoffice-$(apiver)-doc
pgir=gir1.2-goffice-$(apiver)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CFLAGS += -Wall -g
LDFLAGS += -Wl,-z,defs
LDFLAGS += -Wl,-O1
LDFLAGS += -Wl,--as-needed
LDFLAGS += -L/usr/X11R6/lib
confflags := -v \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info
confflags += --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--datadir=\$${prefix}/share \
--libdir=\$${prefix}/lib
confflags += --disable-iso-c \
--disable-silent-rules \
--enable-compile-warnings=maximum
confflags += --enable-static --enable-gtk-doc --enable-introspection=yes
%:
dh $@ --with autoreconf,gir
override_dh_clean:
$(RM) -rv build
dh_clean
override_dh_autoreconf:
dh_autoreconf --as-needed
cd po && intltool-update -p
override_dh_auto_configure:
$(info I: library-name=$(pruntime))
$(if $(wildcard debian/$(pruntime).install),,$(error Packaging files are not set up for base library name $(pruntime).))
dh_auto_configure -- $(confflags)
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp
find $(CURDIR)/debian -name '*.la' -delete -printf 'removed %p\n'
override_dh_install:
dh_install --sourcedir=debian/tmp -Xindex.sgml
while read l ; do \
$(RM) -rv debian/$(pruntime)/$$l ; \
done < debian/$(pcommon).install
find $(CURDIR)/debian -type d -empty -delete -printf 'removed %p\n'
override_dh_makeshlibs:
dh_makeshlibs -V -Xplugins
override_dh_strip:
dh_strip --dbgsym-migration='libgoffice-dbg (<< 0.10.29~)'
override_dh_gencontrol:
dh_gencontrol -v -- -VUpstream-Version=$(upstreamversion) -Vapiver=$(apiver)
override_dh_girepository:
dh_girepository -p$(pgir)
override_dh_auto_test:
ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),powerpc ppc64el))
@echo "======== will not abort on test(s) failure ========"
-dh_auto_test
else
dh_auto_test
endif
|