]> git.pld-linux.org Git - packages/tinyxml.git/blob - tinyxml.spec
- rel 8; add pc file
[packages/tinyxml.git] / tinyxml.spec
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
5 Version:        2.6.2
6 Release:        8
7 License:        zlib
8 Group:          Libraries
9 Source0:        http://downloads.sourceforge.net/tinyxml/%{name}_%{file_version}.tar.gz
10 # Source0-md5:  c1b864c96804a10526540c664ade67f0
11 Source1:        %{name}.pc.in
12 Patch0:         %{name}-flags.patch
13 Patch1:         enforce-use-stl.patch
14 URL:            http://www.grinninglizard.com/tinyxml/
15 BuildRequires:  libstdc++-devel
16 BuildRequires:  libtool
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}
32 Requires:       libstdc++-devel
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
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
52 %prep
53 %setup -q -n %{name}
54 %patch0 -p1
55 %patch1 -p1
56
57 %build
58 %{__make} \
59         CXX="%{__cxx}" \
60         LD="%{__cxx}" \
61         OPTFLAGS="%{rpmcppflags} %{rpmcxxflags} -DTIXML_USE_STL" \
62         LDFLAGS="%{rpmldflags}"
63
64 # Not really designed to be built as lib
65 for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do
66         libtool --tag=CXX --mode=compile \
67                 %{__cxx} %{rpmcppflags} %{rpmcxxflags} -DTIXML_USE_STL -o $i.lo -c $i
68 done
69 libtool --tag=CXX --mode=link \
70         %{__cxx} %{rpmcxxflags} %{rpmldflags} \
71         -rpath %{_libdir} -version-info 0:0:0 \
72         -o libtinyxml.la *.cpp.lo
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}
79 cp -a tiny*.h $RPM_BUILD_ROOT%{_includedir}
80 libtool --mode=install %{__install} libtinyxml.la $RPM_BUILD_ROOT%{_libdir}
81
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
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.*.*.*
101 %attr(755,root,root) %ghost %{_libdir}/libtinyxml.so.0
102
103 %files devel
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/libtinyxml.so
106 %{_libdir}/libtinyxml.la
107 %{_includedir}/tinystr.h
108 %{_includedir}/tinyxml.h
109 %{_pkgconfigdir}/tinyxml.pc
110
111 %files static
112 %defattr(644,root,root,755)
113 %{_libdir}/libtinyxml.a
This page took 0.775958 seconds and 3 git commands to generate.