File: rules

package info (click to toggle)
pyxmms-remote 1.12-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 568 kB
  • ctags: 21
  • sloc: sh: 600; python: 280; makefile: 63
file content (78 lines) | stat: -rwxr-xr-x 2,105 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
#! /usr/bin/make -f

PACKAGE         := pyxmms-remote
PKG_INSTALL_DIR := $(CURDIR)/debian/$(PACKAGE)

MANPAGE_SOURCE  := debian/pyxmms-remote.sgml
MANPAGE         := pyxmms-remote.1

WGET            := wget


build: build-indep

build-indep: build-indep-stamp
build-indep-stamp: config.status
	dh_testdir doc/pyxmms-remote.texi
# Build the documentation
	rm -f build-indep-stamp
	$(MAKE)
	docbook-to-man "$(MANPAGE_SOURCE)" > "$(MANPAGE)"
	touch build-indep-stamp

config.status: configure
# No need for --build or --host options for this package, since it generates
# no binaries. No need for CFLAGS either.
	./configure --prefix=/usr --mandir='$${prefix}/share/man' \
                                  --infodir='$${prefix}/share/info'

clean:
	dh_testdir pyxmms-remote
	dh_testroot
	rm -f build-indep-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f "$(MANPAGE)"
	dh_clean

binary-indep: build-indep
	dh_testdir
	dh_testroot
	dh_clean

	$(MAKE) install "DESTDIR=$(PKG_INSTALL_DIR)"

	dh_installdocs -i doc/pyxmms-remote.html README NEWS
	dh_installinfo -i doc/pyxmms-remote.info*
	dh_installman -i "$(MANPAGE)"
	dh_installchangelogs -i ChangeLog

	dh_installmime -i

	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:
# We have nothing to do here but the Debian Policy says this target must
# exist.

binary: binary-indep binary-arch

# FIXME: mktemp(1) says:
#     Debian packages using mktemp in maintainer scripts must depend on
#     debianutils >= 1.7.
# but is it really necessary when it is only used in get-orig-source?
# And, agreed, it is not essential here...
get-orig-source:
	TMPFILE="`mktemp -t PyXMMS-remote.XXXXXXXXXX`" && \
        $(WGET) -O  "$$TMPFILE" \
           http://www.via.ecp.fr/~flo/2002/PyXMMS-remote/dist/latest && \
        LATEST_UPSTREAM_VERSION=`tar tzf "$$TMPFILE" | head -1 \
          | sed 's/.*-\([0-9]*\.[0-9]*\)\//\1/'` && \
        mv "$$TMPFILE" pyxmms-remote_$${LATEST_UPSTREAM_VERSION}.orig.tar.gz

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