summaryrefslogtreecommitdiff
path: root/tomcat-native.spec
blob: a0135ba1569edada57944fb4735d65b93a50e9c4 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

%include	/usr/lib/rpm/macros.java

%define		jarver	1.1.17

Summary:	Native Tomcat Connector based on APR
Summary(pl.UTF-8):	Natywny Connector Tomcata oparty o APR
Name:		tomcat-native
Version:	1.1.23
Release:	1
License:	Apache v2
Group:		Libraries
Source0:	http://www.apache.org/dist/tomcat/tomcat-connectors/native/%{version}/source/%{name}-%{version}-src.tar.gz
# Source0-md5:	f2a55b5a19adbe491edc98e0c11d9028
URL:		http://tomcat.apache.org/native-doc
BuildRequires:	ant
BuildRequires:	apr-devel
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	jdk
BuildRequires:	jpackage-utils
BuildRequires:	libtool
BuildRequires:	openssl-devel
BuildRequires:	rpm >= 4.4.9-56
BuildRequires:	rpm-javaprov
BuildRequires:	rpmbuild(macros) >= 1.300
BuildConflicts:	java-gcj-compat
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Tomcat can use the Apache Portable Runtime to provide superior
scalability, performance, and better integration with native server
technologies. The Apache Portable Runtime is a highly portable library
that is at the heart of Apache HTTP Server 2.x. APR has many uses,
including access to advanced IO functionality (such as sendfile, epoll
and OpenSSL), OS level functionality (random number generation, system
status, etc), and native process handling (shared memory, NT pipes and
Unix sockets).

These features allows making Tomcat a general purpose webserver, will
enable much better integration with other native web technologies, and
overall make Java much more viable as a full fledged webserver
platform rather than simply a backend focused technology.

%description -l pl.UTF-8
Tomcat może wykorzytać Apache Portable Runtime aby zapewnić najwyższą,
saklowalność, wydajność i lepszą integrację z natywnymi technologiami
serwerowymi.

Apache portable Runtime jest wysoce przenośną biblioteką, która jest
sercem serwera Apache HTTPD 2.x. APR ma wiele zestosowań, m. in.
dostępd do zaawansowanych funkcjonalnośći IO (takich jak sendfile,
epoll i OpenSSL), funkcjonalności posiomu systemu operacyjnego
(generacja liczb losowych, stan systemu, itp.) i natywną obsługę
procesów (współdzielona pamięć, potoki NT i gniazda uniksowe).

Te cechy pozwalają na wykorzystanie Tomcata jako sewera www do
zastosowań ogólnych, pozwalają na o wiele lepszą integrację z innymi
natywnymi technologiami www i w ogólności pozwalają na traktowanie
Javy jako zaawansowanej i kompletnej platformy www a nie tylko
technologii backendowej.

%package devel
Summary:	Header files for tcnative library
Summary(pl.UTF-8):	Pliki nagłówwkowe biblioteki tcnative
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Header files for tcnative library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki tcnative.

%package static
Summary:	Static tcnative library
Summary(pl.UTF-8):	Statyczna biblioteka tcnative
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static tcnative library.

%description static -l pl.UTF-8
Statyczna biblioteka tcnative.

%prep
%setup -q -n %{name}-%{version}-src

%build
# build java part
cd jni
%ant clean jar

# build native part
cd native
./buildconf --with-apr=%{_datadir}/apr
%configure \
	--with-java-home=%{java_home} \
	--with-apr=/usr
%{__make}

%install
rm -rf $RPM_BUILD_ROOT

cd jni
install -d $RPM_BUILD_ROOT/%{_javadir}
install dist/tomcat-native-%{jarver}-dev.jar $RPM_BUILD_ROOT/%{_javadir}/tomcat-native-%{jarver}.jar
ln -s tomcat-native-%{jarver}.jar $RPM_BUILD_ROOT/%{_javadir}/tomcat-native.jar

cd native
%{__make} install \
	prefix=%{_prefix} \
	DESTDIR=$RPM_BUILD_ROOT

# Why Makefile doesn't do that?
install -d $RPM_BUILD_ROOT/%{_includedir}
install include/*.h $RPM_BUILD_ROOT/%{_includedir}

%clean
rm -rf $RPM_BUILD_ROOT

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

%files
%defattr(644,root,root,755)
%doc CHANGELOG.txt KEYS README.txt
%{_javadir}/%{name}-%{jarver}.jar
%{_javadir}/%{name}.jar
%attr(755,root,root) %{_libdir}/libtcnative-1.so.*.*
%attr(755,root,root) %ghost %{_libdir}/libtcnative-1.so.0
%{_libdir}/libtcnative-1.so

%files devel
%defattr(644,root,root,755)
%{_libdir}/libtcnative-1.la
%{_pkgconfigdir}/tcnative-1.pc
%{_includedir}/*.h

%files static
%defattr(644,root,root,755)
%{_libdir}/libtcnative-1.a