]> git.pld-linux.org Git - packages/createrepo_c.git/blob - createrepo_c.spec
up to 1.1.1
[packages/createrepo_c.git] / createrepo_c.spec
1 # TODO:
2 # - drpm support?
3 #
4 # Conditional build:
5 %bcond_with     rpm5    # build with rpm5, tests may fail (rpm.org vs rpm5 compat problems?)
6 %bcond_without  tests   # make tests
7
8 Summary:        Creates a common metadata repository
9 Summary(pl.UTF-8):      Tworzenie wspólnego repozytorium metadanych
10 Name:           createrepo_c
11 Version:        1.1.0
12 Release:        1
13 License:        GPL v2+
14 Group:          Applications/System
15 #Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
16 Source0:        https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  c79963bca76c1ddbd954d96e858f550d
18 Patch0:         %{name}-rpm5.patch
19 URL:            https://github.com/rpm-software-management/createrepo_c
20 BuildRequires:  bash-completion-devel >= 1:2.0
21 BuildRequires:  bzip2-devel
22 BuildRequires:  cmake >= 2.8.12
23 BuildRequires:  curl-devel
24 BuildRequires:  doxygen
25 #BuildRequires: drpm-devel
26 BuildRequires:  glib2-devel >= 1:2.22.0
27 BuildRequires:  libmodulemd-devel
28 BuildRequires:  libxml2-devel >= 2
29 BuildRequires:  openssl-devel
30 BuildRequires:  pkgconfig
31 %{?with_tests:BuildRequires:    python-nose}
32 BuildRequires:  python3-devel >= 1:3.2
33 BuildRequires:  python3-modules
34 %{?with_tests:BuildRequires:    python3-nose}
35 BuildRequires:  python3-setuptools
36 BuildRequires:  rpm-build >= 4.6
37 BuildRequires:  rpm-devel
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.673
40 BuildRequires:  sphinx-pdg
41 BuildRequires:  sqlite3-devel >= 3.6.18
42 BuildRequires:  xz-devel
43 BuildRequires:  zchunk-devel
44 BuildRequires:  zlib-devel
45 BuildRequires:  zstd-devel
46 %{?with_tests:BuildRequires:    zchunk}
47 Requires:       %{name}-libs = %{version}-%{release}
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 C implementation of Createrepo. This utility will generate a common
52 metadata repository from a directory of RPM packages.
53
54 %description -l pl.UTF-8
55 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
56 repozytorium metadanych z katalogu pakietów RPM.
57
58 %package libs
59 Summary:        Library for repodata manipulation
60 Summary(pl.UTF-8):      Biblioteka do operacji na danych repozytorium
61 Group:          Libraries
62 Requires:       glib2 >= 1:2.22.0
63 Requires:       sqlite3-libs >= 3.6.18
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:       libxml2-devel >= 2
83 Requires:       rpm-devel
84 Requires:       sqlite3-devel >= 3.6.18
85 Requires:       xz-devel
86 Requires:       zlib-devel
87 Requires:       zstd-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 BuildArch:      noarch
102
103 %description apidocs
104 API documentation for createrepo_c library.
105
106 %description apidocs -l pl.UTF-8
107 Dokumentacja API biblioteki createrepo_c.
108
109 %package -n python3-createrepo_c
110 Summary:        Python 3 bindings for the createrepo_c library
111 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki createrepo_c
112 Group:          Development/Languages/Python
113 Requires:       %{name}-libs = %{version}-%{release}
114 Obsoletes:      python-createrepo_c < 0.17.6
115
116 %description -n python3-createrepo_c
117 Python 3 bindings for the createrepo_c library.
118
119 %description -n python3-createrepo_c -l pl.UTF-8
120 Wiązania Pythona 3 do biblioteki createrepo_c.
121
122 %package -n bash-completion-createrepo_c
123 Summary:        Bash completion for createrepo_c commands
124 Summary(pl.UTF-8):      Bashowe uzupełnianie dla poleceń createrepo_c
125 Group:          Applications/Shells
126 Requires:       %{name} = %{version}-%{release}
127 Requires:       bash-completion >= 1:2.0
128 BuildArch:      noarch
129
130 %description -n bash-completion-createrepo_c
131 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
132 modifyrepo_c).
133
134 %description -n bash-completion-createrepo_c -l pl.UTF-8
135 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
136 mergerepo_c, modifyrepo_c).
137
138 %prep
139 %setup -q
140 %{?with_rpm5:%patch0 -p1}
141
142 %build
143 install -d build
144 cd build
145 %cmake .. \
146         -DBASHCOMP_DIR=%{bash_compdir} \
147         -DPYTHON_DESIRED=3
148
149 %{__make}
150 %{__make} doc
151
152 %if %{with tests}
153 %{__make} tests
154 %{__make} test \
155         ARGS="-V"
156 %endif
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 %{__make} -C build install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
165 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post   libs -p /sbin/ldconfig
171 %postun libs -p /sbin/ldconfig
172
173 %files
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_bindir}/createrepo_c
176 %attr(755,root,root) %{_bindir}/mergerepo_c
177 %attr(755,root,root) %{_bindir}/modifyrepo_c
178 %attr(755,root,root) %{_bindir}/sqliterepo_c
179 %{_mandir}/man8/createrepo_c.8*
180 %{_mandir}/man8/mergerepo_c.8*
181 %{_mandir}/man8/modifyrepo_c.8*
182 %{_mandir}/man8/sqliterepo_c.8*
183
184 %files libs
185 %defattr(644,root,root,755)
186 %doc AUTHORS README.md
187 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.1
189
190 %files devel
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
193 %{_pkgconfigdir}/createrepo_c.pc
194 %{_includedir}/createrepo_c
195
196 %files apidocs
197 %defattr(644,root,root,755)
198 %doc build/doc/html
199
200 %files -n python3-createrepo_c
201 %defattr(644,root,root,755)
202 %dir %{py3_sitedir}/createrepo_c
203 %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
204 %{py3_sitedir}/createrepo_c/__init__.py
205 %{py3_sitedir}/createrepo_c/__pycache__
206 %{py3_sitedir}/createrepo_c-%{version}-py*.egg-info
207
208 %files -n bash-completion-createrepo_c
209 %defattr(644,root,root,755)
210 %{bash_compdir}/createrepo_c
211 %{bash_compdir}/mergerepo_c
212 %{bash_compdir}/modifyrepo_c
213 %{bash_compdir}/sqliterepo_c
This page took 0.131156 seconds and 3 git commands to generate.