blob: 7a6ff690116c759978be623a3c06b2a7b279d302 (
plain)
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
72
73
74
75
76
|
#!/usr/bin/make -f
DEB_AUTO_CLEANUP_RCS := yes
DEB_PYTHON_SYSTEM=pycentral
export DH_PYCENTRAL=nomove
DEB_PYTHON_PACKAGES_EXCLUDE=python-apt-dbg
# Add here any variable or target overrides you need
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
PY3K_VERSIONS := $(shell find /usr/bin/python3.? | sed s/.*python//)
2TO3_VERSION := $(lastword $(PY3K_VERSIONS))
PKG=python-apt
DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
DEB_COMPRESS_EXCLUDE:=.html .js _static/* _sources/* _sources/*/* .inv
DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
# Define COMPAT_0_7 to get all the deprecated interfaces.
export CFLAGS+=-DCOMPAT_0_7
export DEBVER
build/python-apt::
set -e; for i in $(PY3K_VERSIONS); do \
python$$i setup3.py build; \
done
install/python-apt::
set -e; for i in $(PY3K_VERSIONS); do \
python$$i ./setup3.py install --root $(CURDIR)/debian/python-apt \
--install-layout=deb --no-compile; \
done
ifneq ($(PY3K_VERSIONS),)
find $(CURDIR)/debian/python-apt/usr/lib/python3*/dist-packages/ -name '*.py' \
| xargs 2to3-$(2TO3_VERSION)| patch -p0
endif
build/python-apt-dbg::
set -e; \
for i in $(cdbs_python_build_versions); do \
python$$i-dbg ./setup.py build; \
done
set -e; for i in $(PY3K_VERSIONS); do \
python$$i-dbg setup3.py build; \
done
install/python-apt-dbg::
for i in $(cdbs_python_build_versions); do \
python$$i-dbg ./setup.py install --root $(CURDIR)/debian/python-apt-dbg \
--no-compile; \
done
set -e; for i in $(PY3K_VERSIONS); do \
python$$i-dbg ./setup3.py install --root $(CURDIR)/debian/python-apt-dbg \
--install-layout=deb --no-compile; \
done
find debian/python-apt-dbg \
! -type d ! -name '*_d.so' | xargs rm -f
find debian/python-apt-dbg -depth -empty -exec rmdir {} \;
binary-predeb/python-apt::
ln -sf ../../../../javascript/jquery/jquery.js \
debian/python-apt/usr/share/doc/python-apt/html/_static/jquery.js
binary-predeb/python-apt-dbg::
rm -rf debian/python-apt-dbg/usr/share/doc/python-apt-dbg
ln -s python-apt debian/python-apt-dbg/usr/share/doc/python-apt-dbg
clean::
rm -rf build/lib* build/temp* build
|