]> git.pld-linux.org Git - packages/librepo.git/blob - librepo.spec
42dc494d67425691c2f652fed949b76309562c2d
[packages/librepo.git] / librepo.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # do not build and package API docs
4
5 %define         gitrev 1639724
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.7.7
10 Release:        1
11 License:        GPL v2+
12 Group:          Libraries
13 # argh, the latest tagged version is 1.0.0
14 #Source0:       https://github.com/Tojaj/librepo/archive/%{version}/%{name}-%{version}.tar.gz
15 Source0:        http://pkgs.fedoraproject.org/repo/pkgs/librepo/%{name}-%{gitrev}.tar.xz/904628ef27b512e7aed07a6d41613c87/librepo-%{gitrev}.tar.xz
16 # Source0-md5:  904628ef27b512e7aed07a6d41613c87
17 Patch0:         %{name}-link.patch
18 URL:            http://tojaj.github.io/librepo/
19 BuildRequires:  attr-devel
20 BuildRequires:  check-devel
21 BuildRequires:  cmake >= 2.6
22 BuildRequires:  curl-devel
23 %{?with_apidocs:BuildRequires:  doxygen}
24 BuildRequires:  expat-devel >= 1.95
25 BuildRequires:  glib2-devel >= 2.0
26 BuildRequires:  gpgme-devel
27 BuildRequires:  openssl-devel
28 BuildRequires:  python-devel >= 2
29 BuildRequires:  rpmbuild(macros) >= 1.605
30 %{?with_apidocs:BuildRequires:  sphinx-pdg}
31 BuildRequires:  tar >= 1:1.22
32 BuildRequires:  xz
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 A library providing C and Python (libcURL like) API for downloading
37 Linux repository metadata and packages.
38
39 %description -l pl.UTF-8
40 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
41 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
42
43 %package devel
44 Summary:        Header files for librepo library
45 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki librepo
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 Requires:       curl-devel
49 Requires:       expat-devel >= 1.95
50 Requires:       glib2-devel >= 2.0
51 Requires:       gpgme-devel
52 Requires:       openssl-devel
53
54 %description devel
55 Header files for librepo library.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki librepo.
59
60 %package apidocs
61 Summary:        API documentation for librepo library
62 Summary(pl.UTF-8):      Dokumentacja API biblioteki librepo
63 Group:          Documentation
64
65 %description apidocs
66 API documentation for librepo library.
67
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API biblioteki librepo.
70
71 %package -n python-librepo
72 Summary:        Python binding for librepo library
73 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki librepo
74 Group:          Libraries/Python
75 Requires:       %{name} = %{version}-%{release}
76
77 %description -n python-librepo
78 Python binding for librepo library.
79
80 %description -n python-librepo -l pl.UTF-8
81 Wiązanie Pythona do biblioteki librepo.
82
83 %prep
84 %setup -q -n %{name}
85 %patch0 -p1
86
87 %build
88 install -d build
89 cd build
90 %cmake ..
91
92 %{__make}
93
94 %if %{with apidocs}
95 %{__make} doc
96 %endif
97
98 %install
99 rm -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
109 rm -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.090452 seconds and 2 git commands to generate.