1 # TODO: tests fail (rpm.org vs rpm5 compat problems?)
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with tests # make tests
7 Summary: Creates a common metadata repository
8 Summary(pl.UTF-8): Tworzenie wspólnego repozytorium metadanych
13 Group: Applications/System
14 #Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
15 Source0: https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 2e14b3e5d289875b894000ab1e54f1ec
17 Patch0: %{name}-rpm5.patch
18 Patch1: %{name}-python.patch
19 Patch2: %{name}-include.patch
20 Patch3: %{name}-bashcompdir.patch
21 URL: https://github.com/rpm-software-management/createrepo_c
22 BuildRequires: bzip2-devel
23 BuildRequires: check-devel
24 BuildRequires: cmake >= 2.6
25 BuildRequires: curl-devel
26 BuildRequires: doxygen
27 BuildRequires: expat-devel
28 BuildRequires: glib2-devel >= 1:2.22.0
29 BuildRequires: libmagic-devel
30 BuildRequires: libxml2-devel >= 2
31 BuildRequires: openssl-devel
32 BuildRequires: python-devel >= 2
33 %{?with_tests:BuildRequires: python-nose}
35 BuildRequires: python3-devel >= 1:3.2
36 %{?with_tests:BuildRequires: python3-nose}
38 BuildRequires: rpm-devel >= 5
39 BuildRequires: rpm-pythonprov
40 BuildRequires: rpmbuild(macros) >= 1.673
41 BuildRequires: sphinx-pdg-2
42 BuildRequires: sqlite3-devel >= 3
43 BuildRequires: xz-devel
44 BuildRequires: zlib-devel
45 Requires: %{name}-libs = %{version}-%{release}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 C implementation of Createrepo. This utility will generate a common
50 metadata repository from a directory of RPM packages.
52 %description -l pl.UTF-8
53 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
54 repozytorium metadanych z katalogu pakietów RPM.
57 Summary: Library for repodata manipulation
58 Summary(pl.UTF-8): Biblioteka do operacji na danych repozytorium
60 Requires: glib2 >= 1:2.22.0
63 This package contains the createrepo_c library for applications to
64 easy manipulate with a repodata.
66 %description libs -l pl.UTF-8
67 Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
68 łatwe operowanie na danych repozytorium (repodata).
71 Summary: Header files for createrepo_c library
72 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki createrepo_c
73 Group: Development/Libraries
74 Requires: %{name}-libs = %{version}-%{release}
78 Requires: glib2-devel >= 1:2.22.0
79 Requires: libmagic-devel
80 Requires: libxml2-devel >= 2
81 Requires: rpm-devel >= 5
82 Requires: sqlite3-devel >= 3
87 This package contains the createrepo_c C header files. These
88 development files are for easy manipulation with a repodata.
90 %description devel -l pl.UTF-8
91 Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na
92 celu łatwe operowanie na danych repozytorium (repodata).
95 Summary: API documentation for createrepo_c library
96 Summary(pl.UTF-8): Dokumentacja API biblioteki createrepo_c
100 API documentation for createrepo_c library.
102 %description apidocs -l pl.UTF-8
103 Dokumentacja API biblioteki createrepo_c.
105 %package -n python-createrepo_c
106 Summary: Python 2 bindings for the createrepo_c library
107 Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki createrepo_c
108 Group: Development/Languages/Python
109 Requires: %{name}-libs = %{version}-%{release}
111 %description -n python-createrepo_c
112 Python 2 bindings for the createrepo_c library.
114 %description -n python-createrepo_c -l pl.UTF-8
115 Wiązania Pythona 2 do biblioteki createrepo_c.
117 %package -n python3-createrepo_c
118 Summary: Python 3 bindings for the createrepo_c library
119 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki createrepo_c
120 Group: Development/Languages/Python
121 Requires: %{name}-libs = %{version}-%{release}
123 %description -n python3-createrepo_c
124 Python 3 bindings for the createrepo_c library.
126 %description -n python3-createrepo_c -l pl.UTF-8
127 Wiązania Pythona 3 do biblioteki createrepo_c.
129 %package -n bash-completion-createrepo_c
130 Summary: Bash completion for createrepo_c commands
131 Summary(pl.UTF-8): Bashowe uzupełnianie dla poleceń createrepo_c
132 Group: Applications/Shells
133 Requires: %{name} = %{version}-%{release}
134 Requires: bash-completion >= 2.0
136 %description -n bash-completion-createrepo_c
137 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
140 %description -n bash-completion-createrepo_c -l pl.UTF-8
141 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
142 mergerepo_c, modifyrepo_c).
152 install -d build %{?with_python3:build-py3}
156 -DBASHCOMP_DIR=%{bash_compdir}
171 -DBASHCOMP_DIR=%{bash_compdir} \
185 rm -rf $RPM_BUILD_ROOT
188 %{__make} -C build-py3 install \
189 DESTDIR=$RPM_BUILD_ROOT
190 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
191 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
194 %{__make} -C build install \
195 DESTDIR=$RPM_BUILD_ROOT
197 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
198 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
202 rm -rf $RPM_BUILD_ROOT
204 %post libs -p /sbin/ldconfig
205 %postun libs -p /sbin/ldconfig
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_bindir}/createrepo_c
210 %attr(755,root,root) %{_bindir}/mergerepo_c
211 %attr(755,root,root) %{_bindir}/modifyrepo_c
212 %attr(755,root,root) %{_bindir}/sqliterepo_c
213 %{_mandir}/man8/createrepo_c.8*
214 %{_mandir}/man8/mergerepo_c.8*
215 %{_mandir}/man8/modifyrepo_c.8*
216 %{_mandir}/man8/sqliterepo_c.8*
219 %defattr(644,root,root,755)
220 %doc AUTHORS README.md
221 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
227 %{_pkgconfigdir}/createrepo_c.pc
228 %{_includedir}/createrepo_c
231 %defattr(644,root,root,755)
234 %files -n python-createrepo_c
235 %defattr(644,root,root,755)
236 %dir %{py_sitedir}/createrepo_c
237 %attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so
238 %{py_sitedir}/createrepo_c/__init__.py[co]
241 %files -n python3-createrepo_c
242 %defattr(644,root,root,755)
243 %dir %{py3_sitedir}/createrepo_c
244 %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
245 %{py3_sitedir}/createrepo_c/__init__.py
246 %{py3_sitedir}/createrepo_c/__pycache__
249 %files -n bash-completion-createrepo_c
250 %defattr(644,root,root,755)
251 %{bash_compdir}/createrepo_c
252 %{bash_compdir}/mergerepo_c
253 %{bash_compdir}/modifyrepo_c
254 %{bash_compdir}/sqliterepo_c