3 %bcond_without static_libs # static library
5 Summary: C++ XML processing library
6 Summary(pl.UTF-8): Biblioteka C++ do przetwarzania XML-a
12 #Source0Download: https://github.com/zeux/pugixml/releases
13 Source0: https://github.com/zeux/pugixml/releases/download/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 3e4c588e03bdca140844f3c47c1a995e
15 Patch0: longlong.patch
16 URL: https://pugixml.org/
17 BuildRequires: cmake >= 3.4
18 BuildRequires: libstdc++-devel
19 BuildRequires: rpm-build >= 4.6
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 pugixml is a C++ XML processing library, which consists of a DOM-like
24 interface with rich traversal/modification capabilities, an extremely
25 fast XML parser which constructs the DOM tree from an XML file/buffer,
26 and an XPath 1.0 implementation for complex data-driven tree queries.
27 Full Unicode support is also available, with Unicode interface
28 variants and conversions between different Unicode encodings (which
29 happen automatically during parsing/saving).
31 %description -l pl.UTF-8
32 pugixml to biblioteka C++ do przetwarzania XML-a, składająca się z
33 interfejsu w stylu DOM z dużymi możliwościami przeglądania i
34 modyfikowania, bardzo szybkim analizatorem XML-a tworzącym drzewo DOM
35 z pliku/bufora XML oraz implementacji XPath 1.0 do złożonych zapytań
36 drzewiastych zależnych od danych. Dostępna jest też pełna obsługa
37 Unikodu, z wariantowym interfejsem i przekształcaniem między różnymi
38 kodowaniami Unikodu (co wykonywane jest automatycznie podczas
42 Summary: Header files for pugixml library
43 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki pugixml
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: libstdc++-devel
49 Header files for pugixml library.
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki pugixml.
55 Summary: Static pugixml library
56 Summary(pl.UTF-8): Statyczna biblioteka pugixml
57 Group: Development/Libraries
58 Requires: %{name}-devel = %{version}-%{release}
61 Static pugixml library.
63 %description static -l pl.UTF-8
64 Statyczna biblioteka pugixml.
67 Summary: API documentation for pugixml library
68 Summary(pl.UTF-8): Dokumentacja API biblioteki pugixml
73 API documentation for pugixml library.
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API biblioteki pugixml.
86 -DBUILD_SHARED_LIBS=ON
89 %if %{with static_libs}
90 install -d build-static
93 -DBUILD_SHARED_LIBS=OFF
98 rm -rf $RPM_BUILD_ROOT
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102 DESTDIR=$RPM_BUILD_ROOT
104 # force packaging cmake configs for shared target
105 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake/pugixml
108 %{__make} -C build install \
109 DESTDIR=$RPM_BUILD_ROOT
112 rm -rf $RPM_BUILD_ROOT
114 %post -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
118 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libpugixml.so.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libpugixml.so.1
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libpugixml.so
126 %{_includedir}/pugiconfig.hpp
127 %{_includedir}/pugixml.hpp
128 %{_pkgconfigdir}/pugixml.pc
129 %{_libdir}/cmake/pugixml
131 %if %{with static_libs}
133 %defattr(644,root,root,755)
134 %{_libdir}/libpugixml.a
138 %defattr(644,root,root,755)