]> git.pld-linux.org Git - packages/createrepo_c.git/blob - createrepo_c.spec
up to 1.1.0
[packages/createrepo_c.git] / createrepo_c.spec
1 # TODO:
2 # - tests fail (rpm.org vs rpm5 compat problems?)
3 # - drpm support?
4 #
5 # Conditional build:
6 %bcond_without  python3 # CPython 3.x module
7 %bcond_with     tests   # make tests
8
9 Summary:        Creates a common metadata repository
10 Summary(pl.UTF-8):      Tworzenie wspólnego repozytorium metadanych
11 Name:           createrepo_c
12 Version:        0.10.0
13 Release:        2
14 License:        GPL v2+
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}
37 %if %{with python3}
38 BuildRequires:  python3-devel >= 1:3.2
39 %{?with_tests:BuildRequires:    python3-nose}
40 %endif
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)
50
51 %description
52 C implementation of Createrepo. This utility will generate a common
53 metadata repository from a directory of RPM packages.
54
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.
58
59 %package libs
60 Summary:        Library for repodata manipulation
61 Summary(pl.UTF-8):      Biblioteka do operacji na danych repozytorium
62 Group:          Libraries
63 Requires:       glib2 >= 1:2.22.0
64
65 %description libs
66 This package contains the createrepo_c library for applications to
67 easy manipulate with a repodata.
68
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).
72
73 %package devel
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}
78 Requires:       bzip2-devel
79 Requires:       curl-devel
80 Requires:       expat-devel
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
86 Requires:       xz-devel
87 Requires:       zlib-devel
88
89 %description devel
90 This package contains the createrepo_c C header files. These
91 development files are for easy manipulation with a repodata.
92
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).
96
97 %package apidocs
98 Summary:        API documentation for createrepo_c library
99 Summary(pl.UTF-8):      Dokumentacja API biblioteki createrepo_c
100 Group:          Documentation
101
102 %description apidocs
103 API documentation for createrepo_c library.
104
105 %description apidocs -l pl.UTF-8
106 Dokumentacja API biblioteki createrepo_c.
107
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}
113
114 %description -n python-createrepo_c
115 Python 2 bindings for the createrepo_c library.
116
117 %description -n python-createrepo_c -l pl.UTF-8
118 Wiązania Pythona 2 do biblioteki createrepo_c.
119
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}
125
126 %description -n python3-createrepo_c
127 Python 3 bindings for the createrepo_c library.
128
129 %description -n python3-createrepo_c -l pl.UTF-8
130 Wiązania Pythona 3 do biblioteki createrepo_c.
131
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
138
139 %description -n bash-completion-createrepo_c
140 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
141 modifyrepo_c).
142
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).
146
147 %prep
148 %setup -q
149 %patch0 -p1
150 %patch1 -p1
151 %patch2 -p1
152 %patch3 -p1
153
154 %build
155 install -d build %{?with_python3:build-py3}
156
157 cd build
158 %cmake .. \
159         -DBASHCOMP_DIR=%{bash_compdir}
160
161 %{__make}
162 %{__make} doc
163
164 %if %{with tests}
165 %{__make} tests
166 %{__make} test \
167         ARGS="-V"
168 %endif
169 cd ..
170
171 %if %{with python3}
172 cd build-py3
173 %cmake .. \
174         -DBASHCOMP_DIR=%{bash_compdir} \
175         -DPYTHON_DESIRED=3
176
177 %{__make}
178
179 %if %{with tests}
180 %{__make} tests
181 %{__make} test \
182         ARGS="-V"
183 %endif
184 cd ..
185 %endif
186
187 %install
188 rm -rf $RPM_BUILD_ROOT
189
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 \
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
205 rm -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
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*
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)
235 %doc build/doc/html
236
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]
242
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
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
This page took 0.106327 seconds and 3 git commands to generate.