File: rules

package info (click to toggle)
postgresql-pgmp 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 584 kB
  • ctags: 454
  • sloc: ansic: 2,052; sql: 853; python: 557; makefile: 158; sh: 15
file content (70 lines) | stat: -rwxr-xr-x 2,046 bytes parent folder | download | duplicates (3)
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 := .
include /usr/share/postgresql-common/pgxs_debian_control.mk

build build-arch: build-stamp
build-stamp:
	dh_testdir
	dh_prep
	# package doesn't support o-o-t build yet
	set -e; \
	for version in $$(pg_buildext supported-versions .) ; do \
		pg_config="/usr/lib/postgresql/$$version/bin/pg_config" ; \
		echo "### Cleaning for PostgreSQL $$version" ; \
		$(MAKE) clean PG_CONFIG="$$pg_config" ; \
		echo "### Building for PostgreSQL $$version" ; \
		$(MAKE) PG_CONFIG="$$pg_config" ; \
		echo "### Installing for PostgreSQL $$version" ; \
		destdir="$(CURDIR)/debian/postgresql-$$version-pgmp" ; \
		if [ $$version '>' 9.0 ] ; then \
			mkdir -p $$destdir/usr/share/postgresql/$$version/extension ; \
		fi ; \
		$(MAKE) install PG_CONFIG="$$pg_config" DESTDIR="$$destdir" ; \
		if [ -d $$destdir/usr/share/doc/postgresql-doc* ] ; then \
			mv $$destdir/usr/share/doc/postgresql-doc-*/* $$destdir/usr/share/doc/postgresql-$$version-pgmp ; \
			rmdir $$destdir/usr/share/doc/postgresql-doc-* ; \
		else \
			mv $$destdir/usr/share/doc/postgresql/* $$destdir/usr/share/doc/postgresql-$$version-pgmp ; \
			rmdir $$destdir/usr/share/doc/postgresql ; \
		fi \
	done
	touch $@

build-indep:

clean: debian/control
	dh_testdir
	dh_testroot
	set -e; for version in $$(pg_buildext supported-versions .) ; do \
		pg_config="/usr/lib/postgresql/$$version/bin/pg_config" ; \
		echo "### Cleaning for PostgreSQL $$version" ; \
		$(MAKE) clean PG_CONFIG="$$pg_config" || exit 1 ; \
	done
	rm -rf build-stamp sql/pgmp.sql debian/postgresql-*-pgmp/ debian/*.substvars
	dh_clean

install: build
	dh_testdir
	dh_testroot
	# no dh_prep here, we have already installed stuff

binary binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a
	dh_installdocs -a
	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 binary-indep binary-arch debian/control