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 URL: https://github.com/rpm-software-management/createrepo_c
21 BuildRequires: bzip2-devel
22 BuildRequires: check-devel
23 BuildRequires: cmake >= 2.6
24 BuildRequires: curl-devel
25 BuildRequires: doxygen
26 BuildRequires: expat-devel
27 BuildRequires: glib2-devel >= 1:2.22.0
28 BuildRequires: libmagic-devel
29 BuildRequires: libxml2-devel >= 2
30 BuildRequires: openssl-devel
31 BuildRequires: python-devel >= 2
32 %{?with_tests:BuildRequires: python-nose}
34 BuildRequires: python3-devel >= 1:3.2
35 %{?with_tests:BuildRequires: python3-nose}
37 BuildRequires: rpm-devel >= 5
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.219
40 BuildRequires: sphinx-pdg-2
41 BuildRequires: sqlite3-devel >= 3
42 BuildRequires: xz-devel
43 BuildRequires: zlib-devel
44 Requires: %{name}-libs = %{version}-%{release}
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 C implementation of Createrepo. This utility will generate a common
49 metadata repository from a directory of RPM packages.
51 %description -l pl.UTF-8
52 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
53 repozytorium metadanych z katalogu pakietów RPM.
56 Summary: Library for repodata manipulation
57 Summary(pl.UTF-8): Biblioteka do operacji na danych repozytorium
59 Requires: glib2 >= 1:2.22.0
62 This package contains the createrepo_c library for applications to
63 easy manipulate with a repodata.
65 %description libs -l pl.UTF-8
66 Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
67 łatwe operowanie na danych repozytorium (repodata).
70 Summary: Header files for createrepo_c library
71 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki createrepo_c
72 Group: Development/Libraries
73 Requires: %{name}-libs = %{version}-%{release}
77 Requires: glib2-devel >= 1:2.22.0
78 Requires: libmagic-devel
79 Requires: libxml2-devel >= 2
80 Requires: rpm-devel >= 5
81 Requires: sqlite3-devel >= 3
86 This package contains the createrepo_c C header files. These
87 development files are for easy manipulation with a repodata.
89 %description devel -l pl.UTF-8
90 Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na
91 celu łatwe operowanie na danych repozytorium (repodata).
94 Summary: API documentation for createrepo_c library
95 Summary(pl.UTF-8): Dokumentacja API biblioteki createrepo_c
99 API documentation for createrepo_c library.
101 %description apidocs -l pl.UTF-8
102 Dokumentacja API biblioteki createrepo_c.
104 %package -n python-createrepo_c
105 Summary: Python 2 bindings for the createrepo_c library
106 Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki createrepo_c
107 Group: Development/Languages/Python
108 Requires: %{name}-libs = %{version}-%{release}
110 %description -n python-createrepo_c
111 Python 2 bindings for the createrepo_c library.
113 %description -n python-createrepo_c -l pl.UTF-8
114 Wiązania Pythona 2 do biblioteki createrepo_c.
116 %package -n python3-createrepo_c
117 Summary: Python 3 bindings for the createrepo_c library
118 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki createrepo_c
119 Group: Development/Languages/Python
120 Requires: %{name}-libs = %{version}-%{release}
122 %description -n python3-createrepo_c
123 Python 3 bindings for the createrepo_c library.
125 %description -n python3-createrepo_c -l pl.UTF-8
126 Wiązania Pythona 3 do biblioteki createrepo_c.
128 %package -n bash-completion-createrepo_c
129 Summary: Bash completion for createrepo_c commands
130 Summary(pl.UTF-8): Bashowe uzupełnianie dla poleceń createrepo_c
131 Group: Applications/Shells
132 Requires: %{name} = %{version}-%{release}
133 Requires: bash-completion
135 %description -n bash-completion-createrepo_c
136 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
139 %description -n bash-completion-createrepo_c -l pl.UTF-8
140 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
141 mergerepo_c, modifyrepo_c).
150 install -d build %{?with_python3:build-py3}
181 rm -rf $RPM_BUILD_ROOT
184 %{__make} -C build-py3 install \
185 DESTDIR=$RPM_BUILD_ROOT
186 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
187 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
190 %{__make} -C build install \
191 DESTDIR=$RPM_BUILD_ROOT
193 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
194 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
198 rm -rf $RPM_BUILD_ROOT
200 %post libs -p /sbin/ldconfig
201 %postun libs -p /sbin/ldconfig
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_bindir}/createrepo_c
206 %attr(755,root,root) %{_bindir}/mergerepo_c
207 %attr(755,root,root) %{_bindir}/modifyrepo_c
208 %attr(755,root,root) %{_bindir}/sqliterepo_c
209 %{_mandir}/man8/createrepo_c.8*
210 %{_mandir}/man8/mergerepo_c.8*
211 %{_mandir}/man8/modifyrepo_c.8*
212 %{_mandir}/man8/sqliterepo_c.8*
215 %defattr(644,root,root,755)
216 %doc AUTHORS README.md
217 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
223 %{_pkgconfigdir}/createrepo_c.pc
224 %{_includedir}/createrepo_c
227 %defattr(644,root,root,755)
230 %files -n python-createrepo_c
231 %defattr(644,root,root,755)
232 %dir %{py_sitedir}/createrepo_c
233 %attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so
234 %{py_sitedir}/createrepo_c/__init__.py[co]
237 %files -n python3-createrepo_c
238 %defattr(644,root,root,755)
239 %dir %{py3_sitedir}/createrepo_c
240 %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
241 %{py3_sitedir}/createrepo_c/__init__.py
242 %{py3_sitedir}/createrepo_c/__pycache__
245 %files -n bash-completion-createrepo_c
246 %defattr(644,root,root,755)
247 /etc/bash_completion.d/createrepo_c.bash