[go: up one dir, main page]

File: rules

package info (click to toggle)
tilecache 2.03-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 392 kB
  • ctags: 392
  • sloc: python: 2,830; makefile: 49
file content (71 lines) | stat: -rwxr-xr-x 2,009 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
#!/usr/bin/make -f
# -*- makefile -*-
# TileCache debian/rules

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

include /usr/share/python/python.mk

PREFIX := debian/tilecache
PYSUPPORT := /usr/share/python-support/tilecache

build: build-stamp

build-stamp:
	dh_testdir
	# Add here commands to compile the package.
	sed -e 's!tilecache\.cgi!/cgi-bin/tilecache.cgi!' ./index.html > ./cgi-example.html
	python ./setup.py test 
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -rf build dist TileCache.egg-info
	rm -f build-stamp configure-stamp cgi-example.html

	dh_clean *.pyc TileCache/*.pyc TileCache/Caches/*.pyc \
		TileCache/Services/*.pyc TileCache/Layers/*.pyc tests/*.pyc

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/tilecache.
	python ./setup.py install --debian --no-compile --root=$(PREFIX) $(py_setup_install_args)
    
	# eliminates script-not-executable warning from lintian

	rm $(PREFIX)/usr/bin/tilecache_install_config.py # only used for eggs
	mv $(PREFIX)/usr/bin/tilecache.* $(PREFIX)/usr/lib/cgi-bin # .cgi, .fcgi
	mv $(PREFIX)/usr/bin/tilecache_seed.py $(PREFIX)/usr/sbin/tilecache_seed
	mv $(PREFIX)/usr/bin/tilecache_clean.py $(PREFIX)/usr/sbin/tilecache_clean
	mv $(PREFIX)/usr/bin/tilecache_http_server.py $(PREFIX)/usr/sbin/tilecache_http_server
	rmdir $(PREFIX)/usr/bin

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs docs/NEWS.txt
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_compress
	dh_fixperms
	chmod +x $(PREFIX)/usr/lib/python*/*-packages/TileCache/Service.py
	chmod +x $(PREFIX)/usr/lib/python*/*-packages/TileCache/Client.py
	rm $(PREFIX)/usr/lib/python*/*-packages/TileCache/Caches/S3.py # Suggests python-boto instead.
	dh_pysupport
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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