File: rules

package info (click to toggle)
miro 1.2.3-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 60,356 kB
  • ctags: 15,099
  • sloc: cpp: 58,491; python: 40,363; ansic: 796; xml: 265; sh: 197; makefile: 167
file content (53 lines) | stat: -rwxr-xr-x 2,249 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
#!/usr/bin/make -f

DEB_PYTHON_SYSTEM = pysupport
DEB_PYTHON_COMPILE_VERSION = $(shell pyversions -vd 2>/dev/null)

# Must be included before python-distutils.mk to use dh_python/dh_pysupport.
include /usr/share/cdbs/1/rules/debhelper.mk

# Use Python distutils to install the package.
include /usr/share/cdbs/1/class/python-distutils.mk

# Must come after python-distutils.mk.
DEB_PYTHON_SETUP_CMD := platform/gtk-x11/setup.py

include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

# Install everything into debian/tmp, as we have a multi-binary package.
DEB_DH_INSTALL_SOURCEDIR := debian/tmp

binary-post-install/miro::
	@# Remove unneeded files from the deb.
	rm -rf debian/miro/usr/share/python-support/miro/miro/frontends/html/compiled_templates/unittest
	rm -rf debian/miro/usr/share/python-support/miro/miro/test
	rm -rf debian/miro/usr/share/python-support/miro/miro/coverage.py
	rm -rf debian/miro/usr/share/python-support/miro/miro/timetemplates.py
	@# Strip the RPATH. Upstream ships a wrapper that makes it unnecessary.
	chrpath -d debian/miro/usr/lib/python-support/miro/python$(DEB_PYTHON_COMPILE_VERSION)/miro/platform/MozillaBrowser.so
	@# Put xine_extractor into /usr/lib/miro, not /usr/libexec.
	@mkdir -p debian/miro/usr/lib/miro
	cp debian/tmp/usr/libexec/xine_extractor debian/miro/usr/lib/miro
	@# Copy xpm file (for the Debian menu icon).
	cp debian/miro.xpm debian/miro/usr/share/pixmaps
	@# Add a miro.real(1) manpage (just a copy of miro(1)).
	cp debian/miro/usr/share/man/man1/miro.1.gz \
		debian/miro/usr/share/man/man1/miro.real.1.gz

binary-post-install/miro-data::
	@# Remove unneeded files from the miro-data deb.
	rm -rf debian/miro-data/usr/share/miro/resources/testdata
	rm -rf debian/miro-data/usr/share/miro/resources/templates/unittest

clean::
	@# TODO: This should probably be done in the upstream source.
	rm -rf portable/frontends/html/compiled_templates/*
	rm -f platform/gtk-x11/platform/frontends/html/MozillaBrowser.[ch]
	rm -f platform/gtk-x11/platform/frontends/html/xlibhelper.c
	rm -f platform/gtk-x11/miro.1.gz
	rm -f platform/gtk-x11/xine/xine_extractor

# For /usr/share/cdbs/1/rules/utils.mk sanity check.
common-binary-post-install-arch:: list-missing