Dependency packaging files.
[shibboleth/cpp-xmltooling.git] / dependencies / xerces / xerces-c.spec
1 %define tarversion 2_7_1
2 %define barename xerces-c
3
4 # threads
5 # values: pthreads, none
6 %define threads pthreads
7
8 Summary:        Xerces-C++ validating XML parser
9 Name:           xerces271-c
10 Version:        2.7.1
11 Release:        1
12 URL:            http://shibboleth.internet2.edu/downloads/
13 Source0:        %{barename}-src_%{tarversion}.tar.gz
14 License:        Apache
15 Group:                  Libraries
16 BuildRoot:      %{_tmppath}/%{name}-root
17 Prefix:         /usr
18 Obsoletes:      %{barename} <= %{version}
19
20 %description
21 Xerces-C++ is a validating XML parser written in a portable subset of C++.
22 Xerces-C++ makes it easy to give your application the ability to read and
23 write XML data. A shared library is provided for parsing, generating,
24 manipulating, and validating XML documents.
25
26 The parser provides high performance, modularity, and scalability. Source
27 code, samples and API documentation are provided with the parser. For
28 portability, care has been taken to make minimal use of templates, no RTTI,
29 and minimal use of #ifdefs.
30
31 %package        samples
32 Summary:        Sample applications using Xerces-C++
33 Group:          Applications/Text
34 Requires:       %{name} = %{version}-%{release}
35 Obsoletes:      %{barename}-samples <= %{version}
36
37 %description    samples
38 Sample applications using Xerces-C++.
39
40 %package devel
41 Requires:       %{name} = %{version}-%{release}
42 Obsoletes:      %{barename}-devel <= %{version}
43 Group:          Development/Libraries
44 Summary:        Header files for Xerces-C++ validating XML parser
45
46 %description devel
47 Header files you can use to develop XML applications with Xerces-C++.
48
49 Xerces-C++ is a validating XML parser written in a portable subset of C++.
50 Xerces-C++ makes it easy to give your application the ability to read and
51 write XML data. A shared library is provided for parsing, generating,
52 manipulating, and validating XML documents.
53
54 %package doc
55 Obsoletes:      %{barename}-doc <= %{version}
56 Group:          Documentation
57 Summary:        Documentation for Xerces-C++ validating XML parser
58
59 %description doc
60 Documentation for Xerces-C++.
61
62 Xerces-C++ is a validating XML parser written in a portable subset of C++.
63 Xerces-C++ makes it easy to give your application the ability to read and
64 write XML data. A shared library is provided for parsing, generating,
65 manipulating, and validating XML documents.
66
67 %prep
68 %setup -q -n %{barename}-src_%{tarversion}
69
70 %build
71 export CC=%{__cc}
72 export CXX=%{__cxx}
73
74 %ifarch alpha ppc64 s390x sparc64 x86_64 ia64
75   %define rcopts -b 64 -p %{_target_os}
76 %else
77   %define rcopts -b 32 -p %{_target_os}
78 %endif
79
80 export XERCESCROOT=`pwd`
81 cd $XERCESCROOT/src/xercesc
82 ./runConfigure %{rcopts} -C --libdir="%{_libdir}" -minmem -nsocket -tnative -r%{threads} -P%{prefix}
83 make
84 cd $XERCESCROOT/samples
85 ./runConfigure %{rcopts}
86 make
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 make -C src/xercesc install XERCESCROOT=`pwd` DESTDIR=$RPM_BUILD_ROOT
91 if [ ! -e $RPM_BUILD_ROOT%{_prefix}/%{_lib} ]; then
92         mv $RPM_BUILD_ROOT%{_prefix}/lib $RPM_BUILD_ROOT%{_prefix}/%{_lib} 
93 fi
94 # Samples
95 mv bin/obj __obj
96 install -dm 755 $RPM_BUILD_ROOT%{_bindir}
97 install -pm 755 bin/* $RPM_BUILD_ROOT%{_bindir}
98 mv __obj bin/obj
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post -p /sbin/ldconfig
104
105 %postun -p /sbin/ldconfig
106
107 %files
108 %defattr(-,root,root,-)
109 %doc LICENSE* NOTICE STATUS credits.txt
110 %{_libdir}/libxerces-*.so.*
111
112 %files samples
113 %defattr(-,root,root,-)
114 %{_bindir}/*
115
116 %files devel
117 %defattr(-,root,root,-)
118 %{_includedir}/xercesc
119 %{_libdir}/libxerces-*.so
120
121 %files doc
122 %defattr(644,root,root,755)
123 %doc doc/html/*
124
125 %changelog
126 * Wed Jun  6 2007 Scott Cantor <cantor.2@osu.edu>
127 - reapply improvements from our spec file for 2.6.0
128
129 * Fri Jun  6 2003 Tuan Hoang <tqhoang@bigfoot.com>
130 - updated for new Xerces-C filename and directory format
131 - fixed date format in changelog section
132
133 * Fri Mar 14 2003 Tinny Ng <tng@ca.ibm.com>
134 - changed to 2.3
135
136 * Wed Dec 18 2002 Albert Strasheim <albert@stonethree.com>
137 - added symlink to libxerces-c.so in lib directory
138
139 * Fri Dec 13 2002 Albert Strasheim <albert@stonethree.com>
140 - added seperate doc package
141 - major cleanups
142
143 * Tue Sep 03 2002  <thomas@linux.de>
144 - fixed missing DESTDIR in Makefile.util.submodule
145
146 * Mon Sep 02 2002  <thomas@linux.de>
147 - Initial build.