blob: 51576ca96df8349897fb24492a976dc7bb079026 (
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
77
78
79
80
81
82
83
|
# Contributor: Johannes Dewender arch at JonyJD dot net
# Contributor: C. Dominik Bódi dominik.bodi at gmx dot de
pkgname=debhelper-python
pkgver=3.10.6
pkgrel=0
_debpy_name=python3-defaults
_debpy_ver=$pkgver
_debpy_rel=1
_py3def_name=dh-python
_py3def_ver=4.20201102+nmu1
pkgdesc="debhelper scripts for Python 3: py3versions, python3.pm"
arch=('any')
url="http://packages.debian.org/sid/python3"
license=('custom:MIT')
depends=('python-docutils')
makedepends=('debhelper' 'python')
optdepends=('sgmltools-lite')
provides=('debhelper-python' 'dh-python')
source=(https://deb.debian.org/debian/pool/main/p/${_debpy_name}/${_debpy_name}_${_debpy_ver}-${_debpy_rel}.tar.gz
https://deb.debian.org/debian/pool/main/d/${_py3def_name}/${_py3def_name}_${_py3def_ver}.tar.xz
py3versions.patch)
sha512sums=('27c33e502d57d43d0ac072228487c0e1a99280d8d968c0fed9a9e7de5fa485a8a3af25d78ac106a43e9f937d71448cbeb27d9adccababee973326d257dea5f00'
'695eb40a3993f0de7e50039283579e99829f713c13b8c9aaadccb71f04df4e6a1f0961494e234b41565ebab9818a5ea5c440ae8bd5af3713b9ef4bc59adbdc8a'
'772332cecd85331b6deda25c0d48eed2490e7e7f26d90c7936f46188c706f590771af6edcbb4740a23bff0434ed061bc2b49f8183561cbf4bbb845ed3bebc42a')
prepare() {
cd "$srcdir/$_debpy_name"
patch -Np1 < "$srcdir"/py3versions.patch
}
build() {
cd "$srcdir/$_debpy_name"
make
cd "$srcdir/$_py3def_name"
make
}
check() {
cd "$srcdir/$_debpy_name"
sed -i -e 's|/usr/share/python3/debian_defaults|debian/debian_defaults|' \
debpython/version.py
make -k check_versions
sed -i -e 's|debian/debian_defaults|/usr/share/python3/debian_defaults|' \
debpython/version.py
}
package() {
cd "$srcdir/$_debpy_name"
make DESTDIR="$pkgdir/" PREFIX=/usr install
mkdir -p $pkgdir/usr/share/python3
install -m 755 debian/py3versions.py $pkgdir/usr/share/python3/
ln -s -r $pkgdir/usr/share/python3/py3versions.py $pkgdir/usr/bin/py3versions
install -m 755 debian/debian_defaults $pkgdir/usr/share/python3/
gzip -f debian/py3versions.1
mkdir -p $pkgdir/usr/share/man/man1
install -m 644 debian/py3versions.1.gz $pkgdir/usr/share/man/man1/
mkdir -p $pkgdir/usr/share/licenses/$pkgname/
install -D -m 644 debian/copyright $pkgdir/usr/share/licenses/$pkgname/
cd "$srcdir/$_py3def_name"
make DESTDIR="$pkgdir/" PREFIX=/usr install
# create symlinks to executables in order to make this look like in
# debian
ln -s -r $pkgdir/usr/share/dh-python/dh_pypy $pkgdir/usr/bin/dh_pypy
ln -s -r $pkgdir/usr/share/dh-python/dh_python3 $pkgdir/usr/bin/dh_python3
ln -s -r $pkgdir/usr/share/dh-python/pybuild $pkgdir/usr/bin/pybuild
mkdir -p $pkgdir/usr/share/perl5/vendor_perl
mv $pkgdir/usr/share/perl5/Debian $pkgdir/usr/share/perl5/vendor_perl/Debian
# python2.pm is in debhelper-python2
rm $pkgdir/usr/share/perl5/vendor_perl/Debian/Debhelper/Sequence/python2.pm
}
# vim:set ts=2 sw=2 et:
|