3238aca
Name:           xsd
ae575a9
Version:        3.3.0
d9bd0cd
Release:        12%{?dist}
3238aca
Summary:        W3C XML schema to C++ data binding compiler
3238aca
3238aca
Group:          Development/Tools
3238aca
# Exceptions permit otherwise GPLv2 incompatible combination with ASL 2.0
3238aca
License:        GPLv2 with exceptions and ASL 2.0  
3238aca
URL:            http://www.codesynthesis.com/products/xsd/
d9bd0cd
Source0:        http://www.codesynthesis.com/download/xsd/3.3/xsd-%{version}-1+dep.tar.bz2
ae575a9
# Sent suggestion to upstream via e-mail 20090707
ae575a9
Patch0:         xsd-3.3.0-xsdcxx-rename.patch
3238aca
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3238aca
3238aca
BuildRequires:  m4 boost-devel xerces-c-devel
3238aca
# Requires:  ace-devel - only needed for applications using
3238aca
#                        Adaptive Communication Environment (ACE) streams,
3238aca
#                        enable when Fedora gets ACE packages.
3238aca
#                        See http://www.cs.wustl.edu/~schmidt/ACE.html and
3238aca
#                        https://bugzilla.redhat.com/show_bug.cgi?id=450164
3238aca
Requires:       xerces-c-devel
3238aca
3238aca
%description
3238aca
CodeSynthesis XSD is an open-source, cross-platform W3C XML Schema to
3238aca
C++ data binding compiler. Provided with an XML instance specification
3238aca
(XML Schema), it generates C++ classes that represent the given
3238aca
vocabulary as well as parsing and serialization code.
3238aca
You can then access the data stored in XML using types and functions
3238aca
that semantically correspond to your application domain rather than
3238aca
dealing with intricacies of reading and writing XML.
3238aca
3238aca
3238aca
%package        doc
3238aca
Group:          Documentation
3238aca
Summary:        API documentation files for %{name}
3238aca
3238aca
%description    doc
3238aca
This package contains API documentation for %{name}.
3238aca
3238aca
3238aca
%prep
d9bd0cd
%setup -q -n xsd-%{version}-1+dep
ae575a9
pushd xsd
3238aca
%patch0 -p1 -b .xsdcxx-rename
3238aca
popd
3238aca
3238aca
3238aca
%build
ae575a9
ae575a9
# Default GCC on EL-5 will fail on this code with internal
ae575a9
# compiler error when debugging symbol generation is requested with -g
ae575a9
# Reducing debug level to 1 will "fix" this problem. A better way would
ae575a9
# be to use gcc-44, but old versions of boost headers do not compile 
ae575a9
# with it (https://svn.boost.org/trac/boost/ticket/2069).
ae575a9
# Also boost-1.33.1 on those systems does not have boost_system library
ae575a9
# thus we need to disable explicit linking against it.
ae575a9
ae575a9
%if 0%{?el5}
ae575a9
make verbose=1 CXXFLAGS="$RPM_OPT_FLAGS -g1" BOOST_LINK_SYSTEM=n
ae575a9
%else
aded2b5
make verbose=1 CXXFLAGS="$RPM_OPT_FLAGS -DBOOST_FILESYSTEM_VERSION=2"
ae575a9
%endif
3238aca
3238aca
3238aca
%install
3238aca
rm -rf $RPM_BUILD_ROOT
6ed4f90
rm -rf apidocdir
6ed4f90
ae575a9
%if 0%{?el5}
ae575a9
make install_prefix="$RPM_BUILD_ROOT%{_prefix}" BOOST_LINK_SYSTEM=n install
ae575a9
%else
ae575a9
make install_prefix="$RPM_BUILD_ROOT%{_prefix}" install
ae575a9
%endif
3238aca
3238aca
# Split API documentation to -doc subpackage.
3238aca
mkdir apidocdir
3238aca
mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/*.{xhtml,css} apidocdir/
3238aca
mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/cxx/ apidocdir/
3238aca
mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/ docdir/
3238aca
3238aca
# Convert to utf-8.
3238aca
for file in docdir/NEWS; do
3238aca
    mv $file timestamp
3238aca
    iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
3238aca
    touch -r timestamp $file
3238aca
done
3238aca
3238aca
# Rename binary to xsdcxx to avoid conflicting with mono-web package.
ae575a9
# Sent suggestion to upstream via e-mail 20090707
ae575a9
# they will consider renaming in 4.0.0
3238aca
mv $RPM_BUILD_ROOT%{_bindir}/xsd $RPM_BUILD_ROOT%{_bindir}/xsdcxx
3238aca
mv $RPM_BUILD_ROOT%{_mandir}/man1/xsd.1 $RPM_BUILD_ROOT%{_mandir}/man1/xsdcxx.1
3238aca
3238aca
# Remove duplicate docs.
3238aca
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxsd
3238aca
3238aca
# Remove Microsoft Visual C++ compiler helper files.
3238aca
rm -rf $RPM_BUILD_ROOT%{_includedir}/xsd/cxx/compilers
3238aca
6ed4f90
# Remove redundant PostScript files that rpmlint grunts about not being UTF8
6ed4f90
# See: https://bugzilla.redhat.com/show_bug.cgi?id=502024#c27
6ed4f90
# for Boris Kolpackov's explanation about those
6ed4f90
find apidocdir -name "*.ps" | xargs rm -f
6ed4f90
# Remove other unwanted crap
6ed4f90
find apidocdir -name "*.doxygen" \
6ed4f90
            -o -name "makefile" \
6ed4f90
            -o -name "*.html2ps" | xargs rm -f
3238aca
3238aca
%clean
3238aca
rm -rf $RPM_BUILD_ROOT
3238aca
3238aca
3238aca
%files
3238aca
%defattr(-,root,root,-)
3238aca
%doc docdir/*
3238aca
%{_bindir}/xsdcxx
3238aca
%{_includedir}/xsd/
3238aca
%{_mandir}/man1/xsdcxx.1*
3238aca
3238aca
%files doc
3238aca
%defattr(-,root,root,-)
3238aca
%doc apidocdir/*
3238aca
3238aca
3238aca
%changelog
d9bd0cd
* Wed Apr 18 2012 Kalev Lember <kalevlember@gmail.com> - 3.3.0-12
d9bd0cd
- Update to xsd-3.3.0-1+dep upstream tarball, which includes the gcc 4.7 patch
d9bd0cd
c8cdc7a
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-11
c8cdc7a
- Rebuilt for c++ ABI breakage
c8cdc7a
a430663
* Thu Jan 19 2012 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.3.0-10
a430663
- Add xsd-3.3.0-gcc47.patch (Fix mass rebuild FTBFS).
a430663
97f29f9
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-9
97f29f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
97f29f9
Thomas Spura 4a9895f
* Sat Nov 26 2011 Thomas Spura <tomspur@fedoraproject.org> - 3.3.0-8
Thomas Spura 4a9895f
- rebuild for https://fedoraproject.org/wiki/Features/F17Boost148
Thomas Spura 4a9895f
27c9672
* Fri Jul 22 2011 Antti Andreimann <Antti.Andreimann@mail.ee> - 3.3.0-7
27c9672
- Rebuilt for boost 1.47.0
27c9672
Kalev Lember 7d52fd1
* Wed Apr 06 2011 Kalev Lember <kalev@smartlink.ee> - 3.3.0-6
Kalev Lember 7d52fd1
- Rebuilt for boost 1.46.1 soname bump
Kalev Lember 7d52fd1
Kalev Lember f9e2432
* Thu Mar 10 2011 Kalev Lember <kalev@smartlink.ee> - 3.3.0-5
Kalev Lember f9e2432
- Rebuilt with xerces-c 3.1
Kalev Lember f9e2432
e694fc6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-4
e694fc6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e694fc6
dc46efc
* Sun Feb 06 2011 Thomas Spura <tomspur@fedoraproject.org> - 3.3.0-3
aded2b5
- rebuild for new boost (thanks Petr Machata for the fix)
dc46efc
Antti Andreimann 1f97436
* Mon Aug 02 2010 Antti Andreimann <Antti.Andreimann@mail.ee> 3.3.0-2
Antti Andreimann 1f97436
- Rebuild for new boost
Antti Andreimann 1f97436
ae575a9
* Sun Jun 20 2010 Antti Andreimann <Antti.Andreimann@mail.ee> 3.3.0-1
ae575a9
- Updated to version 3.3.0
ae575a9
- Implemented a workaround for gcc segfault on el5
ae575a9
Caolan McNamara b5a83f4
* Sun Feb 07 2010 Caolán McNamara <caolanm@redhat.com> - 3.2.0-7
Caolan McNamara b5a83f4
- Rebuild for xerces soname bump
Caolan McNamara b5a83f4
c2c59ef
* Fri Jan 22 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 3.2.0-6
c2c59ef
- Rebuild for Boost soname bump
c2c59ef
2668911
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-5
2668911
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2668911
6ed4f90
* Tue Jul 07 2009 Antti Andreimann <Antti.Andreimann@mail.ee> 3.2.0-4
6ed4f90
- Removed redundant PostScript files from the doc package
6ed4f90
3238aca
* Mon Jul 06 2009 Antti Andreimann <Antti.Andreimann@mail.ee> 3.2.0-3
3238aca
- Added ACE homepage to SPEC file comments
3238aca
- Added verbose=1 to MAKEFLAGS so compiler flags could be
3238aca
  verified from build logs.
3238aca
3238aca
* Mon Jul 04 2009 Antti Andreimann <Antti.Andreimann@mail.ee> 3.2.0-2
3238aca
- Changed License tag to clarify which exceptions we are talking about
3238aca
3238aca
* Wed May 20 2009 Antti Andreimann <Antti.Andreimann@mail.ee> 3.2.0-1
3238aca
- Initial RPM release.