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