From 90def860c7d686175365abd0c95a1ec9e74fd383 Mon Sep 17 00:00:00 2001 From: sagitter Date: Oct 12 2015 19:36:24 +0000 Subject: libcutl libraries unbundled;Header files packaged apart --- diff --git a/xsd.spec b/xsd.spec index 441b269..ef0f73f 100644 --- a/xsd.spec +++ b/xsd.spec @@ -1,24 +1,26 @@ Name: xsd Version: 4.0.0 -Release: 6%{?dist} +Release: 8%{?dist} Summary: W3C XML schema to C++ data binding compiler -Group: Development/Tools # Exceptions permit otherwise GPLv2 incompatible combination with ASL 2.0 License: GPLv2 with exceptions and ASL 2.0 URL: http://www.codesynthesis.com/products/xsd/ - Source0: http://www.codesynthesis.com/download/xsd/4.0/xsd-%{version}+dep.tar.bz2 + # Sent suggestion to upstream via e-mail 20090707 # http://anonscm.debian.org/cgit/collab-maint/xsd.git/tree/debian/patches/0001-xsd_xsdcxx-rename.patch Patch0: xsd-3.3.0-xsdcxx-rename.patch -BuildRequires: m4 boost-devel xerces-c-devel -# Requires: ace-devel - only needed for applications using -# Adaptive Communication Environment (ACE) streams, -# enable when Fedora gets ACE packages. -# See http://www.cs.wustl.edu/~schmidt/ACE.html and -# https://bugzilla.redhat.com/show_bug.cgi?id=450164 -Requires: xerces-c-devel +BuildRequires: m4, xerces-c-devel, libcutl-devel +%if 0%{?rhel} +BuildRequires: boost148-devel +%else +BuildRequires: boost-devel +%endif + +%if 0%{?rhel} +Requires: boost148 +%endif %description CodeSynthesis XSD is an open-source, cross-platform W3C XML Schema to @@ -29,49 +31,42 @@ You can then access the data stored in XML using types and functions that semantically correspond to your application domain rather than dealing with intricacies of reading and writing XML. - -%package doc -Group: Documentation -Summary: API documentation files for %{name} +%package doc +BuildArch: noarch +Summary: API documentation files for %{name} %description doc This package contains API documentation for %{name}. +%package devel +BuildArch: noarch +Requires: xerces-c-devel +Summary: Development files of %{name} + +%description devel +This package contains header and development files of %{name}. %prep %setup -q -n xsd-%{version}+dep %patch0 -p1 -b .xsdcxx-rename -cp /usr/lib/rpm/config.* build-0.3/system +##Unbundle libcutl +rm -rf libcutl %build - -# Default GCC on EL-5 will fail on this code with internal -# compiler error when debugging symbol generation is requested with -g -# Reducing debug level to 1 will "fix" this problem. A better way would -# be to use gcc-44, but old versions of boost headers do not compile -# with it (https://svn.boost.org/trac/boost/ticket/2069). -# Also boost-1.33.1 on those systems does not have boost_system library -# thus we need to disable explicit linking against it. - -%if 0%{?el5} -make verbose=1 CXXFLAGS="$RPM_OPT_FLAGS -g1" BOOST_LINK_SYSTEM=n -%else -make verbose=1 CXXFLAGS="$RPM_OPT_FLAGS" +%if 0%{?rhel} +%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} %endif - +make verbose=1 CXX=g++ CC=gcc CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{__global_ldflags}" BOOST_LINK_SYSTEM=y EXTERNAL_LIBCUTL=y %install rm -rf apidocdir -%if 0%{?el5} -make install_prefix="$RPM_BUILD_ROOT%{_prefix}" BOOST_LINK_SYSTEM=n install -%else -make install_prefix="$RPM_BUILD_ROOT%{_prefix}" install -%endif +make install DESTDIR=$RPM_BUILD_ROOT LDFLAGS="%{__global_ldflags}" install_prefix=$RPM_BUILD_ROOT%{_prefix} \ + install_bin_dir=$RPM_BUILD_ROOT%{_bindir} install_man_dir=$RPM_BUILD_ROOT%{_mandir} EXTERNAL_LIBCUTL=y BOOST_LINK_SYSTEM=y # Split API documentation to -doc subpackage. -mkdir apidocdir +mkdir -p apidocdir mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/*.{xhtml,css} apidocdir/ mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/cxx/ apidocdir/ mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/ docdir/ @@ -104,18 +99,43 @@ find apidocdir -name "*.doxygen" \ -o -name "makefile" \ -o -name "*.html2ps" | xargs rm -f +##Test failed on EPEL6 due to "bad" xerces-c +##http://codesynthesis.com/pipermail/xsd-users/2015-October/004696.html +%if 0%{?fedora} || 0%{?rhel} >= 7 +%check +make -j 1 test EXTERNAL_LIBCUTL=y BOOST_LINK_SYSTEM=y +%endif %files -%doc docdir/* +%{!?_licensedir:%global license %doc} +%doc docdir/README docdir/NEWS docdir/FLOSSE +%license docdir/GPLv2 docdir/LICENSE %{_bindir}/xsdcxx -%{_includedir}/xsd/ %{_mandir}/man1/xsdcxx.1* %files doc +%{!?_licensedir:%global license %doc} +%doc docdir/README docdir/NEWS docdir/FLOSSE +%license docdir/GPLv2 docdir/LICENSE %doc apidocdir/* +%files devel +%{!?_licensedir:%global license %doc} +%doc docdir/README docdir/NEWS docdir/FLOSSE +%license docdir/GPLv2 docdir/LICENSE +%{_includedir}/xsd/ %changelog +* Mon Oct 12 2015 Antonio Trande - 4.0.0-8 +- Requires explicitely Boost148 in EPEL +- Tests not performed in EPEL6 + +* Thu Oct 08 2015 Antonio Trande - 4.0.0-7 +- Used %%license tag +- libcutl libraries unbundled +- Header files packaged apart +- Made tests + * Thu Aug 27 2015 Jonathan Wakely - 4.0.0-6 - Rebuilt for Boost 1.59 @@ -221,7 +241,7 @@ find apidocdir -name "*.doxygen" \ - Added verbose=1 to MAKEFLAGS so compiler flags could be verified from build logs. -* Mon Jul 04 2009 Antti Andreimann 3.2.0-2 +* Sat Jul 04 2009 Antti Andreimann 3.2.0-2 - Changed License tag to clarify which exceptions we are talking about * Wed May 20 2009 Antti Andreimann 3.2.0-1