]>
Commit | Line | Data |
---|---|---|
e09b6e53 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
39a98ddb | 4 | %bcond_with rpm5 # rpm5 fork instead of rpm.org |
3e1a6e81 | 5 | %bcond_with zchunk # zchunk compression |
e09b6e53 JB |
6 | # |
7 | Summary: Package management library | |
8 | Summary(pl.UTF-8): Biblioteka do zarządzania pakietami | |
9 | Name: libzypp | |
aa7e58a5 | 10 | Version: 17.30.0 |
e09b6e53 JB |
11 | Release: 1 |
12 | License: GPL v2+ | |
13 | Group: Libraries | |
5e9b76ed | 14 | #Source0Download: https://github.com/openSUSE/libzypp/releases |
e09b6e53 | 15 | Source0: https://github.com/openSUSE/libzypp/archive/%{version}/%{name}-%{version}.tar.gz |
aa7e58a5 | 16 | # Source0-md5: 51bfd25a747e45e1e684d474f5cbefe8 |
e09b6e53 | 17 | Patch0: %{name}-rpm5.patch |
3e1a6e81 | 18 | Patch1: %{name}-link.patch |
e09b6e53 JB |
19 | URL: https://en.opensuse.org/Portal:Libzypp |
20 | BuildRequires: boost-devel | |
3e1a6e81 | 21 | BuildRequires: cmake >= 3.1 |
e09b6e53 JB |
22 | BuildRequires: curl-devel |
23 | %{?with_apidocs:BuildRequires: doxygen} | |
24 | BuildRequires: expat-devel >= 1.95 | |
25 | BuildRequires: gettext-tools | |
3e1a6e81 | 26 | BuildRequires: glib2-devel >= 2.0 |
5e9b76ed | 27 | BuildRequires: gpgme-devel |
e09b6e53 | 28 | BuildRequires: libproxy-devel |
3e1a6e81 | 29 | BuildRequires: libsigc++-devel >= 2.0 |
e09b6e53 JB |
30 | # with helixrepo enabled |
31 | BuildRequires: libsolv-devel >= 0.6.8 | |
5e9b76ed | 32 | BuildRequires: libstdc++-devel >= 6:5 |
e09b6e53 JB |
33 | BuildRequires: libxml2-devel >= 2.0 |
34 | BuildRequires: openssl-devel | |
3e1a6e81 | 35 | BuildRequires: pkgconfig |
35c85626 | 36 | BuildRequires: protobuf-devel >= 3.8.0 |
39a98ddb | 37 | %if %{with rpm5} |
e09b6e53 | 38 | BuildRequires: rpm-devel >= 5 |
39a98ddb JB |
39 | %else |
40 | BuildRequires: rpm-devel >= 1:4.15 | |
3e1a6e81 | 41 | %endif |
e09b6e53 | 42 | BuildRequires: udev-devel |
35c85626 | 43 | BuildRequires: yaml-cpp-devel |
3e1a6e81 | 44 | %{?with_zchunk:BuildRequires: zchunk-devel} |
e09b6e53 JB |
45 | BuildRequires: zlib-devel |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | libzypp is the package management library that powers applications | |
50 | like YaST, zypper and the openSUSE/SLE implementation of PackageKit. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | libzypp to biblioteka do zarządzania pakietami wspomagająca aplikacje | |
54 | takie jak YaST, zypper czy implementacja PackageKit wykorzystywana w | |
55 | dystrybucjach openSUSE/SLE. | |
56 | ||
57 | %package devel | |
58 | Summary: Header files for Zypp library | |
59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Zypp | |
60 | Group: Development/Libraries | |
61 | Requires: %{name} = %{version}-%{release} | |
62 | Requires: boost-devel | |
63 | Requires: curl-devel | |
64 | Requires: libsolv-devel >= 0.6.8 | |
5e9b76ed | 65 | Requires: libstdc++-devel >= 6:5 |
e09b6e53 | 66 | Requires: libxml2-devel >= 2.0 |
39a98ddb | 67 | %if %{with rpm5} |
e09b6e53 | 68 | Requires: rpm-devel >= 5 |
39a98ddb JB |
69 | %else |
70 | Requires: rpm-devel >= 1:4.15 | |
3e1a6e81 | 71 | %endif |
e09b6e53 JB |
72 | |
73 | %description devel | |
74 | Header files for Zypp library. | |
75 | ||
76 | %description devel -l pl.UTF-8 | |
77 | Pliki nagłówkowe biblioteki Zypp. | |
78 | ||
79 | %package apidocs | |
80 | Summary: Zypp API documentation | |
81 | Summary(pl.UTF-8): Dokumentacja API biblioteki Zypp | |
82 | Group: Documentation | |
83 | ||
84 | %description apidocs | |
85 | API documentation for Zypp library. | |
86 | ||
87 | %description apidocs -l pl.UTF-8 | |
88 | Dokumentacja API biblioteki Zypp. | |
89 | ||
90 | %prep | |
91 | %setup -q | |
39a98ddb | 92 | %if %{with rpm5} |
e09b6e53 | 93 | %patch0 -p1 |
3e1a6e81 | 94 | %endif |
e09b6e53 | 95 | %patch1 -p1 |
e09b6e53 JB |
96 | |
97 | %build | |
98 | install -d build | |
99 | cd build | |
3e1a6e81 | 100 | # MEDIABACKEND_TESTS require nginx+fcgi+fcgi++ |
e09b6e53 | 101 | %cmake .. \ |
35c85626 | 102 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ |
e09b6e53 | 103 | %{?with_apidocs:-DENABLE_BUILD_DOCS=ON} \ |
3e1a6e81 JB |
104 | -DENABLE_BUILD_TRANS=ON \ |
105 | -DDISABLE_MEDIABACKEND_TESTS=ON \ | |
106 | %{?with_zchunk:-DENABLE_ZCHUNK_COMPRESSION=ON} | |
107 | ||
e09b6e53 JB |
108 | %{__make} |
109 | ||
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %{__make} -C build install \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | ||
116 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/packages/libzypp/libzypp/html $RPM_BUILD_ROOT%{_docdir}/libzypp-apidocs | |
117 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/packages/libzypp/libzypp/libzypp.doxytag | |
118 | ||
119 | %find_lang zypp | |
120 | ||
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %post -p /sbin/ldconfig | |
125 | %postun -p /sbin/ldconfig | |
126 | ||
127 | %files -f zypp.lang | |
128 | %defattr(644,root,root,755) | |
129 | %doc COPYING | |
130 | %dir %{_sysconfdir}/zypp | |
5e9b76ed | 131 | %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/zypp/needreboot |
e09b6e53 JB |
132 | %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/zypp/systemCheck |
133 | %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/zypp/zypp.conf | |
134 | %config(noreplace) %verify(not mtime md5 size) /etc/logrotate.d/zypp-history.lr | |
135 | %attr(755,root,root) %{_bindir}/zypp-CheckAccessDeleted | |
136 | %attr(755,root,root) %{_bindir}/zypp-NameReqPrv | |
137 | %attr(755,root,root) %{_libdir}/libzypp.so.*.*.* | |
3e1a6e81 | 138 | %attr(755,root,root) %ghost %{_libdir}/libzypp.so.1722 |
35c85626 JB |
139 | %dir %{_libexecdir}/zypp |
140 | %attr(755,root,root) %{_libexecdir}/zypp/zypp-rpm | |
e09b6e53 JB |
141 | %{_datadir}/zypp |
142 | %{_mandir}/man1/zypp-CheckAccessDeleted.1* | |
143 | %{_mandir}/man1/zypp-NameReqPrv.1* | |
144 | %{_mandir}/man5/locks.5* | |
145 | ||
146 | %files devel | |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_libdir}/libzypp.so | |
149 | %{_includedir}/zypp | |
35c85626 | 150 | %{_includedir}/zypp-core |
aa7e58a5 JB |
151 | %{_includedir}/zypp-curl |
152 | %{_includedir}/zypp-media | |
e09b6e53 JB |
153 | %{_pkgconfigdir}/libzypp.pc |
154 | %{_datadir}/cmake/Modules/FindZypp.cmake | |
155 | %{_datadir}/cmake/Modules/ZyppCommon.cmake | |
156 | ||
157 | %if %{with apidocs} | |
158 | %files apidocs | |
159 | %defattr(644,root,root,755) | |
160 | %{_docdir}/libzypp-apidocs | |
161 | %endif |