/[packages]/updates/infra_5/createrepo_c/current/SPECS/createrepo_c.spec
ViewVC logotype

Contents of /updates/infra_5/createrepo_c/current/SPECS/createrepo_c.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1058510 - (show annotations) (download)
Tue Oct 4 11:04:09 2016 UTC (7 years, 6 months ago) by ngompa
File size: 4281 byte(s)
Add patch to fix dep filtering (mga#19509)
1 %define major 0
2 %define libname %mklibname %name %major
3 %define libname_devel %mklibname -d %name
4
5 # Backported definition from mga6
6 %define python2_sitearch %{python_sitearch}
7
8 %bcond_without python3
9
10 Name: createrepo_c
11 Summary: Creates a common metadata repository
12 Group: System/Packaging
13 Version: 0.10.0
14 Release: %mkrel 2
15 License: GPLv2
16 URL: https://github.com/rpm-software-management/createrepo_c
17 Source0: https://github.com/rpm-software-management/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
18
19 # From https://github.com/rpm-software-management/createrepo_c/pull/68
20 Patch0: 0001-Ensure-that-provides-requires-versions-are-factored-.patch
21
22 BuildRequires: bzip2-devel
23 BuildRequires: cmake
24 BuildRequires: doxygen
25 BuildRequires: expat-devel
26 BuildRequires: file-devel
27 BuildRequires: glib2-devel >= 2.22.0
28 BuildRequires: libcurl-devel
29 BuildRequires: libxml2-devel
30 BuildRequires: openssl-devel
31 BuildRequires: python-devel
32 BuildRequires: python-nose
33 BuildRequires: python-sphinx
34 BuildRequires: rpm-devel >= 4.9.0
35 BuildRequires: sqlite3-devel
36 BuildRequires: lzma-devel
37 BuildRequires: zlib-devel
38 BuildRequires: bash-completion
39 BuildRequires: drpm-devel >= 0.1.3
40
41 %if %{with python3}
42 BuildRequires: python3-devel
43 BuildRequires: python3-nose
44 BuildRequires: python3-sphinx
45 %endif
46
47 Requires: %{libname} = %{version}-%{release}
48
49 # prevent provides from nonstandard paths:
50 %define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so
51
52 %description
53 C implementation of Createrepo.
54 A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c)
55 for generating a common metadata repository from a directory of
56 rpm packages and maintaining it.
57
58 %package -n %{libname}
59 Summary: Library for repodata manipulation
60 Group: System/Libraries
61 # The function to create DeltaRPMs calls /usr/bin/makedeltarpm,
62 # which is part of the 'deltarpm' package
63 Requires: deltarpm
64
65 %description -n %{libname}
66 Libraries for applications using the createrepo_c library
67 for easy manipulation with a repodata.
68
69 %package -n %{libname_devel}
70 Summary: Library for repodata manipulation
71 Group: Development/C
72 Provides: %{name}-devel = %{version}-%{release}
73 Requires: pkgconfig
74 Requires: %{libname} = %{version}-%{release}
75
76 %description -n %{libname_devel}
77 This package contains the createrepo_c C library and header files.
78 These development files are for easy manipulation with a repodata.
79
80 %package -n python2-%{name}
81 Summary: Python 2 bindings for the createrepo_c library
82 Group: Development/Python
83 Provides: python-%{name} = %{version}-%{release}
84 Requires: %{libname} = %{version}-%{release}
85
86 %description -n python2-createrepo_c
87 Python 2 bindings for the createrepo_c library.
88
89 %if %{with python3}
90 %package -n python3-%{name}
91 Summary: Python 3 bindings for the createrepo_c library
92 Group: Development/Python
93 Requires: %{libname} = %{version}-%{release}
94
95 %description -n python3-createrepo_c
96 Python 3 bindings for the createrepo_c library.
97 %endif
98
99
100 %prep
101 %autosetup -p1
102
103 %if %{with python3}
104 rm -rf py3
105 mkdir py3
106 %endif
107
108 %build
109 %cmake
110 %make_build
111 make doc-c
112
113 %if %{with python3}
114 pushd ../py3
115 %cmake -DPYTHON_DESIRED:str=3 ../../
116 %make_build
117 popd
118 %endif
119
120 %check
121 pushd ./build
122 make tests
123 make ARGS="-V" test
124 popd
125
126 %if %{with python3}
127 pushd ./py3/build
128 make tests
129 make ARGS="-V" test
130 popd
131 %endif
132
133 %install
134 pushd ./build
135 %make_install
136 popd
137
138 %if %{with python3}
139 pushd ./py3/build
140 %make_install
141 popd
142 %endif
143
144 %files
145 %doc README.md
146 %license COPYING
147 %_mandir/man8/createrepo_c.8.*
148 %_mandir/man8/mergerepo_c.8.*
149 %_mandir/man8/modifyrepo_c.8.*
150 %_mandir/man8/sqliterepo_c.8.*
151 %{_datadir}/bash-completion/completions/
152 %{_bindir}/createrepo_c
153 %{_bindir}/mergerepo_c
154 %{_bindir}/modifyrepo_c
155 %{_bindir}/sqliterepo_c
156
157 %files -n %{libname}
158 %license COPYING
159 %{_libdir}/libcreaterepo_c.so.%{major}
160 %{_libdir}/libcreaterepo_c.so.%{major}.*
161
162 %files -n %{libname_devel}
163 %{_libdir}/libcreaterepo_c.so
164 %{_libdir}/pkgconfig/createrepo_c.pc
165 %{_includedir}/createrepo_c/
166 %license COPYING
167 %doc build/doc/html
168
169 %files -n python2-createrepo_c
170 %{python2_sitearch}/createrepo_c/
171
172 %if %{with python3}
173 %files -n python3-createrepo_c
174 %{python3_sitearch}/createrepo_c/
175 %endif

  ViewVC Help
Powered by ViewVC 1.1.30