File: rules

package info (click to toggle)
python-peak.rules 0.5a1%2Br2713-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 632 kB
  • ctags: 658
  • sloc: python: 3,625; makefile: 29
file content (39 lines) | stat: -rwxr-xr-x 1,528 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
33
34
35
36
37
38
39
#!/usr/bin/make -f
PKG = python-peak.rules
VERSION = $(shell dpkg-parsechangelog -S Version | sed 's,-.*,,')

TAR_EXTRA_ARGS = --owner root --group root --mode a+rX

PRIORITIZED_METHODS = prioritized_methods-0.2.2dev-20110830
DEB_PRIORITIZED_METHODS_DIR = $(subst _,-,$(subst .,-,$(PRIORITIZED_METHODS)))

export SUBDIRS = rules $(DEB_PRIORITIZED_METHODS_DIR)

%:
	dh $@ --with python2

override_dh_auto_install:
	dh_auto_install
	rm -f debian/$(PKG)/usr/lib/python*/dist-packages/*.pth

override_dh_installdocs:
	# Generate README for prioritized_methods out of its PKG-INFO.
	egrep -i '^( |description:)' $(DEB_PRIORITIZED_METHODS_DIR)/PKG-INFO > \
		README.prioritized_methods.txt
	dh_installdocs

get-orig-source:
	$(eval GOS_TMP_DIR := $(shell mktemp -d $(PKG)-XXXXXXXXX))
	uscan --no-conf --force-download --destdir $(GOS_TMP_DIR) --no-symlink
	uscan --no-conf \
		--watchfile debian/`echo $(PRIORITIZED_METHODS) | cut -d- -f1`.watch \
		--upstream-version 0 --download-version `echo $(PRIORITIZED_METHODS) | cut -d- -f2,3` \
		--download --destdir $(GOS_TMP_DIR) --no-symlink
	mv $(GOS_TMP_DIR)/$(PRIORITIZED_METHODS).tar.gz \
		$(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig-`echo $(PRIORITIZED_METHODS) | tr ._ -`.tar.gz
	# Create manually the empty main package
	mkdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
	cd $(GOS_TMP_DIR); GZIP=--best tar -cz $(TAR_EXTRA_ARGS) -f $(PKG)_$(VERSION).orig.tar.gz $(PKG)-$(VERSION)
	rmdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
	mv $(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig* $(CURDIR)
	rm -Rf $(GOS_TMP_DIR)