]> git.pld-linux.org Git - packages/xsd.git/blob - xsd.spec
29693b2316a820fa73291b01f355b99176c2eb0e
[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:        6
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
48 %description apidocs
49 This package contains API documentation for XSD.
50
51 %description apidocs -l pl.UTF-8
52 Dokumentacja API XSD.
53
54 %prep
55 %setup -q -n %{name}-%{version}+dep
56 cd xsd
57 %patch0 -p1
58 cd ..
59 %patch1 -p1
60 %patch2 -p1
61
62 %build
63 %{__make} \
64         verbose=1 \
65         CXXFLAGS="%{rpmcxxflags}"
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 %{__make} install \
70         install_prefix="$RPM_BUILD_ROOT%{_prefix}"
71
72 # Split API documentation to -doc subpackage.
73 rm -rf apidocdir
74 install -d apidocdir
75 mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/*.{xhtml,css} apidocdir/
76 mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/cxx/ apidocdir/
77 mv $RPM_BUILD_ROOT%{_datadir}/doc/xsd/ docdir/
78
79 # Convert to utf-8.
80 for file in docdir/NEWS; do
81         mv $file timestamp
82         iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
83         touch -r timestamp $file
84 done
85
86 # Rename binary to xsdcxx to avoid conflicting with mono-web package.
87 # Sent suggestion to upstream via e-mail 20090707
88 # they will consider renaming in 4.0.0
89 mv $RPM_BUILD_ROOT%{_bindir}/xsd $RPM_BUILD_ROOT%{_bindir}/xsdcxx
90 mv $RPM_BUILD_ROOT%{_mandir}/man1/xsd.1 $RPM_BUILD_ROOT%{_mandir}/man1/xsdcxx.1
91
92 # Remove duplicate docs.
93 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/libxsd
94
95 # Remove Microsoft Visual C++ compiler helper files.
96 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xsd/cxx/compilers
97
98 # Remove redundant PostScript files that rpmlint grunts about not being UTF8
99 # See: https://bugzilla.redhat.com/show_bug.cgi?id=502024#c27
100 # for Boris Kolpackov's explanation about those
101 find apidocdir -name "*.ps" | xargs rm -f
102 # Remove other unwanted crap
103 find apidocdir -name "*.doxygen" \
104             -o -name "makefile" \
105             -o -name "*.html2ps" | xargs rm -f
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(644,root,root,755)
112 %doc docdir/*
113 %attr(755,root,root) %{_bindir}/xsdcxx
114 %{_includedir}/xsd
115 %{_mandir}/man1/xsdcxx.1*
116
117 %files apidocs
118 %defattr(644,root,root,755)
119 %doc apidocdir/*
This page took 0.047892 seconds and 2 git commands to generate.