-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrpmfusion-packager.spec.in
132 lines (110 loc) · 3.06 KB
/
rpmfusion-packager.spec.in
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
125
126
127
128
129
130
131
132
%define compdir %(pkg-config --variable=completionsdir bash-completion)
%if "%{compdir}" == ""
%define compdir "/etc/bash_completion.d"
%endif
# rpmfusion-packager switched to python3 on Fedora 30 and RHEL > 7:
%if 0%{?fedora} > 29 || 0%{?rhel} > 7
%bcond_without python3
%else
%bcond_with python3
%endif
Name: rpmfusion-packager
Version: @VERSION@
Release: 1%{?dist}
Summary: Tools for setting up a rpmfusion maintainer environment
License: GPLv2+
URL: https://github.com/rpmfusion-infra/rpmfusion-packager
Source0: %url/archive/v%{version}/rpmfusion-packager-%{version}.tar.gz
BuildArch: noarch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: pkgconfig(bash-completion)
%if %{with python3}
BuildRequires: python3-devel
%else
BuildRequires: python2-devel
%endif
# Packager tools
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires: rfpkg
%else
Suggests: rfpkg
%endif
Requires: koji
%if 0%{?fedora}
Requires: libabigail-fedora
%else
# EPEL8, ATM, don't have /usr/bin/fedabipkgdiff
# PR proposed: https://src.fedoraproject.org/rpms/libabigail/pull-request/5
#Requires: libabigail
%endif
# Tools required by the scripts included
%if %{with python3}
Requires: python3-pycurl
Requires: python3-rpmfusion-cert
%else
Requires: python-pycurl
Requires: rpmfusion-cert
%endif
%description
rpmfusion-packager provides a set of utilities designed to help a RPM Fusion
packager in setting up their environment and access the RPM Fusion
infrastructure.
%if %{with python3}
%package -n python3-rpmfusion-cert
Summary: Fedora certificate tool and python library
Requires: python3-pyOpenSSL
Requires: python3-requests
# need for fedora.client.fas2.AccountSystem
Requires: python3-fedora
Requires: python3-six
Provides: rpmfusion-cert = %{version}-%{release}
Obsoletes: rpmfusion-cert < %{version}-%{release}
%description -n python3-rpmfusion-cert
Provides rpmfusion-cert and the rpmfusion_cert python3 library
%else
%package -n rpmfusion-cert
Summary: Fedora certificate tool and python library
Requires: pyOpenSSL
Requires: python2-requests
Requires: python2-fedora
Requires: python2-six
%description -n rpmfusion-cert
Provides rpmfusion-cert and the rpmfusion_cert python library
%endif
%prep
%autosetup -p1
autoreconf -i
%build
%if %{with python3}
%configure --with-python3
%py3_shebang_fix \
src/rpmfusion-cert.py \
src/rpmfusion-packager-setup.py
%else
%configure --with-python2
%endif
%make_build
%install
%make_install
%files
%doc AUTHORS ChangeLog README TODO
%license COPYING
%config(noreplace) %{_sysconfdir}/koji.conf.d/rpmfusion.conf
%{_bindir}/rfabipkgdiff
%{_bindir}/rpmfusion-packager-setup
%{_bindir}/koji-rpmfusion
%{compdir}/
%if %{with python3}
%files -n python3-rpmfusion-cert
%license COPYING
%{_bindir}/rpmfusion-cert
%{python3_sitelib}/rpmfusion_cert
%else
%files -n rpmfusion-cert
%license COPYING
%{_bindir}/rpmfusion-cert
%{python2_sitelib}/rpmfusion_cert
%endif
%changelog
@changelog@