-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrpkg-util.spec.rpkg
More file actions
204 lines (167 loc) · 5.71 KB
/
Copy pathrpkg-util.spec.rpkg
File metadata and controls
204 lines (167 loc) · 5.71 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# vim: syntax=spec
%if 0%{?fedora} || 0%{?rhel} > 7
%global python /usr/bin/python3
%global python_build %py3_build
%global python_install %py3_install
%global python_sitelib %python3_sitelib
%else
%global python /usr/bin/python2
%global python_build %py2_build
%global python_install %py2_install
%global python_sitelib %python2_sitelib
%endif
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version lead=3 }}}
Release: 1%{?dist}
Summary: RPM packaging utility
License: GPLv2+
URL: https://pagure.io/rpkg-util.git
%if 0%{?fedora} || 0%{?rhel} > 6
VCS: {{{ git_dir_vcs }}}
%endif
# Source is created by:
# git clone https://pagure.io/rpkg-util.git
# cd rpkg-util
# git checkout {{{ echo -n "${OUTPUT[git_name]}-${OUTPUT[git_version]}" }}}-1
# ./rpkg spec --sources
Source0: {{{ if [ "$(rpm --eval '%rhel')" = 6 ]; then git_dir_archive; else git_dir_pack; fi }}}
BuildArch: noarch
%description
This package contains the rpkg utility. We are putting
the actual 'rpkg' package into a subpackage because there already
exists package https://src.fedoraproject.org/rpms/rpkg. That package,
however, does not actually produce rpkg rpm whereas rpkg-util does.
%package -n rpkg
Summary: RPM packaging utility
BuildArch: noarch
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python3-devel
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-munch
BuildRequires: python3-rpm-macros
BuildRequires: python3-cached_property
BuildRequires: python3-rpm
BuildRequires: python3-pycurl
Requires: python3-cached_property
Requires: python3-munch
Requires: python3-rpm
Requires: python3-pycurl
# https://bugzilla.redhat.com/show_bug.cgi?id=2035475
Requires: python3-setuptools
%else
BuildRequires: python2
BuildRequires: python2-setuptools
BuildRequires: python2-devel
BuildRequires: python2-mock
BuildRequires: python2-pytest
BuildRequires: python2-configparser
BuildRequires: python-munch
BuildRequires: python2-rpm-macros
BuildRequires: python2-cached_property
BuildRequires: rpm-python
BuildRequires: python-pycurl
Requires: python2-configparser
Requires: python2-cached_property
Requires: python-munch
Requires: rpm-python
Requires: python-pycurl
%endif
BuildRequires: preproc
BuildRequires: rpkg-macros
Requires: preproc
Requires: rpkg-macros
Requires: rpm-build
Requires: cpio
%description -n rpkg
This is an RPM packaging utility that can work with both DistGit
and standard Git repositories and handles packed directory content
as well as unpacked one.
%prep
{{{ git_dir_setup_macro }}}
version=%version
version=${version//.${version#*.*.}/}
sed -i 's/version=.*/version="'$version'",/' setup.py
%check
PYTHON=%{python} ./unittests
%build
%python_build
%{python} man/rpkg_man_page.py > rpkg.1
%install
%{python_install}
sed -i '1 s|#.*|#!%{python}|' %{buildroot}%{_bindir}/rpkg
install -d %{buildroot}%{_mandir}/man1
install -p -m 0644 rpkg.1 %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_datarootdir}/bash-completion/completions
cp -a rpkg.conf %{buildroot}%{_sysconfdir}/
cp -a rpkg.bash %{buildroot}%{_datarootdir}/bash-completion/completions/
%files -n rpkg
%{!?_licensedir:%global license %doc}
%license LICENSE
%{python_sitelib}/*
%config(noreplace) %{_sysconfdir}/rpkg.conf
%{_datadir}/bash-completion/completions/rpkg.bash
%{_bindir}/rpkg
%{_mandir}/*/*
%changelog
{{{ git_dir_changelog }}}
* Sun Feb 18 2018 clime <clime@redhat.com> 0.14-1
- fix error when redownloading sources
- do not invoke parent's module_name in load_ns_module_name
- fix python builddeps naming
* Mon Dec 04 2017 clime <clime@redhat.com> 0.13-1
- add LICENSE to ignored file regex
* Mon Oct 23 2017 clime <clime@redhat.com> 0.12-1
- respect hashtype from the sources file if any
* Fri Oct 20 2017 clime <clime@redhat.com> 0.11-1
- set default distgit target to src.fedoraproject.org
- fix downloading sources for any-length-namespace
modules
- make the whole lookaside url template explict in
the config file
- rename 'rpkg' config section to 'distgit'
- update in command descriptions
* Wed Oct 18 2017 clime <clime@redhat.com> 0.10-1
- possibility to give directory to --spec
- also take --spec in account for rpmdefines
* Mon Oct 16 2017 clime <clime@redhat.com> 0.9-1
- update spec descriptions
- added is-packed subcommand
- try reading ~/.config/rpkg before /etc/rpkg
- add unittests
- for source downloading, try both url formats
with/without hashtype
- add make-source subcommand
- patch srpm to generate Source0 if unpacked content
- override load_ns_module_name to work with any length
namespaces
- added --spec for srpm, make-source, and copr-build
- fixed tagging not to include host dist tag
- docs update
- make all config values optional
* Thu Jul 27 2017 clime <clime@redhat.com> 0.8-1
- fix man pages to only include actually provided part of pyrpkg functionality
- add rpkglib to provide functional interface
- change summary of wrapper package
* Wed Jul 26 2017 clime <clime@redhat.com> 0.7-1
- use %%py2_build and %%py2_install macros
- explicitly invoke python2 for doc generation
- remove no longer needed $BUILDROOT removal in %%install clause
- add missing BuildRequires on python-setuptools
* Fri Jul 07 2017 clime <clime@redhat.com> 0.6-1
- fix build error
* Tue Jun 27 2017 clime <clime@redhat.com> 0.5-1
- remove Requires bash-completion
* Tue Jun 27 2017 clime <clime@redhat.com> 0.4-1
- move config file to /etc/rpkg.conf
- add Requires bash-completion
* Tue Jun 27 2017 clime <clime@redhat.com> 0.3-1
- remove some directories from %%files in .spec
- add (for now) short README.md
* Tue Jun 20 2017 clime <clime@redhat.com> 0.2-1
- new rpkg-client package built with tito
* Mon Jun 12 2017 clime <clime@redhat.com> 0.1-1
- Initial version