blob: b7a407eb5644aeaf429d7796b506d4f2c5f8e5e7 (
plain)
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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_BUILD_OPTIONS := nostrip nocheck
export DEB_BUILD_OPTIONS
PG_BUILDEXT = pg_buildext
include /usr/share/postgresql-common/pgxs_debian_control.mk
override_dh_auto_clean:
for v in $$($(PG_BUILDEXT) supported-versions . ) ; do \
rm -rf debian/postgresql-plproxy-$${v}; \
done
dh_auto_clean -- clean || exit 0
override_dh_auto_install:
mkdir -p $(CURDIR)/debian/tmp
for v in $$($(PG_BUILDEXT) supported-versions . ) ; do \
echo "### Building for PostgreSQL $${v}" && \
$(MAKE) clean install \
PG_CONFIG=/usr/lib/postgresql/$${v}/bin/pg_config \
DESTDIR=$(CURDIR)/debian/tmp \
|| exit 1 ; \
done
%:
dh $@
.PHONY: orig realclean
PKGVERS = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }')
srcpkg = plproxy2_$(PKGVERS)
srctar = $(srcpkg).orig.tar.gz
dst = ext/$(srcpkg)
orig:
rm -rf ext
mkdir -p $(dst)
git archive HEAD | tar xf - -C $(dst)
rm -rf $(dst)/debian
cd ext && tar czf ../../$(srctar) $(srcpkg)
rm -rf ext
realclean:
rm -rf debian/tmp debian/*.log debian/*.substvars
rm -f debian/control-stamp debian/files
for v in `cat debian/pgversions`; do rm -rf debian/postgresql-plproxy-$${v}; done
grep-dctrl -vP PGVERSION debian/control.in > debian/control
|