summaryrefslogtreecommitdiff
path: root/xalan-c.spec
blob: 53f8aec7e3134ba32543346bca77bef169d66f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
%define		_ver	%(echo %{version} | tr . _)
Summary:	XML parser
Summary(pl.UTF-8):	Analizator składniowy XML-a
Name:		xalan-c
Version:	1.10.0
Release:	3
License:	Apache License, Version 2.0
Group:		Applications/Publishing/XML
Source0:	http://www.apache.org/dist/xml/xalan-c/Xalan-C_%{_ver}-src.tar.gz
# Source0-md5:	0a3fbb535885531cc544b07a2060bfb1
Patch0:		%{name}-getopt.patch
Patch1:		%{name}-soname.patch
URL:		http://xalan.apache.org/
BuildRequires:	icu
BuildRequires:	libicu-devel
BuildRequires:	util-linux
BuildRequires:	xerces-c-devel >= 2.7.0
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Apache Xalan Project is a collaborative software development project
dedicated to providing robust, full-featured, commercial-quality, and
freely available XSLT support on a wide variety of platforms.

%description -l pl.UTF-8
Projekt Apache Xalan to wspólny projekt stworzenia oprogramowania
mającego zapewnic potężną, w pełni funkcjonalną, mającą komercyjną
jakość i jednocześnie wolnodostępną obsługę XSLT na szerokim zakresie
platform.

%package devel
Summary:	xalan-c header files
Summary(pl.UTF-8):	Pliki nagłówkowe xalan-c
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
xalan-c header files.

%description devel -l pl.UTF-8
Pliki nagłówkowe xalan-c.

%package docs
Summary:	Documentation for xalan-c
Summary(pl.UTF-8):	Dokumentacja xlan-c
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description docs
Documentation for xalan-c.

%description docs -l pl.UTF-8
Dokumentacja xalan-c.

%prep
%setup -q -n xml-xalan
%patch0 -p1
%patch1 -p1

%if "%{_lib}" != "lib"
sed -i s#/lib/icu/Makefile.inc#/%{_lib}/icu/Makefile.inc# \
	c/src/xalanc/Utils/Makefile.in
%endif

rm -rf c/{xdocs,samples}/CVS

%build
cd c
export XALANCROOT=$(pwd)
export XERCESROOT=/usr
export ICUROOT=/usr
export XALAN_USE_ICU=true

./runConfigure \
	-P %{_prefix} \
	-p linux \
	-c "%{__cc}" \
	-x "%{__cxx}" \
%ifarch %{x8664} alpha ppc64 s390x sparc64
	-b 64 \
%else
	-b 32 \
%endif
	-t icu \
	-m icu

# tries to link testXSLT before libxalan-c.so symlink is created
%{__make} -j1

%install
rm -rf $RPM_BUILD_ROOT
cd c
export XALANCROOT=$(pwd)
export XERCESROOT=/usr
export ICUROOT=/usr

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_libdir}
install -d $RPM_BUILD_ROOT%{_includedir}

%if "%{_lib}" != "lib"
mv $RPM_BUILD_ROOT%{_prefix}/lib/* $RPM_BUILD_ROOT%{_libdir}
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/Xalan
%attr(755,root,root) %{_libdir}/libxalan-c.so.*.*
%attr(755,root,root) %{_libdir}/libxalanMsg.so.*.*

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libxalan-c.so
%attr(755,root,root) %{_libdir}/libxalanMsg.so
%{_includedir}/xalanc

%files docs
%defattr(644,root,root,755)
%doc c/xdocs c/samples