]> git.pld-linux.org Git - packages/tomcat-native.git/blob - tomcat-native.spec
- rewritten almost from scratch.
[packages/tomcat-native.git] / tomcat-native.spec
1
2 %if "%{pld_release}" == "ti"
3 %bcond_without  java_sun        # build with gcj
4 %else
5 %bcond_with     java_sun        # build with java-sun
6 %endif
7 #
8 %include        /usr/lib/rpm/macros.java
9
10 Summary:        Native Tomcat Connector based on APR
11 Summary(pl.UTF-8):      Natywny Connector Tomcata oparty o APR
12 Name:           tomcat-native
13 Version:        1.1.16
14 Release:        0.1
15 License:        Apache v2
16 Group:          Libraries
17 Source0:        http://www.apache.org/dist/tomcat/tomcat-connectors/native/%{version}/source/%{name}-%{version}-src.tar.gz
18 # Source0-md5:  2d27f8cf0d87b92b57b2758dad48ff2d
19 URL:            http://tomcat.apache.org/native-doc
20 BuildRequires:  ant
21 BuildRequires:  apr-devel
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 %{!?with_java_sun:BuildRequires:        java-gcj-compat-devel}
25 %{?with_java_sun:BuildRequires: java-sun}
26 BuildRequires:  jpackage-utils
27 BuildRequires:  libtool
28 BuildRequires:  openssl-devel
29 BuildRequires:  rpm >= 4.4.9-56
30 BuildRequires:  rpm-javaprov
31 BuildRequires:  rpmbuild(macros) >= 1.300
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Tomcat can use the Apache Portable Runtime to provide superior
36 scalability, performance, and better integration with native server
37 technologies. The Apache Portable Runtime is a highly portable library
38 that is at the heart of Apache HTTP Server 2.x. APR has many uses,
39 including access to advanced IO functionality (such as sendfile, epoll
40 and OpenSSL), OS level functionality (random number generation, system
41 status, etc), and native process handling (shared memory, NT pipes and
42 Unix sockets).
43
44 These features allows making Tomcat a general purpose webserver, will
45 enable much better integration with other native web technologies, and
46 overall make Java much more viable as a full fledged webserver
47 platform rather than simply a backend focused technology.
48
49 %description -l pl.UTF-8
50 Tomcat może wykorzytać Apache Portable Runtime aby zapewnić
51 najwyższą, saklowalność, wydajność i lepszą integrację z
52 natywnymi technologiami serwerowymi.
53
54 Apache portable Runtime jest wysoce przenośną biblioteką, która
55 jest sercem serwera Apache HTTPD 2.x. APR ma wiele zestosowań, m. in.
56 dostępd do zaawansowanych funkcjonalnośći IO (takich jak sendfile,
57 epoll i OpenSSL), funkcjonalności posiomu systemu operacyjnego
58 (generacja liczb losowych, stan systemu, itp.) i natywną obsługę
59 procesów (współdzielona pamięć, potoki NT i gniazda uniksowe).
60
61 Te cechy pozwalają na wykorzystanie Tomcata jako sewera www do
62 zastosowań ogólnych, pozwalają na o wiele lepszą integrację z
63 innymi natywnymi technologiami www i w ogólności pozwalają na
64 traktowanie Javy jako zaawansowanej i kompletnej platformy www s nie
65 tylko technologii backendowej.
66
67 %package devel
68 Summary:        Header files for tcnative library
69 Summary(pl.UTF-8):      Pliki nagłówwkowe biblioteki tcnative
70 Group:          Development/Libraries
71 Requires:       %{name} = %{version}-%{release}
72
73 %description devel
74 Header files for tcnative library
75
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki tcnative
78
79 %package static
80 Summary:        Static tcnative library
81 Summary(pl.UTF-8):      Statyczna biblioteka tcnative
82 Group:          Development/Libraries
83 Requires:       %{name}-devel = %{version}-%{release}
84
85 %description static
86 Static tcnative library.
87
88 %description static -l pl.UTF-8
89 Statyczna biblioteka tcnative.
90
91 %prep
92 %setup -q -n %{name}-%{version}-src
93
94 %build
95 # build java part
96 cd jni
97 %ant clean jar
98
99 # build native part
100 cd native
101 ./buildconf --with-apr=%{_datadir}/apr
102 %configure \
103         --with-java-home=%{java_home} \
104         --with-apr=/usr
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 cd jni
111 install -d $RPM_BUILD_ROOT/%{_javadir}
112 install dist/tomcat-native-1.0.0.jar $RPM_BUILD_ROOT/%{_javadir}/tomcat-native-1.0.0.jar
113 ln -s tomcat-native-1.0.0.jar $RPM_BUILD_ROOT/%{_javadir}/tomcat-native.jar
114
115 cd native
116 %{__make} install \
117         prefix=%{_prefix} \
118         DESTDIR=$RPM_BUILD_ROOT
119
120 # Why Makefile doesn't do that?
121 install -d $RPM_BUILD_ROOT/%{_includedir}
122 install include/*.h $RPM_BUILD_ROOT/%{_includedir}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post   -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
129
130 %files
131 %defattr(644,root,root,755)
132 %doc CHANGELOG.txt KEYS
133 %{_javadir}/%{name}-1.0.0.jar
134 %{_javadir}/%{name}.jar
135 %attr(755,root,root) %{_libdir}/libtcnative-1.so.0.1.16
136 %attr(755,root,root) %ghost %{_libdir}/libtcnative-1.so.0
137
138 %files devel
139 %defattr(644,root,root,755)
140 %{_libdir}/libtcnative-1.la
141 %{_libdir}/libtcnative-1.so
142 %{_pkgconfigdir}/tcnative-1.pc
143 %{_includedir}/*.h
144
145 %files static
146 %defattr(644,root,root,755)
147 %{_libdir}/libtcnative-1.a
This page took 0.042011 seconds and 3 git commands to generate.