1 |
neoclust |
916802 |
%global namedreltag .Fork2 |
2 |
|
|
%global namedversion %{version}%{?namedreltag} |
3 |
|
|
|
4 |
|
|
Name: netty-tcnative |
5 |
|
|
Version: 1.1.30 |
6 |
|
|
Release: %mkrel 2 |
7 |
|
|
Group: Developement/Java |
8 |
|
|
Summary: Fork of Tomcat Native with improved OpenSSL and mavenized build |
9 |
|
|
License: ASL 2.0 |
10 |
|
|
URL: https://github.com/netty/netty/wiki/Forked-Tomcat-Native |
11 |
|
|
Source0: https://github.com/netty/netty-tcnative/archive/%{name}-%{namedversion}.tar.gz |
12 |
|
|
Source1: CheckLibrary.java |
13 |
|
|
Patch1: fixLibNames.patch.in |
14 |
|
|
Patch2: i388aprFix.patch |
15 |
|
|
|
16 |
|
|
BuildRequires: maven-local |
17 |
|
|
BuildRequires: autoconf |
18 |
|
|
BuildRequires: automake |
19 |
|
|
BuildRequires: libtool |
20 |
|
|
BuildRequires: glibc-devel |
21 |
|
|
BuildRequires: apr-devel |
22 |
|
|
BuildRequires: openssl-devel |
23 |
|
|
BuildRequires: maven-hawtjni-plugin |
24 |
|
|
#parent pom is needed |
25 |
|
|
BuildRequires: netty |
26 |
|
|
BuildRequires: mvn(kr.motd.maven:os-maven-plugin) |
27 |
|
|
|
28 |
|
|
|
29 |
|
|
%description |
30 |
|
|
netty-tcnative is a fork of Tomcat Native. It includes a set of changes |
31 |
|
|
contributed by Twitter, Inc, such as: |
32 |
|
|
* Simplified distribution and linkage of native library |
33 |
|
|
* Complete mavenization of the project |
34 |
|
|
* Improved OpenSSL support |
35 |
|
|
To minimize the maintenance burden, we create a dedicated branch for each stable |
36 |
|
|
upstream release and apply our own changes on top of it, while keeping the |
37 |
|
|
number of maintained branches to minimum |
38 |
|
|
|
39 |
|
|
|
40 |
|
|
%package javadoc |
41 |
|
|
Summary: API documentation for %{name} |
42 |
|
|
Group: Documentation |
43 |
|
|
BuildArch: noarch |
44 |
|
|
|
45 |
|
|
%description javadoc |
46 |
|
|
%{summary}. |
47 |
|
|
|
48 |
|
|
%prep |
49 |
|
|
%setup -q -n %{name}-%{name}-%{namedversion} |
50 |
|
|
patch=`mktemp` |
51 |
|
|
sed "s;@PATH@;%{_libdir}/%{name};g" < %{PATCH1} > $patch |
52 |
|
|
patch -p1 < $patch |
53 |
|
|
%patch2 -p1 |
54 |
|
|
|
55 |
|
|
|
56 |
|
|
%build |
57 |
|
|
%mvn_build -f |
58 |
|
|
|
59 |
|
|
%install |
60 |
|
|
%mvn_install |
61 |
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/ |
62 |
|
|
cp target/native-build/target/lib/lib%{name}-%{namedversion}.so $RPM_BUILD_ROOT%{_libdir}/%{name}/lib%{name}.so |
63 |
|
|
|
64 |
|
|
|
65 |
|
|
%check |
66 |
|
|
javac -d . -cp $RPM_BUILD_ROOT%{_jnidir}/%{name}/%{name}.jar %{SOURCE1} |
67 |
|
|
#don't know how to test load(path) without more and more patching, however the test class can be used for manual testing |
68 |
|
|
#java -cp .:$RPM_BUILD_ROOT%%{_jnidir}/%%{name}/%%{name}.jar CheckLibrary |
69 |
|
|
|
70 |
|
|
|
71 |
|
|
%files -f .mfiles |
72 |
|
|
%dir %{_libdir}/%{name} |
73 |
|
|
%dir %{_jnidir}/%{name} |
74 |
|
|
%dir %{_mavenpomdir}/%{name} |
75 |
|
|
%{_libdir}/%{name}/lib%{name}.so |
76 |
|
|
|
77 |
|
|
%files javadoc -f .mfiles-javadoc |
78 |
|
|
|