rules: build .pyo files
[findit] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 PACKAGE=findit
7 PYTHON=PYTHONOPTIMIZE=2 python
8
9 build:
10         dh_testdir
11
12         # Add here commands to compile the package.
13         mkdir -p $(CURDIR)/po/ru/
14         msgfmt $(CURDIR)/po/ru.po -o $(CURDIR)/po/ru/$(PACKAGE).mo
15         $(PYTHON) setup.py build
16         touch $@
17
18 clean:
19         dh_testdir
20         dh_testroot
21         rm -rf $(CURDIR)/po/ru
22
23         # Add here commands to clean up after the build process.
24         $(PYTHON) setup.py clean --all
25
26         rm -rf $(CURDIR)/$(PACKAGE).egg-info/
27
28         dh_clean 
29
30 install: build
31         dh_testdir
32         dh_testroot
33         dh_clean -k 
34
35         # Add here commands to install the package into debian/findit
36         $(PYTHON) setup.py install --root $(CURDIR)/debian/$(PACKAGE)
37
38 # Build architecture-independent files here.
39 binary-indep: build install
40         dh_testdir
41         dh_testroot
42         dh_installchangelogs 
43         dh_installdocs
44         dh_link
45         dh_compress
46         dh_fixperms
47         dh_installdeb
48         dh_gencontrol
49         dh_md5sums
50         dh_builddeb
51
52 # Build architecture-dependent files here.
53 binary-arch: build install
54
55 binary: binary-indep binary-arch
56
57 .PHONY: build clean binary-indep binary-arch binary install