-
Notifications
You must be signed in to change notification settings - Fork 0
/
dh-python.spec
125 lines (95 loc) · 4 KB
/
dh-python.spec
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%global _debpy_name python3-defaults
%global _debpy_ver %version
%global _debpy_rel 1
%global _py3def_name dh-python
%global _py3def_ver 3.10.4
Name: dh-python
Version: 5.20220403
Release: 2%{?dist}
Summary: debhelper add-on to to handle python 3 files after build
BuildArch: noarch
License: GPLv2+
URL: http://packages.debian.org/unstable/dh-python
Source0: https://cdn-aws.deb.debian.org/debian/pool/main/p/python3-defaults/python3-defaults_%{_py3def_ver}-%{_debpy_rel}.tar.gz
Source1: http://debian.backend.mirrors.debian.org/debian/pool/main/d/dh-python/dh-python_%{version}.tar.xz
Patch: py3versions.patch
BuildRequires: python3-docutils
Requires: python3-devel
BuildRequires: dpkg-dev
BuildRequires: debhelper
BuildRequires: python3-rpm-macros
Provides: dh-python3 = %{version}
%description
* pybuild - invokes various build systems for requested Python versions in
order to build modules and extensions
* dh_python2 - calculates Python 2.X dependencies for Debian packages,
adds maintainer scripts to byte compile files, etc.
* dh_python3 - calculates Python 3.X dependencies for Debian packages,
adds maintainer scripts to byte compile files, etc.
* dh_pypy - calculates PyPy dependencies for Debian packages,
adds maintainer scripts to byte compile files, etc.
%prep
%autosetup -n python3-defaults -p1 -a 1
%build
make
pushd dh-python-%{version}
make
popd
%install
make DESTDIR="%{buildroot}/" PREFIX=/usr install
mkdir -p %{buildroot}/%{python3_sitelib}
install -m 755 debian/py3versions.py %{buildroot}/%{python3_sitelib}/
ln -s -r -f %{_datadir}/python3/py3versions.py %{buildroot}/%{_bindir}/py3versions
install -m 755 debian/debian_defaults %{buildroot}/%{python3_sitelib}/
gzip -f debian/py3versions.1
mkdir -p %{buildroot}/%{_mandir}/man1
install -m 644 debian/py3versions.1.gz %{buildroot}/%{_mandir}/man1/
mkdir -p %{buildroot}/%{_datadir}/licenses/%{name}/
install -D -m 644 debian/copyright %{buildroot}/%{_datadir}/licenses/%{name}/
pushd dh-python-%{version}
make DESTDIR="%{buildroot}/" PREFIX=/usr install
ln -s -f -r %{_datadir}/dh-python/dh_pypy %{buildroot}/usr/bin/dh_pypy
ln -s -f -r %{_datadir}/dh-python/dh_python3 %{buildroot}/usr/bin/dh_python3
ln -s -f -r %{_datadir}/dh-python/pybuild %{buildroot}/usr/bin/pybuild
mkdir -p %{buildroot}/%{_datadir}/perl5/vendor_perl
mv -f %{buildroot}/%{_datadir}/perl5/Debian %{buildroot}/%{_datadir}/perl5/vendor_perl/Debian
mv -f %{buildroot}/%{_datadir}/python3/debpython %{buildroot}/%{python3_sitelib}/
mv -f %{buildroot}/%{_datadir}/python3/runtime.d %{buildroot}/%{python3_sitelib}/
%files
%doc *.rst
%license debian/copyright
%{_bindir}/dh_pypy
%{_bindir}/dh_python3
%{_bindir}/py3clean
%{_bindir}/py3compile
%{_bindir}/py3versions
%{_bindir}/pybuild
%{_datadir}/debhelper/
%{_datadir}/dh-python/
%{_mandir}/man1/py3versions.1.gz
%{python3_sitelib}/__pycache__/py3versions.cpython-*.opt-1.pyc
%{python3_sitelib}/__pycache__/py3versions.cpython-*.pyc
%{python3_sitelib}/debian_defaults
%{python3_sitelib}/py3versions.py
%{python3_sitelib}/debpython/
%{python3_sitelib}/runtime.d/
%{_datadir}/perl5/vendor_perl/Debian/Debhelper/Buildsystem/pybuild.pm
%{_datadir}/perl5/vendor_perl/Debian/Debhelper/Sequence/pypy.pm
%{_datadir}/perl5/vendor_perl/Debian/Debhelper/Sequence/python2.pm
%{_datadir}/perl5/vendor_perl/Debian/Debhelper/Sequence/python3.pm
%changelog
* Sat May 14 2022 Sérgio Basto <[email protected]> - 5.20220403-2
- Update to 5.20220403
* Mon Sep 21 2020 David Va <davidva AT tuta DOT io> 4.20200804-1
- Updated to 4.20200804
* Thu Mar 26 2020 David Va <davidva AT tuta DOT io> 4.20200315-1
- Updated to 4.20200315
* Fri Oct 18 2019 David Va <davidva AT tuta DOT io> 4.20191017-1
- Updated to 4.20191017
* Tue Apr 16 2019 David Va <davidva AT tuta DOT io> 3.7.3-1
- Updated to 3.7.3-1
* Thu Nov 22 2018 David Va <davidva AT tuta DOT io> 3-1
- Updated to 3-1
- Upstream
* Fri Oct 16 2015 Alec Leamas <[email protected]> - 2.20150826-1
- Initial release