File: rules

package info (click to toggle)
bittornado 0.3.17-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,820 kB
  • ctags: 1,456
  • sloc: python: 15,731; sh: 717; makefile: 65
file content (102 lines) | stat: -rwxr-xr-x 3,370 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
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/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-stamp: bittorrent-downloader.bittornado.1 bittorrent-multi-downloader.bittornado.1 btcompletedir.bittornado.1 btcompletedirgui.bittornado.1 btcopyannounce.1 btdownloadcurses.bittornado.1 btdownloadgui.bittornado.1 btdownloadheadless.bittornado.1 btlaunchmany.bittornado.1 btlaunchmanycurses.bittornado.1 btmakemetafile.bittornado.1 btmaketorrentgui.1 btreannounce.bittornado.1 btrename.bittornado.1 btsethttpseeds.1 btshowmetainfo.bittornado.1 bttrack.bittornado.1
	dh_testdir
	touch build-stamp

%.1:	debian/%.sgml
	/usr/bin/docbook-to-man $< > debian/$@

clean: unpatch
	dh_testdir
	dh_testroot
	rm -rf build/ BitTornado/BT1/*.pyc BitTornado/*.pyc *.pyc
	rm -f debian/*.1
	rm -f build-stamp
	dh_clean

install: patch build-stamp


	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-lib=$(CURDIR)/debian/tmp/usr/share/python-support/bittornado

	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/share/python-support/bittornado/BitTornado/launchmanycore.py
	cp debian/tmp/usr/bin/btmakemetafile.py debian/tmp/usr/share/python-support/bittornado/BitTornado
	cp debian/tmp/usr/bin/btcompletedir.py debian/tmp/usr/share/python-support/bittornado/BitTornado

	# Remove the generated .pyc files
	( cd debian/tmp/usr/share/python-support/bittornado/BitTornado && \
	  rm -f *.pyc  && \
	  cd BT1 && \
	  rm -f *.pyc )

# 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_pysupport
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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