]> git.pld-linux.org Git - packages/librepo.git/blob - librepo.spec
918aa2b92352f8b25446bc2f0e6113b8de7246ce
[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.14.2
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:  2c59bca44b3fb67e0af70968ca0b095c
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 >= 7.52
22 %{?with_apidocs:BuildRequires:  doxygen}
23 BuildRequires:  glib2-devel >= 2.0
24 BuildRequires:  gpgme-devel
25 BuildRequires:  libxml2-devel >= 2.0
26 BuildRequires:  openssl-devel
27 BuildRequires:  rpm-build >= 4.6
28 BuildRequires:  rpmbuild(macros) >= 1.605
29 %if %{with python3}
30 BuildRequires:  python3-devel >= 1:3
31 %{?with_apidocs:BuildRequires:  sphinx-pdg-3}
32 %endif
33 BuildRequires:  tar >= 1:1.22
34 BuildRequires:  zchunk-devel >= 0.9.11
35 BuildRequires:  xz
36 Requires:       curl-libs >= 7.52
37 Requires:       zchunk-libs >= 0.9.11
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 A library providing C and Python (libcURL like) API for downloading
42 Linux repository metadata and packages.
43
44 %description -l pl.UTF-8
45 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
46 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
47
48 %package devel
49 Summary:        Header files for librepo library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki librepo
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 Requires:       curl-devel >= 7.52
54 Requires:       glib2-devel >= 2.0
55 Requires:       gpgme-devel
56 Requires:       libxml2-devel >= 2.0
57 Requires:       openssl-devel
58 Requires:       zchunk-devel >= 0.9.11
59
60 %description devel
61 Header files for librepo library.
62
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki librepo.
65
66 %package apidocs
67 Summary:        API documentation for librepo library
68 Summary(pl.UTF-8):      Dokumentacja API biblioteki librepo
69 Group:          Documentation
70 BuildArch:      noarch
71
72 %description apidocs
73 API documentation for librepo library.
74
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API biblioteki librepo.
77
78 %package -n python3-librepo
79 Summary:        Python 3 binding for librepo library
80 Summary(pl.UTF-8):      Wiązanie Pythona 3 do biblioteki librepo
81 Group:          Libraries/Python
82 Requires:       %{name} = %{version}-%{release}
83
84 %description -n python3-librepo
85 Python 3 binding for librepo library.
86
87 %description -n python3-librepo -l pl.UTF-8
88 Wiązanie Pythona 3 do biblioteki librepo.
89
90 %prep
91 %setup -q
92 %patch0 -p1
93 %patch2 -p1
94
95 %build
96 install -d build
97 cd build
98 %cmake .. \
99 %if %{with python3}
100         -DPYTHON_DESIRED=3 \
101         -DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
102         -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
103 %endif
104
105 %{__make}
106
107 %if %{with apidocs}
108 %{__make} doc
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %{__make} -C build install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %post   -p /sbin/ldconfig
121 %postun -p /sbin/ldconfig
122
123 %files
124 %defattr(644,root,root,755)
125 %doc README.md
126 %attr(755,root,root) %{_libdir}/librepo.so.0
127
128 %files devel
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_libdir}/librepo.so
131 %{_includedir}/librepo
132 %{_pkgconfigdir}/librepo.pc
133
134 %if %{with apidocs}
135 %files apidocs
136 %defattr(644,root,root,755)
137 %doc build/doc/c/html/*
138 %endif
139
140 %if %{with python3}
141 %files -n python3-librepo
142 %defattr(644,root,root,755)
143 %if %{with apidocs}
144 %doc build/doc/python/{_static,*.html,*.js}
145 %endif
146 %dir %{py3_sitedir}/librepo
147 %attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
148 %{py3_sitedir}/librepo/__init__.py
149 %endif
This page took 0.045322 seconds and 2 git commands to generate.