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