1 |
%global namedreltag .Fork2 |
2 |
%global namedversion %{version}%{?namedreltag} |
3 |
|
4 |
Name: netty-tcnative |
5 |
Version: 1.1.30 |
6 |
Release: %mkrel 7 |
7 |
Group: Development/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 |
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) |
28 |
|
29 |
|
30 |
%description |
31 |
netty-tcnative is a fork of Tomcat Native. It includes a set of changes |
32 |
contributed by Twitter, Inc, such as: |
33 |
* Simplified distribution and linkage of native library |
34 |
* Complete mavenization of the project |
35 |
* Improved OpenSSL support |
36 |
To minimize the maintenance burden, we create a dedicated branch for each stable |
37 |
upstream release and apply our own changes on top of it, while keeping the |
38 |
number of maintained branches to minimum |
39 |
|
40 |
|
41 |
%package javadoc |
42 |
Summary: API documentation for %{name} |
43 |
Group: Documentation |
44 |
BuildArch: noarch |
45 |
|
46 |
%description javadoc |
47 |
%{summary}. |
48 |
|
49 |
%prep |
50 |
%setup -q -n %{name}-%{name}-%{namedversion} |
51 |
patch=`mktemp` |
52 |
sed "s;@PATH@;%{_libdir}/%{name};g" < %{PATCH1} > $patch |
53 |
patch -p1 < $patch |
54 |
%patch2 -p1 |
55 |
|
56 |
|
57 |
%build |
58 |
%mvn_build -f |
59 |
|
60 |
%install |
61 |
%mvn_install |
62 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/ |
63 |
cp target/native-build/target/lib/lib%{name}-%{namedversion}.so $RPM_BUILD_ROOT%{_libdir}/%{name}/lib%{name}.so |
64 |
|
65 |
|
66 |
%check |
67 |
javac -d . -cp $RPM_BUILD_ROOT%{_jnidir}/%{name}/%{name}.jar %{SOURCE1} |
68 |
#don't know how to test load(path) without more and more patching, however the test class can be used for manual testing |
69 |
#java -cp .:$RPM_BUILD_ROOT%%{_jnidir}/%%{name}/%%{name}.jar CheckLibrary |
70 |
|
71 |
|
72 |
%files -f .mfiles |
73 |
%dir %{_libdir}/%{name} |
74 |
%dir %{_jnidir}/%{name} |
75 |
%dir %{_mavenpomdir}/%{name} |
76 |
%{_libdir}/%{name}/lib%{name}.so |
77 |
|
78 |
%files javadoc -f .mfiles-javadoc |
79 |
|