]> git.pld-linux.org Git - packages/pugixml.git/blob - pugixml.spec
- updated to 1.13, separated -apidocs
[packages/pugixml.git] / pugixml.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 #
5 Summary:        C++ XML processing library
6 Summary(pl.UTF-8):      Biblioteka C++ do przetwarzania XML-a
7 Name:           pugixml
8 Version:        1.13
9 Release:        1
10 License:        MIT
11 Group:          Libraries
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)
21
22 %description
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).
30
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
39 analizy/zapisu).
40
41 %package devel
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
47
48 %description devel
49 Header files for pugixml library.
50
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki pugixml.
53
54 %package static
55 Summary:        Static pugixml library
56 Summary(pl.UTF-8):      Statyczna biblioteka pugixml
57 Group:          Development/Libraries
58 Requires:       %{name}-devel = %{version}-%{release}
59
60 %description static
61 Static pugixml library.
62
63 %description static -l pl.UTF-8
64 Statyczna biblioteka pugixml.
65
66 %package apidocs
67 Summary:        API documentation for pugixml library
68 Summary(pl.UTF-8):      Dokumentacja API biblioteki pugixml
69 Group:          Documentation
70 BuildArch:      noarch
71
72 %description apidocs
73 API documentation for pugixml library.
74
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API biblioteki pugixml.
77
78 %prep
79 %setup -q
80 %patch0 -p1
81
82 %build
83 install -d build
84 cd build
85 %cmake .. \
86         -DBUILD_SHARED_LIBS=ON
87 cd ..
88
89 %if %{with static_libs}
90 install -d build-static
91 cd build-static
92 %cmake .. \
93         -DBUILD_SHARED_LIBS=OFF
94 cd ..
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 # force packaging cmake configs for shared target
105 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake/pugixml
106 %endif
107
108 %{__make} -C build install \
109         DESTDIR=$RPM_BUILD_ROOT
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %post   -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
116
117 %files
118 %defattr(644,root,root,755)
119 %doc readme.txt
120 %attr(755,root,root) %{_libdir}/libpugixml.so.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libpugixml.so.1
122
123 %files devel
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
130
131 %if %{with static_libs}
132 %files static
133 %defattr(644,root,root,755)
134 %{_libdir}/libpugixml.a
135 %endif
136
137 %files apidocs
138 %defattr(644,root,root,755)
139 %doc docs/*
This page took 0.138568 seconds and 4 git commands to generate.