File: pgxs_debian_control.mk

package info (click to toggle)
postgresql-common 134wheezy4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 772 kB
  • sloc: perl: 2,345; sh: 437; makefile: 36
file content (19 lines) | stat: -rw-r--r-- 661 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# produce a debian/control file from a debian/control.in
#
# In debian/rules, include /usr/share/postgresql-common/pgxs_debian_control.mk
# build: debian/control
#
# Author: Dimitri Fontaine <dfontaine@hi-media.com>
#
debian/control: debian/control.in debian/pgversions
	(set -e; \
	VERSIONS=`pg_buildext supported-versions $(CURDIR)` || exit $$?; \
	grep-dctrl -vP PGVERSION $< > $@.pgxs_tmp; \
	for v in $$VERSIONS; \
        do                                         \
		grep -q "^$$v" debian/pgversions   \
		&& grep-dctrl -P PGVERSION $<      \
		| sed -e "s:PGVERSION:$$v:" >> $@.pgxs_tmp; \
	done; \
	mv $@.pgxs_tmp $@) || (rm -f $@.pgxs_tmp; exit 1)