File: rules

package info (click to toggle)
openr2 1.3.0-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,608 kB
  • ctags: 1,052
  • sloc: ansic: 9,087; sh: 9,033; makefile: 60
file content (51 lines) | stat: -rwxr-xr-x 1,756 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
51
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PACKAGE:=openr2
DEBVERSION:=$(shell head -n 1 debian/changelog \
		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
DEB_NOEPOCH_VERSION:=$(shell echo $(DEBVERSION) | cut -d':' -f 2)
DEB_SRC_VERSION:=$(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/-[0-9.a-z]*$$//')
UPVERSION:=$(shell echo $(DEB_SRC_VERSION) | sed -e 's/[.~]dfsg//' -e 's/~\(\(rc\|beta\)[0-9]\)/\1/')

FILENAME := $(PACKAGE)_$(DEB_SRC_VERSION).orig.tar.gz
UPFILENAME := $(PACKAGE)_$(UPVERSION).orig.tar.gz
URL := http://openr2.googlecode.com/files/$(PACKAGE)-$(UPVERSION).tar.gz

%:
	dh $@

# This could be used once we don't care about Lenny anymore:
#override_dh_auto_configure:
#	autoreconf -i
#	dh_auto_configure -- --sysconfdir=/etc/openr2

# But for the sake of Lenny backports:
build: build-stamp
build-stamp:
	dh build --before configure
	autoreconf -i
	dh_auto_configure -- --sysconfdir=/etc/openr2
	dh build --after configure
	touch $@

print-version:
	@@echo "Debian version:          $(DEBVERSION)"
	@@echo "Upstream version:        $(UPVERSION)"

get-orig-source:
	@@dh_testdir
	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
	@@echo Downloading $(FILENAME) from $(URL) ...
	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)

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