2 # - tests fail (rpm.org vs rpm5 compat problems?)
6 %bcond_without python3 # CPython 3.x module
7 %bcond_with tests # make tests
9 Summary: Creates a common metadata repository
10 Summary(pl.UTF-8): Tworzenie wspólnego repozytorium metadanych
15 Group: Applications/System
16 #Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
17 Source0: https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 2e14b3e5d289875b894000ab1e54f1ec
19 Patch0: %{name}-rpm5.patch
20 Patch1: %{name}-python.patch
21 Patch2: %{name}-include.patch
22 Patch3: %{name}-bashcompdir.patch
23 URL: https://github.com/rpm-software-management/createrepo_c
24 BuildRequires: bzip2-devel
25 BuildRequires: check-devel
26 BuildRequires: cmake >= 2.6
27 BuildRequires: curl-devel
28 BuildRequires: doxygen
29 #BuildRequires: drpm-devel
30 BuildRequires: expat-devel
31 BuildRequires: glib2-devel >= 1:2.22.0
32 BuildRequires: libmagic-devel
33 BuildRequires: libxml2-devel >= 2
34 BuildRequires: openssl-devel
35 BuildRequires: python-devel >= 2
36 %{?with_tests:BuildRequires: python-nose}
38 BuildRequires: python3-devel >= 1:3.2
39 %{?with_tests:BuildRequires: python3-nose}
41 BuildRequires: rpm-devel >= 5
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.673
44 BuildRequires: sphinx-pdg-2
45 BuildRequires: sqlite3-devel >= 3
46 BuildRequires: xz-devel
47 BuildRequires: zlib-devel
48 Requires: %{name}-libs = %{version}-%{release}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 C implementation of Createrepo. This utility will generate a common
53 metadata repository from a directory of RPM packages.
55 %description -l pl.UTF-8
56 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
57 repozytorium metadanych z katalogu pakietów RPM.
60 Summary: Library for repodata manipulation
61 Summary(pl.UTF-8): Biblioteka do operacji na danych repozytorium
63 Requires: glib2 >= 1:2.22.0
66 This package contains the createrepo_c library for applications to
67 easy manipulate with a repodata.
69 %description libs -l pl.UTF-8
70 Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
71 łatwe operowanie na danych repozytorium (repodata).
74 Summary: Header files for createrepo_c library
75 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki createrepo_c
76 Group: Development/Libraries
77 Requires: %{name}-libs = %{version}-%{release}
81 Requires: glib2-devel >= 1:2.22.0
82 Requires: libmagic-devel
83 Requires: libxml2-devel >= 2
84 Requires: rpm-devel >= 5
85 Requires: sqlite3-devel >= 3
90 This package contains the createrepo_c C header files. These
91 development files are for easy manipulation with a repodata.
93 %description devel -l pl.UTF-8
94 Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na
95 celu łatwe operowanie na danych repozytorium (repodata).
98 Summary: API documentation for createrepo_c library
99 Summary(pl.UTF-8): Dokumentacja API biblioteki createrepo_c
103 API documentation for createrepo_c library.
105 %description apidocs -l pl.UTF-8
106 Dokumentacja API biblioteki createrepo_c.
108 %package -n python-createrepo_c
109 Summary: Python 2 bindings for the createrepo_c library
110 Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki createrepo_c
111 Group: Development/Languages/Python
112 Requires: %{name}-libs = %{version}-%{release}
114 %description -n python-createrepo_c
115 Python 2 bindings for the createrepo_c library.
117 %description -n python-createrepo_c -l pl.UTF-8
118 Wiązania Pythona 2 do biblioteki createrepo_c.
120 %package -n python3-createrepo_c
121 Summary: Python 3 bindings for the createrepo_c library
122 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki createrepo_c
123 Group: Development/Languages/Python
124 Requires: %{name}-libs = %{version}-%{release}
126 %description -n python3-createrepo_c
127 Python 3 bindings for the createrepo_c library.
129 %description -n python3-createrepo_c -l pl.UTF-8
130 Wiązania Pythona 3 do biblioteki createrepo_c.
132 %package -n bash-completion-createrepo_c
133 Summary: Bash completion for createrepo_c commands
134 Summary(pl.UTF-8): Bashowe uzupełnianie dla poleceń createrepo_c
135 Group: Applications/Shells
136 Requires: %{name} = %{version}-%{release}
137 Requires: bash-completion >= 2.0
139 %description -n bash-completion-createrepo_c
140 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
143 %description -n bash-completion-createrepo_c -l pl.UTF-8
144 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
145 mergerepo_c, modifyrepo_c).
155 install -d build %{?with_python3:build-py3}
159 -DBASHCOMP_DIR=%{bash_compdir}
174 -DBASHCOMP_DIR=%{bash_compdir} \
188 rm -rf $RPM_BUILD_ROOT
191 %{__make} -C build-py3 install \
192 DESTDIR=$RPM_BUILD_ROOT
193 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
194 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
197 %{__make} -C build install \
198 DESTDIR=$RPM_BUILD_ROOT
200 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
201 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
205 rm -rf $RPM_BUILD_ROOT
207 %post libs -p /sbin/ldconfig
208 %postun libs -p /sbin/ldconfig
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_bindir}/createrepo_c
213 %attr(755,root,root) %{_bindir}/mergerepo_c
214 %attr(755,root,root) %{_bindir}/modifyrepo_c
215 %attr(755,root,root) %{_bindir}/sqliterepo_c
216 %{_mandir}/man8/createrepo_c.8*
217 %{_mandir}/man8/mergerepo_c.8*
218 %{_mandir}/man8/modifyrepo_c.8*
219 %{_mandir}/man8/sqliterepo_c.8*
222 %defattr(644,root,root,755)
223 %doc AUTHORS README.md
224 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
230 %{_pkgconfigdir}/createrepo_c.pc
231 %{_includedir}/createrepo_c
234 %defattr(644,root,root,755)
237 %files -n python-createrepo_c
238 %defattr(644,root,root,755)
239 %dir %{py_sitedir}/createrepo_c
240 %attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so
241 %{py_sitedir}/createrepo_c/__init__.py[co]
244 %files -n python3-createrepo_c
245 %defattr(644,root,root,755)
246 %dir %{py3_sitedir}/createrepo_c
247 %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
248 %{py3_sitedir}/createrepo_c/__init__.py
249 %{py3_sitedir}/createrepo_c/__pycache__
252 %files -n bash-completion-createrepo_c
253 %defattr(644,root,root,755)
254 %{bash_compdir}/createrepo_c
255 %{bash_compdir}/mergerepo_c
256 %{bash_compdir}/modifyrepo_c
257 %{bash_compdir}/sqliterepo_c