/debian/rules
Makefile | 76 lines | 53 code | 12 blank | 11 comment | 3 complexity | 4e74c5dd6851cdfb61eac04a7849c5db MD5 | raw file
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# This file was originally written by Joey Hess and Craig Small.
5# As a special exception, when this file is copied by dh-make into a
6# dh-make output file, you may use that output file without restriction.
7# This special exception was added by Craig Small in version 0.37 of dh-make.
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
12include /usr/share/python/python.mk
13PYVERS = $(shell pyversions -r)
14
15CFLAGS = -Wall -g
16
17ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18 CFLAGS += -O0
19else
20 CFLAGS += -O2
21endif
22
23configure: configure-stamp
24configure-stamp:
25 dh_testdir
26 touch configure-stamp
27
28build: build-stamp
29
30build-stamp: configure-stamp
31 dh_testdir
32 for py in $(PYVERS); do \
33 $$py setup.py build; \
34 done
35 touch build-stamp
36
37clean:
38 dh_testdir
39 dh_testroot
40 -rm -f build-stamp configure-stamp
41 for py in $(PYVERS); do \
42 $$py setup.py clean; \
43 done
44 python setup.py clean
45 find $(CURDIR) -name "*.pyc" -exec rm -f '{}' \;
46 dh_clean
47
48install: build
49 dh_testdir
50 dh_testroot
51 dh_clean -k
52 dh_installdirs
53 for py in $(PYVERS); do \
54 $$py setup.py install --root=$(CURDIR)/debian/python-chouwa $(py_setup_install_args); \
55 done
56
57# Build architecture-independent files here.
58binary-indep: build install
59 dh_testdir
60 dh_testroot
61 dh_link
62 dh_strip
63 dh_compress
64 dh_fixperms
65 dh_pysupport
66 dh_installdeb
67 dh_shlibdeps
68 dh_gencontrol
69 dh_md5sums
70 dh_builddeb
71
72# Build architecture-dependent files here.
73binary-arch: build install
74
75binary: binary-indep binary-arch
76.PHONY: build clean binary-indep binary-arch binary install configure