]> git.pld-linux.org Git - packages/createrepo_c.git/blob - createrepo_c.spec
up to 1.0.3
[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.0.3
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:  fef459cd69f83b282c4053befcee9206
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:  rpm-build >= 4.6
36 BuildRequires:  rpm-devel
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.673
39 BuildRequires:  sphinx-pdg
40 BuildRequires:  sqlite3-devel >= 3.6.18
41 BuildRequires:  xz-devel
42 BuildRequires:  zchunk-devel
43 BuildRequires:  zlib-devel
44 BuildRequires:  zstd-devel
45 %{?with_tests:BuildRequires:    zchunk}
46 Requires:       %{name}-libs = %{version}-%{release}
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 C implementation of Createrepo. This utility will generate a common
51 metadata repository from a directory of RPM packages.
52
53 %description -l pl.UTF-8
54 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
55 repozytorium metadanych z katalogu pakietów RPM.
56
57 %package libs
58 Summary:        Library for repodata manipulation
59 Summary(pl.UTF-8):      Biblioteka do operacji na danych repozytorium
60 Group:          Libraries
61 Requires:       glib2 >= 1:2.22.0
62 Requires:       sqlite3-libs >= 3.6.18
63
64 %description libs
65 This package contains the createrepo_c library for applications to
66 easy manipulate with a repodata.
67
68 %description libs -l pl.UTF-8
69 Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
70 łatwe operowanie na danych repozytorium (repodata).
71
72 %package devel
73 Summary:        Header files for createrepo_c library
74 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki createrepo_c
75 Group:          Development/Libraries
76 Requires:       %{name}-libs = %{version}-%{release}
77 Requires:       bzip2-devel
78 Requires:       curl-devel
79 Requires:       expat-devel
80 Requires:       glib2-devel >= 1:2.22.0
81 Requires:       libxml2-devel >= 2
82 Requires:       rpm-devel
83 Requires:       sqlite3-devel >= 3.6.18
84 Requires:       xz-devel
85 Requires:       zlib-devel
86 Requires:       zstd-devel
87
88 %description devel
89 This package contains the createrepo_c C header files. These
90 development files are for easy manipulation with a repodata.
91
92 %description devel -l pl.UTF-8
93 Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na
94 celu łatwe operowanie na danych repozytorium (repodata).
95
96 %package apidocs
97 Summary:        API documentation for createrepo_c library
98 Summary(pl.UTF-8):      Dokumentacja API biblioteki createrepo_c
99 Group:          Documentation
100 BuildArch:      noarch
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 python3-createrepo_c
109 Summary:        Python 3 bindings for the createrepo_c library
110 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki createrepo_c
111 Group:          Development/Languages/Python
112 Requires:       %{name}-libs = %{version}-%{release}
113 Obsoletes:      python-createrepo_c < 0.17.6
114
115 %description -n python3-createrepo_c
116 Python 3 bindings for the createrepo_c library.
117
118 %description -n python3-createrepo_c -l pl.UTF-8
119 Wiązania Pythona 3 do biblioteki createrepo_c.
120
121 %package -n bash-completion-createrepo_c
122 Summary:        Bash completion for createrepo_c commands
123 Summary(pl.UTF-8):      Bashowe uzupełnianie dla poleceń createrepo_c
124 Group:          Applications/Shells
125 Requires:       %{name} = %{version}-%{release}
126 Requires:       bash-completion >= 1:2.0
127 BuildArch:      noarch
128
129 %description -n bash-completion-createrepo_c
130 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
131 modifyrepo_c).
132
133 %description -n bash-completion-createrepo_c -l pl.UTF-8
134 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
135 mergerepo_c, modifyrepo_c).
136
137 %prep
138 %setup -q
139 %{?with_rpm5:%patch0 -p1}
140
141 %build
142 install -d build
143 cd build
144 %cmake .. \
145         -DBASHCOMP_DIR=%{bash_compdir} \
146         -DPYTHON_DESIRED=3
147
148 %{__make}
149 %{__make} doc
150
151 %if %{with tests}
152 %{__make} tests
153 %{__make} test \
154         ARGS="-V"
155 %endif
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159
160 %{__make} -C build install \
161         DESTDIR=$RPM_BUILD_ROOT
162
163 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
164 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %post   libs -p /sbin/ldconfig
170 %postun libs -p /sbin/ldconfig
171
172 %files
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_bindir}/createrepo_c
175 %attr(755,root,root) %{_bindir}/mergerepo_c
176 %attr(755,root,root) %{_bindir}/modifyrepo_c
177 %attr(755,root,root) %{_bindir}/sqliterepo_c
178 %{_mandir}/man8/createrepo_c.8*
179 %{_mandir}/man8/mergerepo_c.8*
180 %{_mandir}/man8/modifyrepo_c.8*
181 %{_mandir}/man8/sqliterepo_c.8*
182
183 %files libs
184 %defattr(644,root,root,755)
185 %doc AUTHORS README.md
186 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
187 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.1
188
189 %files devel
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
192 %{_pkgconfigdir}/createrepo_c.pc
193 %{_includedir}/createrepo_c
194
195 %files apidocs
196 %defattr(644,root,root,755)
197 %doc build/doc/html
198
199 %files -n python3-createrepo_c
200 %defattr(644,root,root,755)
201 %dir %{py3_sitedir}/createrepo_c
202 %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
203 %{py3_sitedir}/createrepo_c/__init__.py
204 %{py3_sitedir}/createrepo_c/__pycache__
205 %{py3_sitedir}/createrepo_c-%{version}-py*.egg-info
206
207 %files -n bash-completion-createrepo_c
208 %defattr(644,root,root,755)
209 %{bash_compdir}/createrepo_c
210 %{bash_compdir}/mergerepo_c
211 %{bash_compdir}/modifyrepo_c
212 %{bash_compdir}/sqliterepo_c
This page took 0.123311 seconds and 4 git commands to generate.