File: rules

package info (click to toggle)
pgfincore 1.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 172 kB
  • ctags: 82
  • sloc: ansic: 610; sql: 263; makefile: 93; sh: 2
file content (32 lines) | stat: -rwxr-xr-x 819 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

EXTNAME = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Source:/ { print substr($$2, 2) }')
PKGVERS = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }')

SRCDIR = $(CURDIR)
TARGET = build-$(EXTNAME)-%v

include /usr/share/postgresql-common/pgxs_debian_control.mk
clean: debian/control
.PHONY: debian/control

override_dh_auto_clean:
	+pg_buildext clean $(SRCDIR) $(TARGET)
	$(MAKE) clean

override_dh_auto_build:
	# build all supported version
	+pg_buildext build $(SRCDIR) $(TARGET)

override_dh_auto_install: 
	# then install each of them
	+pg_buildext install $(SRCDIR) $(TARGET) postgresql-%v-$(EXTNAME)

orig: clean
	git archive --prefix=$(EXTNAME)-$(PKGVERS)/ -o ../$(EXTNAME)_$(PKGVERS).orig.tar.gz HEAD

%:
	dh $@

.PHONY: debian/control