File: rules

package info (click to toggle)
phatch 0.2.7-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 26,168 kB
  • ctags: 4,370
  • sloc: python: 34,186; makefile: 104; xml: 9
file content (46 lines) | stat: -rwxr-xr-x 1,875 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
#!/usr/bin/make -f

DEB_PYTHON_SYSTEM := pysupport
DEB_COMPRESS_EXCLUDE += objects.inv

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

PKG_P_DIR=$(CURDIR)/debian/phatch
PKG_C_DIR=$(CURDIR)/debian/phatch-cli
PKG_D_DIR=$(CURDIR)/debian/phatch-doc
PKG_N_DIR=$(CURDIR)/debian/phatch-nautilus

# install to phatch-cli by default and move files later
DEB_PYTHON_INSTALL_ARGS_ALL = --install-lib=/usr/share/phatch --prefix=/usr --root=$(PKG_C_DIR)

binary-install/phatch-cli::
	rm -rf $(PKG_C_DIR)/usr/share/phatch/docs # install_data creates it
	find $(PKG_C_DIR) -name '*.py[co]' -delete
	sed -i -e "s|import phatch|sys.path.insert(0,'/usr/share/phatch/');import phatch|" $(PKG_C_DIR)/usr/bin/phatch

binary-install/phatch:: binary-install/phatch-cli
	dh_installdirs
	mv $(PKG_C_DIR)/usr/share/phatch/phatch/pyWx $(PKG_P_DIR)/usr/share/phatch/phatch
	mv $(PKG_C_DIR)/usr/share/phatch/phatch/lib/pyWx $(PKG_P_DIR)/usr/share/phatch/phatch/lib
	mv $(PKG_C_DIR)/usr/share/applications $(PKG_P_DIR)/usr/share
	dh_icons
	cp $(CURDIR)/debian/phatch.lintian $(PKG_P_DIR)/usr/share/lintian/overrides/phatch

binary-install/phatch-nautilus:: binary-install/phatch-cli
	mkdir -p $(PKG_N_DIR)/usr/share/phatch/phatch/lib/linux/
	mv $(PKG_C_DIR)/usr/share/phatch/phatch/lib/linux/nautilusExtension.py\
	   $(PKG_N_DIR)/usr/share/phatch/phatch/lib/linux/

binary-install/phatch-doc::
	dh_installdirs
	cd docs && python update.py
	dh_install -p phatch-doc docs/build/html /usr/share/doc/phatch/
	dh_link -p phatch-doc /usr/share/javascript/jquery/jquery.js \
	    /usr/share/doc/phatch/html/_static/jquery.js
	rm -f $(PKG_D_DIR)/usr/share/doc/phatch/html/.buildinfo
	echo "phatch-doc: extra-license-file usr/share/doc/phatch/html/_sources/data.license.txt" \
		>> $(PKG_D_DIR)/usr/share/lintian/overrides/phatch-doc

clean::
	rm -rf docs/build