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