1 |
%define major 0 |
2 |
%define libname %mklibname %name %major |
3 |
%define libname_devel %mklibname -d %name |
4 |
|
5 |
Name: createrepo_c |
6 |
Summary: Creates a common metadata repository |
7 |
Group: System/Packaging |
8 |
Version: 0.9.1 |
9 |
Release: %mkrel 2 |
10 |
License: GPLv2 |
11 |
URL: https://github.com/rpm-software-management/createrepo_c |
12 |
Source0: https://github.com/rpm-software-management/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz |
13 |
|
14 |
BuildRequires: bzip2-devel |
15 |
BuildRequires: cmake |
16 |
BuildRequires: doxygen |
17 |
BuildRequires: expat-devel |
18 |
BuildRequires: file-devel |
19 |
BuildRequires: glib2-devel >= 2.22.0 |
20 |
BuildRequires: libcurl-devel |
21 |
BuildRequires: libxml2-devel |
22 |
BuildRequires: openssl-devel |
23 |
BuildRequires: python2-devel |
24 |
BuildRequires: python-nose |
25 |
BuildRequires: python-sphinx |
26 |
BuildRequires: rpm-devel >= 4.9.0 |
27 |
BuildRequires: sqlite3-devel |
28 |
BuildRequires: lzma-devel |
29 |
BuildRequires: zlib-devel |
30 |
BuildRequires: bash-completion |
31 |
BuildRequires: drpm-devel >= 0.1.3 |
32 |
|
33 |
Requires: %{libname} = %{version}-%{release} |
34 |
|
35 |
# prevent provides from nonstandard paths: |
36 |
%define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so |
37 |
|
38 |
%description |
39 |
C implementation of Createrepo. |
40 |
A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c) |
41 |
for generating a common metadata repository from a directory of |
42 |
rpm packages and maintaining it. |
43 |
|
44 |
%package -n %{libname} |
45 |
Summary: Library for repodata manipulation |
46 |
Group: System/Libraries |
47 |
# The function to create DeltaRPMs calls /usr/bin/makedeltarpm, |
48 |
# which is part of the 'deltarpm' package |
49 |
Requires: deltarpm |
50 |
|
51 |
%description -n %{libname} |
52 |
Libraries for applications using the createrepo_c library |
53 |
for easy manipulation with a repodata. |
54 |
|
55 |
%package -n %{libname_devel} |
56 |
Summary: Library for repodata manipulation |
57 |
Group: Development/Libraries |
58 |
Requires: pkgconfig |
59 |
Requires: %{libname} = %{version}-%{release} |
60 |
|
61 |
%description -n %{libname_devel} |
62 |
This package contains the createrepo_c C library and header files. |
63 |
These development files are for easy manipulation with a repodata. |
64 |
|
65 |
%package -n python2-%{name} |
66 |
Summary: Python 2 bindings for the createrepo_c library |
67 |
Group: Development/Python |
68 |
Provides: python-%{name} = %{version}-%{release} |
69 |
Requires: %{libname} = %{version}-%{release} |
70 |
|
71 |
%description -n python2-createrepo_c |
72 |
Python bindings for the createrepo_c library. |
73 |
|
74 |
%prep |
75 |
%setup -q |
76 |
|
77 |
%build |
78 |
%cmake |
79 |
%make_build |
80 |
make doc-c |
81 |
|
82 |
%check |
83 |
pushd ./build |
84 |
make tests |
85 |
make ARGS="-V" test |
86 |
popd |
87 |
|
88 |
%install |
89 |
pushd ./build |
90 |
%make_install |
91 |
popd |
92 |
|
93 |
%files |
94 |
%doc README.md |
95 |
%license COPYING |
96 |
%_mandir/man8/createrepo_c.8.* |
97 |
%_mandir/man8/mergerepo_c.8.* |
98 |
%_mandir/man8/modifyrepo_c.8.* |
99 |
%_mandir/man8/sqliterepo_c.8.* |
100 |
%{_datadir}/bash-completion/completions/ |
101 |
%{_bindir}/createrepo_c |
102 |
%{_bindir}/mergerepo_c |
103 |
%{_bindir}/modifyrepo_c |
104 |
%{_bindir}/sqliterepo_c |
105 |
|
106 |
%files -n %{libname} |
107 |
%license COPYING |
108 |
%{_libdir}/libcreaterepo_c.so.%{major} |
109 |
%{_libdir}/libcreaterepo_c.so.%{major}.* |
110 |
|
111 |
%files -n %{libname_devel} |
112 |
%{_libdir}/libcreaterepo_c.so |
113 |
%{_libdir}/pkgconfig/createrepo_c.pc |
114 |
%{_includedir}/createrepo_c/ |
115 |
%license COPYING |
116 |
%doc build/doc/html |
117 |
|
118 |
%files -n python2-createrepo_c |
119 |
%{python2_sitearch}/createrepo_c/ |
120 |
|