File: rules

package info (click to toggle)
openr2 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 2,492 kB
  • sloc: sh: 10,230; ansic: 9,177; makefile: 61
file content (40 lines) | stat: -rwxr-xr-x 1,476 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
#!/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 $@

override_dh_auto_configure:
	dh_auto_configure -- --sysconfdir=/etc/openr2

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