]> git.pld-linux.org Git - packages/librepo.git/blame - librepo.spec
- updated to 1.15.1
[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 6Summary: Library for downloading Linux repository metadata and packages
a1a7e833 7Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów oraz pakietów dla Linuksa
b3591a76 8Name: librepo
c1403b0c 9Version: 1.15.1
be563a37 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
c1403b0c 15# Source0-md5: 92b0b3f90efbc2818c3b50f9972d2808
b3591a76 16Patch0: %{name}-link.patch
c1403b0c 17Patch1: %{name}-gpgme-pkgconfig.patch
3a50a18e 18Patch2: sphinx_executable.patch
5ebce502 19URL: http://rpm-software-management.github.io/librepo/
b3591a76 20BuildRequires: check-devel
b0bdd5c5 21BuildRequires: cmake >= 2.8.5
be563a37 22BuildRequires: curl-devel >= 7.52
b3591a76 23%{?with_apidocs:BuildRequires: doxygen}
c1403b0c 24BuildRequires: glib2-devel >= 1:2.28
b3591a76 25BuildRequires: gpgme-devel
be563a37 26BuildRequires: libxml2-devel >= 2.0
b3591a76 27BuildRequires: openssl-devel
6dcf82be 28BuildRequires: pkgconfig
be563a37 29BuildRequires: rpm-build >= 4.6
b3591a76 30BuildRequires: rpmbuild(macros) >= 1.605
3a50a18e
JK
31%if %{with python3}
32BuildRequires: python3-devel >= 1:3
33%{?with_apidocs:BuildRequires: sphinx-pdg-3}
34%endif
b3591a76 35BuildRequires: tar >= 1:1.22
ba50824e 36BuildRequires: zchunk-devel >= 0.9.11
b3591a76 37BuildRequires: xz
be563a37 38Requires: curl-libs >= 7.52
c1403b0c 39Requires: glib2 >= 1:2.28
be563a37 40Requires: zchunk-libs >= 0.9.11
b3591a76
JB
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44A library providing C and Python (libcURL like) API for downloading
45Linux repository metadata and packages.
46
47%description -l pl.UTF-8
48Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
49do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
50
51%package devel
52Summary: Header files for librepo library
53Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
54Group: Development/Libraries
55Requires: %{name} = %{version}-%{release}
be563a37 56Requires: curl-devel >= 7.52
c1403b0c 57Requires: glib2-devel >= 1:2.28
b3591a76 58Requires: gpgme-devel
be563a37 59Requires: libxml2-devel >= 2.0
b3591a76 60Requires: openssl-devel
be563a37 61Requires: zchunk-devel >= 0.9.11
b3591a76
JB
62
63%description devel
64Header files for librepo library.
65
66%description devel -l pl.UTF-8
67Pliki nagłówkowe biblioteki librepo.
68
69%package apidocs
70Summary: API documentation for librepo library
71Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
72Group: Documentation
5b7272ed 73BuildArch: noarch
b3591a76
JB
74
75%description apidocs
76API documentation for librepo library.
77
78%description apidocs -l pl.UTF-8
79Dokumentacja API biblioteki librepo.
80
3a50a18e 81%package -n python3-librepo
4aef9171
JB
82Summary: Python 3 binding for librepo library
83Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki librepo
3a50a18e
JK
84Group: Libraries/Python
85Requires: %{name} = %{version}-%{release}
86
87%description -n python3-librepo
4aef9171 88Python 3 binding for librepo library.
3a50a18e
JK
89
90%description -n python3-librepo -l pl.UTF-8
4aef9171 91Wiązanie Pythona 3 do biblioteki librepo.
3a50a18e 92
6dcf82be
JB
93%package -n python3-librepo-apidocs
94Summary: API documentation for Python librepo binding
95Summary(pl.UTF-8): Dokumentacja API do wiązań Pythona do librepo
96Group: Documentation
97BuildArch: noarch
98
99%description -n python3-librepo-apidocs
100API documentation for Python librepo binding.
101
102%description -n python3-librepo-apidocs -l pl.UTF-8
103Dokumentacja API do wiązań Pythona do librepo.
104
b3591a76 105%prep
b0bdd5c5 106%setup -q
b3591a76 107%patch0 -p1
c1403b0c 108%patch1 -p1
3a50a18e 109%patch2 -p1
b3591a76
JB
110
111%build
112install -d build
113cd build
3a50a18e 114%cmake .. \
3a50a18e 115%if %{with python3}
3a50a18e
JK
116 -DPYTHON_DESIRED=3 \
117 -DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
118 -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
ba50824e 119%endif
3a50a18e
JK
120
121%{__make}
122
123%if %{with apidocs}
124%{__make} doc
125%endif
b3591a76
JB
126
127%install
128rm -rf $RPM_BUILD_ROOT
129
130%{__make} -C build install \
131 DESTDIR=$RPM_BUILD_ROOT
132
6dcf82be
JB
133%if %{with python3}
134%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
135%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
136%endif
137
b3591a76
JB
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%post -p /sbin/ldconfig
142%postun -p /sbin/ldconfig
143
144%files
145%defattr(644,root,root,755)
146%doc README.md
147%attr(755,root,root) %{_libdir}/librepo.so.0
148
149%files devel
150%defattr(644,root,root,755)
151%attr(755,root,root) %{_libdir}/librepo.so
152%{_includedir}/librepo
153%{_pkgconfigdir}/librepo.pc
154
155%if %{with apidocs}
156%files apidocs
157%defattr(644,root,root,755)
158%doc build/doc/c/html/*
159%endif
160
3a50a18e
JK
161%if %{with python3}
162%files -n python3-librepo
163%defattr(644,root,root,755)
3a50a18e
JK
164%dir %{py3_sitedir}/librepo
165%attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
166%{py3_sitedir}/librepo/__init__.py
6dcf82be
JB
167%{py3_sitedir}/librepo/__pycache__
168
169%if %{with apidocs}
170%files -n python3-librepo-apidocs
171%defattr(644,root,root,755)
172%doc build/doc/python/{_static,*.html,*.js}
173%endif
3a50a18e 174%endif
This page took 0.365073 seconds and 4 git commands to generate.