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