]> git.pld-linux.org Git - packages/xsd.git/blob - xsd.spec
- rebuild with boost 1.56.0
[packages/xsd.git] / xsd.spec
1 Summary:        W3C XML schema to C++ data binding compiler
2 Summary(pl.UTF-8):      Kompilator schematów W3C XML do wiązań danych C++
3 Name:           xsd
4 Version:        3.3.0
5 Release:        10
6 Group:          Development/Tools
7 # Exceptions permit otherwise GPLv2 incompatible combination with ASL-licensed Xerces
8 License:        GPL v2 with FLOSS exceptions
9 Source0:        http://www.codesynthesis.com/download/xsd/3.3/%{name}-%{version}+dep.tar.bz2
10 # Source0-md5:  1bad45103f9111964b78d6f2327fbb15
11 # Sent suggestion to upstream via e-mail 20090707
12 Patch0:         %{name}-3.3.0-xsdcxx-rename.patch
13 Patch1:         gcc47.patch
14 Patch2:         boost-1.50.patch
15 URL:            http://www.codesynthesis.com/products/xsd/
16 BuildRequires:  boost-devel
17 BuildRequires:  iconv
18 BuildRequires:  m4
19 BuildRequires:  xerces-c-devel
20 Requires:       xerces-c-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         specflags       -fpermissive
24
25 %description
26 CodeSynthesis XSD is an open-source, cross-platform W3C XML Schema to
27 C++ data binding compiler. Provided with an XML instance specification
28 (XML Schema), it generates C++ classes that represent the given
29 vocabulary as well as parsing and serialization code. You can then
30 access the data stored in XML using types and functions that
31 semantically correspond to your application domain rather than dealing
32 with intricacies of reading and writing XML.
33
34 %description -l pl.UTF-8
35 CodeSynthesis XSD to mający otwarte źródła wieloplatformowy kompilator
36 schematów W3C XML do wiązań danych C++. Na podstawie specyfikacji
37 instancji XML (schematu XML) generuje klasy C++ reprezentujące podany
38 słownik, a także kod analizujący i serializujący. Następnie można
39 odwoływać się do danych zapisanych w XML-u przy użyciu typów i funkcji
40 semantycznie odpowiadających działaniu aplikacji, bez zajmowania się
41 skomplikowaniem odczytu i zapisu XML-a.
42
43 %package apidocs
44 Summary:        API documentation files for XSD
45 Summary(pl.UTF-8):      Dokumentacja API XSD
46 Group:          Documentation
47 %if "%{_rpmversion}" >= "5"
48 BuildArch:      noarch
49 %endif
50
51 %description apidocs
52 This package contains API documentation for XSD.
53
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API XSD.
56
57 %prep
58 %setup -q -n %{name}-%{version}+dep
59 cd xsd
60 %patch0 -p1
61 cd ..
62 %patch1 -p1
63 %patch2 -p1
64
65 %build
66 %{__make} \
67         verbose=1 \
68         CXXFLAGS="%{rpmcxxflags}"
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 %{__make} install \
73         install_prefix="$RPM_BUILD_ROOT%{_prefix}"
74
75 # Split API documentation to -doc subpackage.
76 rm -rf apidocdir
77 install -d apidocdir
78 mv $RPM_BUILD_ROOT%{_docdir}/xsd/*.{xhtml,css} apidocdir/
79 mv $RPM_BUILD_ROOT%{_docdir}/xsd/cxx/ apidocdir/
80 mv $RPM_BUILD_ROOT%{_docdir}/xsd/ docdir/
81
82 # Convert to utf-8.
83 for file in docdir/NEWS; do
84         mv $file timestamp
85         iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
86         touch -r timestamp $file
87 done
88
89 # Rename binary to xsdcxx to avoid conflicting with mono-web package.
90 # Sent suggestion to upstream via e-mail 20090707
91 # they will consider renaming in 4.0.0
92 mv $RPM_BUILD_ROOT%{_bindir}/xsd $RPM_BUILD_ROOT%{_bindir}/xsdcxx
93 mv $RPM_BUILD_ROOT%{_mandir}/man1/xsd.1 $RPM_BUILD_ROOT%{_mandir}/man1/xsdcxx.1
94
95 # Remove duplicate docs.
96 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libxsd
97
98 # Remove Microsoft Visual C++ compiler helper files.
99 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xsd/cxx/compilers
100
101 # Remove redundant PostScript files that rpmlint grunts about not being UTF8
102 # See: https://bugzilla.redhat.com/show_bug.cgi?id=502024#c27
103 # for Boris Kolpackov's explanation about those
104 find apidocdir -name "*.ps" | xargs rm -f
105 # Remove other unwanted crap
106 find apidocdir -name "*.doxygen" \
107             -o -name "makefile" \
108             -o -name "*.html2ps" | xargs rm -f
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %files
114 %defattr(644,root,root,755)
115 %doc docdir/*
116 %attr(755,root,root) %{_bindir}/xsdcxx
117 %{_includedir}/xsd
118 %{_mandir}/man1/xsdcxx.1*
119
120 %files apidocs
121 %defattr(644,root,root,755)
122 %doc apidocdir/*
This page took 0.059668 seconds and 3 git commands to generate.