File: rules

package info (click to toggle)
jaaa 0.4.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 224 kB
  • ctags: 389
  • sloc: cpp: 2,190; makefile: 70
file content (65 lines) | stat: -rwxr-xr-x 1,317 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f
# -*- makefile -*-

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

MAINPACKAGE?=$(shell dpkg-parsechangelog | sed -n 's/Source: \(.*\)/\1/p')

include /usr/share/quilt/quilt.make

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

build: build-stamp

build-stamp:
	dh_testdir
	$(MAKE)
	docbook-to-man debian/${MAINPACKAGE}.sgml > debian/${MAINPACKAGE}.1
	touch $@

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	$(MAKE) clean
	rm -f debian/${MAINPACKAGE}.1
	dh_clean

binary-arch: build
	dh_testdir
	dh_testroot
	dh_install
	dh_installchangelogs 
	dh_installdocs
	dh_installmenu 
	dh_installman
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch

DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname )

get-orig-source:
	cd ${DEBIAN_DIR}/.. && \
	version=$$(uscan --force-download --dehs | \
	sed -n 's/.*<upstream-version>\(.*\)<\/upstream-version>.*/\1/p') && \
	bzcat ../${MAINPACKAGE}-$${version}.tar.bz2 | gzip --best -c - > \
	${CURDIR}/../${MAINPACKAGE}_$${version}.orig.tar.gz

.PHONY: build clean binary-indep binary-arch binary install configure

#eof "$Id: jaaa	/debian/rules $"