File: rules

package info (click to toggle)
droopy 0.20131121-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 84 kB
  • ctags: 71
  • sloc: python: 765; makefile: 10
file content (14 lines) | stat: -rwxr-xr-x 641 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/make -f

%:
	dh $@ --with python2

DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | sed 's/-[^-]*$$//')
DIR := $(DEB_SOURCE)-$(UPSTREAM_VERSION)
DATE := $(shell echo $(UPSTREAM_VERSION) | sed 's/^.*\.//' | sed 's/^\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)$$/\1-\2-\3/')

get-orig-source:
	rm -rf /tmp/$(DIR)
	git clone git://gitorious.org/droopy/droopy.git /tmp/$(DIR)
	cd /tmp/$(DIR) && git archive --prefix=$(DIR)/ $$(git rev-list -n 1 --before=$(DATE) master) | xz -c > $(CURDIR)/../$(DEB_SOURCE)_$(UPSTREAM_VERSION).orig.tar.xz