File: rules

package info (click to toggle)
zodb 1:3.10.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,988 kB
  • ctags: 5,875
  • sloc: python: 33,695; ansic: 7,673; xml: 474; sh: 20; makefile: 18
file content (29 lines) | stat: -rwxr-xr-x 890 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
#!/usr/bin/make -f

export PYBUILD_NAME=zodb

# All tests are run by autopkgtest.
export PYBUILD_DISABLE = test

PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
PKG  = $(word 2, $(shell dpkg-parsechangelog -l$(PKD)/changelog))
UVER = $(shell dpkg-parsechangelog -l$(PKD)/changelog | \
               sed -nr 's/^Version: (.*:)?(.*)-(.*)/\2/p')

.PHONY: get-orig-source
get-orig-source: $(PKG)_$(UVER).orig.tar.gz
$(PKG)_$(UVER).orig.tar.gz:
	set $(UVER); wget -O $@ https://github.com/zopefoundation/ZODB/archive/$${1#*.g}.tar.gz

%:
	dh $@ --with python2 --buildsystem=pybuild

override_dh_install:
	dh_install
	# remove C source files
	find debian/python-zodb -name '*.c' -delete
	# remove persistent module provided by python-persistent instead
	find debian/python-zodb -type d -name 'persistent' -prune -exec rm -rf {} \;

override_dh_installchangelogs:
	dh_installchangelogs src/CHANGES.txt