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