]>
Commit | Line | Data |
---|---|---|
92afb597 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | # | |
1392c26d JB |
5 | Summary: C++ XML processing library |
6 | Summary(pl.UTF-8): Biblioteka C++ do przetwarzania XML-a | |
7 | Name: pugixml | |
f109191a | 8 | Version: 1.10 |
d51802d6 | 9 | Release: 1 |
1392c26d JB |
10 | License: MIT |
11 | Group: Libraries | |
92afb597 JB |
12 | #Source0Download: http://pugixml.org/ |
13 | Source0: http://github.com/zeux/pugixml/releases/download/v%{version}/%{name}-%{version}.tar.gz | |
f109191a | 14 | # Source0-md5: f97237e9908201c6d8536210747b66af |
151a21f5 | 15 | Patch0: longlong.patch |
1392c26d | 16 | URL: http://pugixml.org/ |
d51802d6 | 17 | BuildRequires: cmake >= 2.8.12 |
1392c26d | 18 | BuildRequires: libstdc++-devel |
1392c26d JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | pugixml is a C++ XML processing library, which consists of a DOM-like | |
23 | interface with rich traversal/modification capabilities, an extremely | |
24 | fast XML parser which constructs the DOM tree from an XML file/buffer, | |
25 | and an XPath 1.0 implementation for complex data-driven tree queries. | |
26 | Full Unicode support is also available, with Unicode interface | |
27 | variants and conversions between different Unicode encodings (which | |
28 | happen automatically during parsing/saving). | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | pugixml to biblioteka C++ do przetwarzania XML-a, składająca się z | |
32 | interfejsu w stylu DOM z dużymi możliwościami przeglądania i | |
33 | modyfikowania, bardzo szybkim analizatorem XML-a tworzącym drzewo DOM | |
34 | z pliku/bufora XML oraz implementacji XPath 1.0 do złożonych zapytań | |
35 | drzewiastych zależnych od danych. Dostępna jest też pełna obsługa | |
36 | Unikodu, z wariantowym interfejsem i przekształcaniem między różnymi | |
37 | kodowaniami Unikodu (co wykonywane jest automatycznie podczas | |
38 | analizy/zapisu). | |
39 | ||
40 | %package devel | |
41 | Summary: Header files for pugixml library | |
42 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki pugixml | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | Requires: libstdc++-devel | |
46 | ||
47 | %description devel | |
48 | Header files for pugixml library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki pugixml. | |
52 | ||
53 | %package static | |
54 | Summary: Static pugixml library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka pugixml | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static pugixml library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka pugixml. | |
64 | ||
65 | %prep | |
46c0eb2c | 66 | %setup -q |
151a21f5 | 67 | %patch0 -p1 |
1392c26d JB |
68 | |
69 | %build | |
92afb597 JB |
70 | install -d build |
71 | cd build | |
72 | %cmake .. \ | |
92afb597 JB |
73 | -DBUILD_SHARED_LIBS=ON |
74 | cd .. | |
75 | ||
76 | %if %{with static_libs} | |
77 | install -d build-static | |
78 | cd build-static | |
79 | %cmake .. \ | |
80 | -DBUILD_SHARED_LIBS=OFF | |
81 | cd .. | |
82 | %endif | |
1392c26d JB |
83 | |
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
1392c26d | 86 | |
92afb597 JB |
87 | %if %{with static_libs} |
88 | %{__make} -C build-static install \ | |
89 | DESTDIR=$RPM_BUILD_ROOT | |
90 | %endif | |
91 | ||
92 | %{__make} -C build install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT | |
1392c26d JB |
94 | |
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %post -p /sbin/ldconfig | |
99 | %postun -p /sbin/ldconfig | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc readme.txt | |
92afb597 JB |
104 | %attr(755,root,root) %{_libdir}/libpugixml.so.*.* |
105 | %attr(755,root,root) %ghost %{_libdir}/libpugixml.so.1 | |
1392c26d JB |
106 | |
107 | %files devel | |
108 | %defattr(644,root,root,755) | |
109 | %doc docs/* | |
110 | %attr(755,root,root) %{_libdir}/libpugixml.so | |
1392c26d JB |
111 | %{_includedir}/pugiconfig.hpp |
112 | %{_includedir}/pugixml.hpp | |
92afb597 JB |
113 | %{_pkgconfigdir}/pugixml.pc |
114 | %{_libdir}/cmake/pugixml | |
1392c26d | 115 | |
92afb597 | 116 | %if %{with static_libs} |
1392c26d JB |
117 | %files static |
118 | %defattr(644,root,root,755) | |
119 | %{_libdir}/libpugixml.a | |
92afb597 | 120 | %endif |