]> git.pld-linux.org Git - packages/librepo.git/blame - librepo.spec
- 1.13.0
[packages/librepo.git] / librepo.spec
CommitLineData
b3591a76
JB
1#
2# Conditional build:
708f65a2 3%bcond_without apidocs # doxygen/sphinx API documentation
3a50a18e 4%bcond_without python3 # CPython 3.x module
f8d47da0 5
b3591a76
JB
6Summary: Library for downloading Linux repository metadata and packages
7Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów roaz pakietów dla Linuksa
8Name: librepo
ba50824e
JR
9Version: 1.13.0
10Release: 1
b3591a76
JB
11License: GPL v2+
12Group: Libraries
5ebce502 13#Source0Download: https://github.com/rpm-software-management/librepo/releases
b0bdd5c5 14Source0: https://github.com/rpm-software-management/librepo/archive/%{version}/%{name}-%{version}.tar.gz
ba50824e 15# Source0-md5: 52dd2f4d9108a92f221bde3279bb75f1
b3591a76 16Patch0: %{name}-link.patch
3a50a18e 17Patch2: sphinx_executable.patch
5ebce502 18URL: http://rpm-software-management.github.io/librepo/
b3591a76 19BuildRequires: check-devel
b0bdd5c5 20BuildRequires: cmake >= 2.8.5
b3591a76
JB
21BuildRequires: curl-devel
22%{?with_apidocs:BuildRequires: doxygen}
f8d47da0 23BuildRequires: expat-devel >= 1.95
b3591a76
JB
24BuildRequires: glib2-devel >= 2.0
25BuildRequires: gpgme-devel
b3591a76 26BuildRequires: openssl-devel
b3591a76 27BuildRequires: rpmbuild(macros) >= 1.605
3a50a18e
JK
28%if %{with python3}
29BuildRequires: python3-devel >= 1:3
30%{?with_apidocs:BuildRequires: sphinx-pdg-3}
31%endif
b3591a76 32BuildRequires: tar >= 1:1.22
ba50824e 33BuildRequires: zchunk-devel >= 0.9.11
b3591a76
JB
34BuildRequires: xz
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38A library providing C and Python (libcURL like) API for downloading
39Linux repository metadata and packages.
40
41%description -l pl.UTF-8
42Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
43do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
44
45%package devel
46Summary: Header files for librepo library
47Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
48Group: Development/Libraries
49Requires: %{name} = %{version}-%{release}
50Requires: curl-devel
51Requires: expat-devel >= 1.95
52Requires: glib2-devel >= 2.0
53Requires: gpgme-devel
54Requires: openssl-devel
55
56%description devel
57Header files for librepo library.
58
59%description devel -l pl.UTF-8
60Pliki nagłówkowe biblioteki librepo.
61
62%package apidocs
63Summary: API documentation for librepo library
64Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
65Group: Documentation
5b7272ed 66BuildArch: noarch
b3591a76
JB
67
68%description apidocs
69API documentation for librepo library.
70
71%description apidocs -l pl.UTF-8
72Dokumentacja API biblioteki librepo.
73
3a50a18e 74%package -n python3-librepo
4aef9171
JB
75Summary: Python 3 binding for librepo library
76Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki librepo
3a50a18e
JK
77Group: Libraries/Python
78Requires: %{name} = %{version}-%{release}
79
80%description -n python3-librepo
4aef9171 81Python 3 binding for librepo library.
3a50a18e
JK
82
83%description -n python3-librepo -l pl.UTF-8
4aef9171 84Wiązanie Pythona 3 do biblioteki librepo.
3a50a18e 85
b3591a76 86%prep
b0bdd5c5 87%setup -q
b3591a76 88%patch0 -p1
3a50a18e 89%patch2 -p1
b3591a76
JB
90
91%build
92install -d build
93cd build
3a50a18e 94%cmake .. \
3a50a18e 95%if %{with python3}
3a50a18e
JK
96 -DPYTHON_DESIRED=3 \
97 -DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
98 -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
ba50824e 99%endif
3a50a18e
JK
100
101%{__make}
102
103%if %{with apidocs}
104%{__make} doc
105%endif
b3591a76
JB
106
107%install
108rm -rf $RPM_BUILD_ROOT
109
110%{__make} -C build install \
111 DESTDIR=$RPM_BUILD_ROOT
112
b3591a76
JB
113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%post -p /sbin/ldconfig
117%postun -p /sbin/ldconfig
118
119%files
120%defattr(644,root,root,755)
121%doc README.md
122%attr(755,root,root) %{_libdir}/librepo.so.0
123
124%files devel
125%defattr(644,root,root,755)
126%attr(755,root,root) %{_libdir}/librepo.so
127%{_includedir}/librepo
128%{_pkgconfigdir}/librepo.pc
129
130%if %{with apidocs}
131%files apidocs
132%defattr(644,root,root,755)
133%doc build/doc/c/html/*
134%endif
135
3a50a18e
JK
136%if %{with python3}
137%files -n python3-librepo
138%defattr(644,root,root,755)
139%if %{with apidocs}
ba50824e 140%doc build/doc/python/{*.html,_sources,_static}
3a50a18e
JK
141%endif
142%dir %{py3_sitedir}/librepo
143%attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
144%{py3_sitedir}/librepo/__init__.py
145%endif
This page took 0.131486 seconds and 4 git commands to generate.