File: rules

package info (click to toggle)
graphite-web 1.1.4-3%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,416 kB
  • sloc: python: 11,275; sh: 61; makefile: 53
file content (64 lines) | stat: -rwxr-xr-x 2,429 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
#!/usr/bin/make -f

export PYBUILD_NAME = graphite
export PYBUILD_INSTALL_ARGS_python3=--prefix=/usr --install-lib={install_dir}

%:
	dh $@ --with python3 --buildsystem=pybuild

check_embedded_libs:
	@if [ -f webapp/graphite/thirdparty \
	    -o -f "webapp/content/js/ext/resources/*.swf" \
	    -o -f "webapp/content/js/ext/examples" \
	    -o -f "webapp/content/js/jquery.js" \
	    -o -f "webapp/content/js/window/prototype.js" \
	    -o -f "webapp/content/js/scriptaculous" \
	    -o -f "webapp/content/js/window/effects.js" \
	    -o -f "webapp/content/js/jquery.flot.crosshair.js" \
	    -o -f "webapp/content/js/jquery.flot.js" \
	    -o -f "webapp/content/js/jquery.flot.selection.js" \
	      ] ; \
	then \
	      echo " *****************************************"; \
	      echo " **                                     **"; \
	      echo " **  tar contains embedded libraries !  **"; \
	      echo " **                                     **"; \
	      echo " *****************************************"; \
	      echo "Read README.source to correct this."; \
	      echo ""; \
	      exit 1; \
	fi

override_dh_auto_test:
	echo "nothing ... yet..."

override_dh_prep: check_embedded_libs
	dh_prep

override_dh_installcron:
	dh_installcron --name=graphite_build_search_index

override_dh_compress:
	dh_compress -Xlocal_settings.py.example

override_dh_install:
	# clean unneeded stuff
	rm -rf debian/graphite-web/usr/conf
	rm -rf debian/graphite-web/usr/storage
	rm -rf debian/graphite-web/usr/bin
	rm -rf debian/graphite-web/usr/examples
	mkdir -p debian/graphite-web/usr/share/graphite-web
	find debian/graphite-web/usr/webapp -type f | xargs -r chmod 644
	mv debian/graphite-web/usr/webapp/content debian/graphite-web/usr/share/graphite-web/static
	rmdir debian/graphite-web/usr/webapp
	find debian/graphite-web/usr -name local_settings.py.example | xargs -r rm -f
	rm -f debian/graphite-web/usr/share/graphite-web/static/js/ext/license.txt
	rm -f debian/graphite-web/usr/share/graphite-web/static/js/ext/resources/css/README.txt
	dh_install
	cp webapp/graphite/local_settings.py.example debian/graphite-web/etc/graphite/local_settings.py
	cp ./webapp/graphite/wsgi.py debian/graphite-web/usr/share/graphite-web/graphite.wsgi
	rm -rf debian/graphite-web/usr/share/graphite-web/static/js/ext/adapter/.DS_Store

override_dh_fixperms:
	dh_fixperms
	sed -i 1s/python2/python3/ debian/graphite-web/usr/bin/graphite-manage