]>
Commit | Line | Data |
---|---|---|
d0238168 | 1 | Summary: W3C XML schema to C++ data binding compiler |
9cd009e0 | 2 | Summary(pl.UTF-8): Kompilator schematów W3C XML do wiązań danych C++ |
d0238168 ER |
3 | Name: xsd |
4 | Version: 3.3.0 | |
2d2e2e00 | 5 | Release: 10 |
d0238168 | 6 | Group: Development/Tools |
9cd009e0 JB |
7 | # Exceptions permit otherwise GPLv2 incompatible combination with ASL-licensed Xerces |
8 | License: GPL v2 with FLOSS exceptions | |
d0238168 ER |
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 | |
f1f97226 JR |
13 | Patch1: gcc47.patch |
14 | Patch2: boost-1.50.patch | |
9cd009e0 | 15 | URL: http://www.codesynthesis.com/products/xsd/ |
d0238168 | 16 | BuildRequires: boost-devel |
3aff4700 | 17 | BuildRequires: iconv |
d0238168 ER |
18 | BuildRequires: m4 |
19 | BuildRequires: xerces-c-devel | |
20 | Requires: xerces-c-devel | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
f1f97226 JR |
23 | %define specflags -fpermissive |
24 | ||
d0238168 ER |
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 | ||
9cd009e0 JB |
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 | ||
d0238168 | 43 | %package apidocs |
9cd009e0 JB |
44 | Summary: API documentation files for XSD |
45 | Summary(pl.UTF-8): Dokumentacja API XSD | |
d0238168 | 46 | Group: Documentation |
fce0eb0b ER |
47 | %if "%{_rpmversion}" >= "5" |
48 | BuildArch: noarch | |
49 | %endif | |
d0238168 ER |
50 | |
51 | %description apidocs | |
9cd009e0 JB |
52 | This package contains API documentation for XSD. |
53 | ||
54 | %description apidocs -l pl.UTF-8 | |
55 | Dokumentacja API XSD. | |
d0238168 ER |
56 | |
57 | %prep | |
58 | %setup -q -n %{name}-%{version}+dep | |
59 | cd xsd | |
60 | %patch0 -p1 | |
61 | cd .. | |
f1f97226 JR |
62 | %patch1 -p1 |
63 | %patch2 -p1 | |
d0238168 ER |
64 | |
65 | %build | |
66 | %{__make} \ | |
67 | verbose=1 \ | |
f1f97226 | 68 | CXXFLAGS="%{rpmcxxflags}" |
d0238168 ER |
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 | |
fce0eb0b ER |
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/ | |
d0238168 ER |
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. | |
fce0eb0b | 96 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libxsd |
d0238168 ER |
97 | |
98 | # Remove Microsoft Visual C++ compiler helper files. | |
9cd009e0 | 99 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xsd/cxx/compilers |
d0238168 ER |
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/* |