File: rules

package info (click to toggle)
wxglade 1%3A1.1.1%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 10,592 kB
  • sloc: python: 30,644; javascript: 740; makefile: 169; cpp: 99; perl: 90; lisp: 62; xml: 61; sh: 3
file content (51 lines) | stat: -rwxr-xr-x 1,772 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

DESTDIR = $(CURDIR)/debian/wxglade
VERSION = $(shell dpkg-parsechangelog --show-field Version | sed 's/-.*//')

%:
	dh $@ --with python3

override_dh_auto_clean:
	# the installation is simplified drastically!
	rm -f Makefile setup.py version.py
	rm -rf wxGlade.egg-info .eggs
	rm -f docs/html/_static/jquery.js docs/html/_static/underscore.js
	dh_auto_clean

override_dh_auto_test:
	echo "not running the tests since the test tests/test_gui.py will fail"

STATIC_SPHINX_DIR = $(DESTDIR)/usr/share/wxglade/docs/html/_static

override_dh_install:
	echo "__version__ = '$(VERSION)'" > $(CURDIR)/version.py
	dh_install
	# fix JS libraries
	rm -f $(STATIC_SPHINX_DIR)/jquery.js
	ln -s /usr/share/javascript/jquery/jquery.js \
	  $(STATIC_SPHINX_DIR)/
	rm -f $(STATIC_SPHINX_DIR)/underscore.js
	ln -s /usr/share/javascript/underscore/underscore.js \
	  $(STATIC_SPHINX_DIR)/
	rm -f $(STATIC_SPHINX_DIR)/doctools.js
	ln -s /usr/share/sphinx/themes/basic/static/doctools.js \
	  $(STATIC_SPHINX_DIR)/
	rm -f $(STATIC_SPHINX_DIR)/searchtools.js
	ln -s /usr/share/sphinx/themes/basic/static/searchtools.js \
	  $(STATIC_SPHINX_DIR)/

override_dh_fixperms:
	dh_fixperms
	rm -f $(DESTDIR)/usr/share/wxglade/LICENSE.txt
	ln -s ../doc/wxglade/copyright $(DESTDIR)/usr/share/wxglade/LICENSE.txt
	find $(DESTDIR)/usr/share/wxglade -type f | xargs chmod 644