]> git.pld-linux.org Git - packages/createrepo_c.git/blob - createrepo_c.spec
- new URLs, updated to 0.10.0
[packages/createrepo_c.git] / createrepo_c.spec
1 # TODO: tests fail (rpm.org vs rpm5 compat problems?)
2 #
3 # Conditional build:
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     tests   # make tests
6
7 Summary:        Creates a common metadata repository
8 Summary(pl.UTF-8):      Tworzenie wspólnego repozytorium metadanych
9 Name:           createrepo_c
10 Version:        0.10.0
11 Release:        1
12 License:        GPL v2+
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}
33 %if %{with python3}
34 BuildRequires:  python3-devel >= 1:3.2
35 %{?with_tests:BuildRequires:    python3-nose}
36 %endif
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)
46
47 %description
48 C implementation of Createrepo. This utility will generate a common
49 metadata repository from a directory of RPM packages.
50
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.
54
55 %package libs
56 Summary:        Library for repodata manipulation
57 Summary(pl.UTF-8):      Biblioteka do operacji na danych repozytorium
58 Group:          Libraries
59 Requires:       glib2 >= 1:2.22.0
60
61 %description libs
62 This package contains the createrepo_c library for applications to
63 easy manipulate with a repodata.
64
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).
68
69 %package devel
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}
74 Requires:       bzip2-devel
75 Requires:       curl-devel
76 Requires:       expat-devel
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
82 Requires:       xz-devel
83 Requires:       zlib-devel
84
85 %description devel
86 This package contains the createrepo_c C header files. These
87 development files are for easy manipulation with a repodata.
88
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).
92
93 %package apidocs
94 Summary:        API documentation for createrepo_c library
95 Summary(pl.UTF-8):      Dokumentacja API biblioteki createrepo_c
96 Group:          Documentation
97
98 %description apidocs
99 API documentation for createrepo_c library.
100
101 %description apidocs -l pl.UTF-8
102 Dokumentacja API biblioteki createrepo_c.
103
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}
109
110 %description -n python-createrepo_c
111 Python 2 bindings for the createrepo_c library.
112
113 %description -n python-createrepo_c -l pl.UTF-8
114 Wiązania Pythona 2 do biblioteki createrepo_c.
115
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}
121
122 %description -n python3-createrepo_c
123 Python 3 bindings for the createrepo_c library.
124
125 %description -n python3-createrepo_c -l pl.UTF-8
126 Wiązania Pythona 3 do biblioteki createrepo_c.
127
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
134
135 %description -n bash-completion-createrepo_c
136 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
137 modifyrepo_c).
138
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).
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147 %patch2 -p1
148
149 %build
150 install -d build %{?with_python3:build-py3}
151
152 cd build
153 %cmake ..
154
155 %{__make}
156 %{__make} doc
157
158 %if %{with tests}
159 %{__make} tests
160 %{__make} test \
161         ARGS="-V"
162 %endif
163 cd ..
164
165 %if %{with python3}
166 cd build-py3
167 %cmake .. \
168         -DPYTHON_DESIRED=3
169
170 %{__make}
171
172 %if %{with tests}
173 %{__make} tests
174 %{__make} test \
175         ARGS="-V"
176 %endif
177 cd ..
178 %endif
179
180 %install
181 rm -rf $RPM_BUILD_ROOT
182
183 %if %{with python3}
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
188 %endif
189
190 %{__make} -C build install \
191         DESTDIR=$RPM_BUILD_ROOT
192
193 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
194 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
195 %py_postclean
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post   libs -p /sbin/ldconfig
201 %postun libs -p /sbin/ldconfig
202
203 %files
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*
213
214 %files libs
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
219
220 %files devel
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
223 %{_pkgconfigdir}/createrepo_c.pc
224 %{_includedir}/createrepo_c
225
226 %files apidocs
227 %defattr(644,root,root,755)
228 %doc build/doc/html
229
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]
235
236 %if %{with python3}
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__
243 %endif
244
245 %files -n bash-completion-createrepo_c
246 %defattr(644,root,root,755)
247 /etc/bash_completion.d/createrepo_c.bash
This page took 0.142091 seconds and 4 git commands to generate.