File: rules

package info (click to toggle)
osc 0.107-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 456 kB
  • ctags: 453
  • sloc: python: 5,819; perl: 364; makefile: 29; sh: 26
file content (50 lines) | stat: -rwxr-xr-x 1,331 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
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/make -f

#export DH_VERBOSE=1

# Directory where to put tarball from get-orig-source
ORIGTARDIR=../tarballs

# Version used for get-orig-source
VERSION = $(shell dpkg-parsechangelog | grep Version | sed "s/Version: //")
UPSTREAM_VERSION = $(shell echo $(VERSION) | sed 's/\([^-].*\)-.*/\1/')

include /usr/share/dpatch/dpatch.make

build: build-stamp

build-stamp: patch-stamp
	dh build
	touch $@

clean: unpatch
	dh clean

install: build
	dh install --with python_central --until dh_installchangelogs
	dh_installchangelogs NEWS
	dh install --with python_central --after dh_installchangelogs
	# Give the binary sane name
	mv $(CURDIR)/debian/osc/usr/bin/osc-wrapper.py $(CURDIR)/debian/osc/usr/bin/osc
	# Not needed
	rm $(CURDIR)/debian/osc/usr/bin/osc_hotshot.py


binary-arch: build install
# We have nothing to do

binary-indep: build install
	dh binary-indep --with python_central

binary: binary-indep binary-arch

get-orig-source:
	rm -rf rpm
	mkdir rpm
	uscan --destdir rpm --verbose --force-download --no-symlink --upstream-version $(UPSTREAM_VERSION)
	rpm2cpio rpm/*.rpm > rpm/content.cpio
	set -e ; cd rpm ; cpio -iv < content.cpio
	mv rpm/osc-$(UPSTREAM_VERSION).tar.gz $(ORIGTARDIR)/osc_$(UPSTREAM_VERSION).orig.tar.gz
	rm -rf rpm

.PHONY: build clean binary-indep binary-arch binary install get-orig-source