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
|
#!/usr/bin/make -f
SRCDIR=$(CURDIR)
include /usr/share/postgresql-common/pgxs_debian_control.mk
# Workaround for #488989:
# We need the expanded path at least for the RPATH because the symlink is only
# shipped in gcj-jre-headless which the bbuilt package does not depend on
export USR_LIB_JVM_GCJ := $(shell readlink -f /usr/lib/jvm/java-1.5.0-gcj)
build build-arch: build-stamp
build-stamp:
dh_testdir
test -d $(USR_LIB_JVM_GCJ)/include
test -d $(USR_LIB_JVM_GCJ)/lib
for version in $$(pg_buildext supported-versions .) ; do \
echo "### Building for PostgreSQL $$version" && \
$(MAKE) -C . USE_GCJ=1 PG_CONFIG=/usr/lib/postgresql/$$version/bin/pg_config CPPFLAGS+="-I$(USR_LIB_JVM_GCJ)/include -I$(USR_LIB_JVM_GCJ)/include/linux" PLJAVA_LDFLAGS="-L$(USR_LIB_JVM_GCJ)/lib -Wl,-R$(USR_LIB_JVM_GCJ)/lib -ljvm" && \
mv build build-$$version || exit 1 ; \
done
touch build-stamp
build-indep:
clean: debian/control
dh_testdir
dh_testroot
rm -rf build build-?.? build-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
for version in $$(pg_buildext supported-versions .) ; do \
echo "### Installing for PostgreSQL $$version" && \
mv build-$$version build && \
PKG=postgresql-$$version-pljava-gcj && \
DESTDIR=$(CURDIR)/debian/$$PKG && \
$(MAKE) -C . install USE_GCJ=1 PG_CONFIG=/usr/lib/postgresql/$$version/bin/pg_config DESTDIR=$$DESTDIR && \
install -d $$DESTDIR/usr/share/postgresql-$$version-pljava && \
install -m 644 src/sql/*install.sql build/deploy.jar $$DESTDIR/usr/share/postgresql-$$version-pljava && \
install -d $$DESTDIR/usr/share/doc/$$PKG/examples && \
install -m 644 build/examples.jar $$DESTDIR/usr/share/doc/$$PKG/examples && \
install -d $$DESTDIR/usr/share/lintian/overrides && \
install -m644 debian/lintian-overrides $$DESTDIR/usr/share/lintian/overrides/$$PKG && \
mv build build-$$version || exit 1 ; \
done
binary binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs -a --all debian/README.Debian docs/*.html
dh_installexamples -a --all
dh_install -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary-indep:
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary debian/control
|