]> git.pld-linux.org Git - packages/createrepo_c.git/blame - createrepo_c.spec
- release 2 (by relup.sh)
[packages/createrepo_c.git] / createrepo_c.spec
CommitLineData
cb0b4095
JB
1# TODO:
2# - tests fail (rpm.org vs rpm5 compat problems?)
3# - drpm support?
eb85e3be
JB
4#
5# Conditional build:
807f0e8d 6%bcond_without python3 # CPython 3.x module
16c66ee9 7%bcond_with tests # make tests
7ab42891 8
eb85e3be
JB
9Summary: Creates a common metadata repository
10Summary(pl.UTF-8): Tworzenie wspólnego repozytorium metadanych
11Name: createrepo_c
807f0e8d 12Version: 0.10.0
48976b86 13Release: 2
eb85e3be
JB
14License: GPL v2+
15Group: Applications/System
807f0e8d
JB
16#Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
17Source0: https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz
18# Source0-md5: 2e14b3e5d289875b894000ab1e54f1ec
eb85e3be 19Patch0: %{name}-rpm5.patch
16c66ee9 20Patch1: %{name}-python.patch
807f0e8d 21Patch2: %{name}-include.patch
bd7532a4 22Patch3: %{name}-bashcompdir.patch
807f0e8d 23URL: https://github.com/rpm-software-management/createrepo_c
eb85e3be
JB
24BuildRequires: bzip2-devel
25BuildRequires: check-devel
26BuildRequires: cmake >= 2.6
27BuildRequires: curl-devel
28BuildRequires: doxygen
cb0b4095 29#BuildRequires: drpm-devel
eb85e3be
JB
30BuildRequires: expat-devel
31BuildRequires: glib2-devel >= 1:2.22.0
32BuildRequires: libmagic-devel
33BuildRequires: libxml2-devel >= 2
34BuildRequires: openssl-devel
35BuildRequires: python-devel >= 2
36%{?with_tests:BuildRequires: python-nose}
807f0e8d
JB
37%if %{with python3}
38BuildRequires: python3-devel >= 1:3.2
39%{?with_tests:BuildRequires: python3-nose}
40%endif
eb85e3be
JB
41BuildRequires: rpm-devel >= 5
42BuildRequires: rpm-pythonprov
7fe79feb 43BuildRequires: rpmbuild(macros) >= 1.673
16c66ee9 44BuildRequires: sphinx-pdg-2
eb85e3be 45BuildRequires: sqlite3-devel >= 3
eb85e3be
JB
46BuildRequires: xz-devel
47BuildRequires: zlib-devel
48Requires: %{name}-libs = %{version}-%{release}
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52C implementation of Createrepo. This utility will generate a common
53metadata repository from a directory of RPM packages.
54
55%description -l pl.UTF-8
56Implementacja w C programu Createrepo. To narzędzie generuje wspólne
57repozytorium metadanych z katalogu pakietów RPM.
58
59%package libs
60Summary: Library for repodata manipulation
61Summary(pl.UTF-8): Biblioteka do operacji na danych repozytorium
62Group: Libraries
63Requires: glib2 >= 1:2.22.0
64
65%description libs
66This package contains the createrepo_c library for applications to
67easy manipulate with a repodata.
68
69%description libs -l pl.UTF-8
70Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
71łatwe operowanie na danych repozytorium (repodata).
72
73%package devel
74Summary: Header files for createrepo_c library
75Summary(pl.UTF-8): Pliki nagłówkowe biblioteki createrepo_c
76Group: Development/Libraries
77Requires: %{name}-libs = %{version}-%{release}
78Requires: bzip2-devel
79Requires: curl-devel
80Requires: expat-devel
81Requires: glib2-devel >= 1:2.22.0
82Requires: libmagic-devel
83Requires: libxml2-devel >= 2
84Requires: rpm-devel >= 5
85Requires: sqlite3-devel >= 3
86Requires: xz-devel
87Requires: zlib-devel
88
89%description devel
90This package contains the createrepo_c C header files. These
91development files are for easy manipulation with a repodata.
92
93%description devel -l pl.UTF-8
7ab42891
ER
94Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na
95celu łatwe operowanie na danych repozytorium (repodata).
eb85e3be
JB
96
97%package apidocs
98Summary: API documentation for createrepo_c library
99Summary(pl.UTF-8): Dokumentacja API biblioteki createrepo_c
100Group: Documentation
101
102%description apidocs
103API documentation for createrepo_c library.
104
105%description apidocs -l pl.UTF-8
106Dokumentacja API biblioteki createrepo_c.
107
108%package -n python-createrepo_c
807f0e8d
JB
109Summary: Python 2 bindings for the createrepo_c library
110Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki createrepo_c
eb85e3be
JB
111Group: Development/Languages/Python
112Requires: %{name}-libs = %{version}-%{release}
113
114%description -n python-createrepo_c
807f0e8d 115Python 2 bindings for the createrepo_c library.
eb85e3be
JB
116
117%description -n python-createrepo_c -l pl.UTF-8
807f0e8d
JB
118Wiązania Pythona 2 do biblioteki createrepo_c.
119
120%package -n python3-createrepo_c
121Summary: Python 3 bindings for the createrepo_c library
122Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki createrepo_c
123Group: Development/Languages/Python
124Requires: %{name}-libs = %{version}-%{release}
125
126%description -n python3-createrepo_c
127Python 3 bindings for the createrepo_c library.
128
129%description -n python3-createrepo_c -l pl.UTF-8
130Wiązania Pythona 3 do biblioteki createrepo_c.
eb85e3be
JB
131
132%package -n bash-completion-createrepo_c
133Summary: Bash completion for createrepo_c commands
134Summary(pl.UTF-8): Bashowe uzupełnianie dla poleceń createrepo_c
135Group: Applications/Shells
136Requires: %{name} = %{version}-%{release}
bd7532a4 137Requires: bash-completion >= 2.0
eb85e3be
JB
138
139%description -n bash-completion-createrepo_c
140Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
141modifyrepo_c).
142
143%description -n bash-completion-createrepo_c -l pl.UTF-8
144Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
145mergerepo_c, modifyrepo_c).
146
147%prep
807f0e8d 148%setup -q
eb85e3be 149%patch0 -p1
16c66ee9 150%patch1 -p1
807f0e8d 151%patch2 -p1
7fe79feb 152%patch3 -p1
eb85e3be
JB
153
154%build
807f0e8d
JB
155install -d build %{?with_python3:build-py3}
156
157cd build
bd7532a4 158%cmake .. \
7fe79feb 159 -DBASHCOMP_DIR=%{bash_compdir}
16c66ee9 160
eb85e3be
JB
161%{__make}
162%{__make} doc
163
164%if %{with tests}
165%{__make} tests
166%{__make} test \
167 ARGS="-V"
168%endif
807f0e8d
JB
169cd ..
170
171%if %{with python3}
172cd build-py3
173%cmake .. \
7fe79feb 174 -DBASHCOMP_DIR=%{bash_compdir} \
807f0e8d
JB
175 -DPYTHON_DESIRED=3
176
177%{__make}
178
179%if %{with tests}
180%{__make} tests
181%{__make} test \
182 ARGS="-V"
183%endif
184cd ..
185%endif
eb85e3be
JB
186
187%install
188rm -rf $RPM_BUILD_ROOT
189
807f0e8d
JB
190%if %{with python3}
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
195%endif
196
197%{__make} -C build install \
eb85e3be
JB
198 DESTDIR=$RPM_BUILD_ROOT
199
200%py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
201%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
202%py_postclean
203
204%clean
205rm -rf $RPM_BUILD_ROOT
206
207%post libs -p /sbin/ldconfig
208%postun libs -p /sbin/ldconfig
209
210%files
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
807f0e8d 215%attr(755,root,root) %{_bindir}/sqliterepo_c
eb85e3be
JB
216%{_mandir}/man8/createrepo_c.8*
217%{_mandir}/man8/mergerepo_c.8*
7ab42891 218%{_mandir}/man8/modifyrepo_c.8*
807f0e8d 219%{_mandir}/man8/sqliterepo_c.8*
eb85e3be
JB
220
221%files libs
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
226
227%files devel
228%defattr(644,root,root,755)
229%attr(755,root,root) %{_libdir}/libcreaterepo_c.so
230%{_pkgconfigdir}/createrepo_c.pc
231%{_includedir}/createrepo_c
232
233%files apidocs
234%defattr(644,root,root,755)
807f0e8d 235%doc build/doc/html
eb85e3be
JB
236
237%files -n python-createrepo_c
238%defattr(644,root,root,755)
239%dir %{py_sitedir}/createrepo_c
807f0e8d 240%attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so
eb85e3be
JB
241%{py_sitedir}/createrepo_c/__init__.py[co]
242
807f0e8d
JB
243%if %{with python3}
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__
250%endif
251
eb85e3be
JB
252%files -n bash-completion-createrepo_c
253%defattr(644,root,root,755)
bd7532a4
JB
254%{bash_compdir}/createrepo_c
255%{bash_compdir}/mergerepo_c
256%{bash_compdir}/modifyrepo_c
257%{bash_compdir}/sqliterepo_c
This page took 0.111833 seconds and 4 git commands to generate.