File: rules

package info (click to toggle)
bittornado 0.3.11-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,728 kB
  • ctags: 1,450
  • sloc: python: 15,581; sh: 843; makefile: 55
file content (89 lines) | stat: -rwxr-xr-x 2,557 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatibility version to use.
export DH_COMPAT=4

PYTHON_VERSION=$(shell /usr/bin/python -V 2>&1 | /usr/bin/perl -le 'print "$$1.$$2" if <> =~m/^Python\s+(\d+)\.(\d+)(\.\d+)*/')


include /usr/share/dpatch/dpatch.make

build: patch 

clean: unpatch
	dh_testdir
	dh_testroot
	rm -rf build/ BitTornado/*.pyc *.pyc
	dh_clean

install: patch build


	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/bittornado.
	chmod +x ./setup.py
	./setup.py install --prefix=$(CURDIR)/debian/tmp/usr

	install -d debian/tmp/usr/share/mimelnk/application

	install -D -m644 debian/bittornado.desktop debian/bittornado-gui/usr/share/applications/bittornado.desktop
	install -D -m644 debian/bittornado.xpm debian/tmp/usr/share/pixmaps/bittornado.xpm
	install -d debian/tmp/usr/share/bittorrent
	chmod 755 debian/tmp/usr/lib/python$(PYTHON_VERSION)/site-packages/BitTornado/launchmanycore.py
	cp debian/tmp/usr/bin/btmakemetafile.py debian/tmp/usr/lib/python$(PYTHON_VERSION)/site-packages/BitTornado
	cp debian/tmp/usr/bin/btcompletedir.py debian/tmp/usr/lib/python$(PYTHON_VERSION)/site-packages/BitTornado
	
# Build architecture-independent files here.
binary-arch: build install
	

# Build architecture-dependent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installmime
	dh_desktop 
	dh_installman
	
	# Remove the .py from the end of each of these and add .bittornado
	# so that the alternatives system can work
	( cd debian/tmp/usr/bin && \
	  for i in btdownloadgui btdownloadheadless bttrack btmakemetafile \
	  	   btlaunchmany btcompletedir btcompletedirgui \
		   btdownloadcurses btlaunchmanycurses btreannounce btrename \
		   btshowmetainfo; \
	  do mv $$i.py $$i.bittornado; done )
	
	# Remove the .py from the end of each of these, the following are not
	# included in bittorrent, so they are not renamed to having the
	# suffix of .bittornado
	( cd debian/tmp/usr/bin && \
	  for i in btcopyannounce btsethttpseeds btmaketorrentgui; \
	  do mv $$i.py $$i; done )

	dh_installchangelogs 
	dh_install --sourcedir=debian/tmp
	dh_link
	dh_compress
	dh_fixperms
	dh_python
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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