]>
Commit | Line | Data |
---|---|---|
bbc6e9d4 | 1 | %define file_version %(echo %{version} | tr . _) |
2 | Summary: A simple, small, C++ XML parser | |
3 | Summary(pl.UTF-8): Prosty, mały, napisany w C++ parser XML | |
4 | Name: tinyxml | |
5bd76648 | 5 | Version: 2.6.2 |
a588385e | 6 | Release: 5 |
7fbd5a5e | 7 | License: zlib |
bbc6e9d4 | 8 | Group: Libraries |
5bd76648 JB |
9 | Source0: http://downloads.sourceforge.net/tinyxml/%{name}_%{file_version}.tar.gz |
10 | # Source0-md5: c1b864c96804a10526540c664ade67f0 | |
bbc6e9d4 | 11 | Patch0: %{name}-flags.patch |
e719747b | 12 | Patch1: enforce-use-stl.patch |
bbc6e9d4 | 13 | URL: http://www.grinninglizard.com/tinyxml/ |
8ab9ff61 | 14 | BuildRequires: libstdc++-devel |
15 | BuildRequires: libtool | |
bbc6e9d4 | 16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
19 | TinyXML is a simple, small, C++ XML parser that can be easily | |
20 | integrating into other programs. | |
21 | ||
22 | %description -l pl.UTF-8 | |
23 | TinyXML to prosty, mały, napisany w C++ parser XML, który może być w | |
24 | łatwy sposób integrowany z innymi programami. | |
25 | ||
26 | %package devel | |
27 | Summary: Header files for tinyxml library | |
28 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tinyxml | |
29 | Group: Development/Libraries | |
30 | Requires: %{name} = %{version}-%{release} | |
5bd76648 | 31 | Requires: libstdc++-devel |
bbc6e9d4 | 32 | |
33 | %description devel | |
34 | Header files for tinyxml library. | |
35 | ||
36 | %description devel -l pl.UTF-8 | |
37 | Pliki nagłówkowe biblioteki tinyxml. | |
38 | ||
5bd76648 JB |
39 | %package static |
40 | Summary: Static tinyxml library | |
41 | Summary(pl.UTF-8): Statyczna biblioteka tinyxml | |
42 | Group: Development/Libraries | |
43 | Requires: %{name}-devel = %{version}-%{release} | |
44 | ||
45 | %description static | |
46 | Static tinyxml library. | |
47 | ||
48 | %description static -l pl.UTF-8 | |
49 | Statyczna biblioteka tinyxml. | |
50 | ||
bbc6e9d4 | 51 | %prep |
52 | %setup -q -n %{name} | |
53 | %patch0 -p1 | |
e719747b | 54 | %patch1 -p1 |
bbc6e9d4 | 55 | |
56 | %build | |
57 | %{__make} \ | |
58 | CXX="%{__cxx}" \ | |
59 | LD="%{__cxx}" \ | |
cce564d6 | 60 | OPTFLAGS="%{rpmcppflags} %{rpmcxxflags} -DTIXML_USE_STL" \ |
bbc6e9d4 | 61 | LDFLAGS="%{rpmldflags}" |
62 | ||
1f2ac6da | 63 | # Not really designed to be built as lib |
bbc6e9d4 | 64 | for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do |
1f2ac6da | 65 | libtool --tag=CXX --mode=compile \ |
cce564d6 | 66 | %{__cxx} %{rpmcppflags} %{rpmcxxflags} -DTIXML_USE_STL -o $i.lo -c $i |
bbc6e9d4 | 67 | done |
1f2ac6da | 68 | libtool --tag=CXX --mode=link \ |
69 | %{__cxx} %{rpmcxxflags} %{rpmldflags} \ | |
5bd76648 | 70 | -rpath %{_libdir} -version-info 0:0:0 \ |
1f2ac6da | 71 | -o libtinyxml.la *.cpp.lo |
bbc6e9d4 | 72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}} | |
76 | ||
77 | cp -a xmltest $RPM_BUILD_ROOT%{_bindir} | |
b448903e | 78 | cp -a tiny*.h $RPM_BUILD_ROOT%{_includedir} |
1f2ac6da | 79 | libtool --mode=install %{__install} libtinyxml.la $RPM_BUILD_ROOT%{_libdir} |
bbc6e9d4 | 80 | |
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post -p /sbin/ldconfig | |
85 | %postun -p /sbin/ldconfig | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc changes.txt readme.txt | |
90 | %attr(755,root,root) %{_bindir}/xmltest | |
91 | %attr(755,root,root) %{_libdir}/libtinyxml.so.*.*.* | |
f858ab8c | 92 | %attr(755,root,root) %ghost %{_libdir}/libtinyxml.so.0 |
bbc6e9d4 | 93 | |
94 | %files devel | |
95 | %defattr(644,root,root,755) | |
5bd76648 | 96 | %attr(755,root,root) %{_libdir}/libtinyxml.so |
f858ab8c | 97 | %{_libdir}/libtinyxml.la |
5bd76648 JB |
98 | %{_includedir}/tinystr.h |
99 | %{_includedir}/tinyxml.h | |
100 | ||
101 | %files static | |
102 | %defattr(644,root,root,755) | |
103 | %{_libdir}/libtinyxml.a |