1#
2# Licensed to the Apache Software Foundation (ASF) under one or more
3# contributor license agreements.  See the NOTICE file distributed with
4# this work for additional information regarding copyright ownership.
5# The ASF licenses this file to You under the Apache License, Version 2.0
6# (the "License"); you may not use this file except in compliance with
7# the License.  You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18%define tcnver 1
19%define aprmajor 1
20%define aprminor 4
21
22Summary: Tomcat Native Java library
23Name: tcnative
24Version: 1.2.24
25Release: 1
26License: Apache Software License
27Group: System Environment/Libraries
28URL: http://apr.apache.org/
29Source0: %{name}-%{version}.tar.gz
30BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
31BuildPrereq: autoconf, libtool, doxygen, apr-devel >= %{aprmajor}.%{aprminor}.0, openssl >= 1.0.2
32
33%description
34The mission of the Tomcat Native Library (TCN) is to provide a
35free library of C data structures and routines.  This library
36contains additional utility interfaces for Java.
37
38%package devel
39Group: Development/Libraries
40Summary: Tomcat Native development kit
41Requires: tcnative = %{version}-%{release}, apr-devel >= %{aprmajor}.%{aprminor}.0, openssl-devel >= 1.0.2
42
43%description devel
44The mission of the Tomcat Native Library (TCN) is to provide a
45free library of C data structures and routines.  This library
46contains additional utility interfaces for Java.
47
48%prep
49%setup -q
50
51%build
52%configure --with-apr=%{_prefix} \
53        --includedir=%{_includedir}/%{name}
54make %{?_smp_mflags} && make dox
55
56%check
57# Run non-interactive tests
58pushd test
59make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
60./testall -v || exit 1
61popd
62
63%install
64rm -rf $RPM_BUILD_ROOT
65make install DESTDIR=$RPM_BUILD_ROOT
66
67# Documentation
68mv docs/dox/html html
69
70# Unpackaged files
71rm -f $RPM_BUILD_ROOT%{_libdir}/tcnative.exp
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%post -p /sbin/ldconfig
77
78%postun -p /sbin/ldconfig
79
80%files
81%defattr(-,root,root,-)
82%doc CHANGES LICENSE NOTICE
83%{_libdir}/libtcnative-%{tcnver}.so.*
84
85%files devel
86%defattr(-,root,root,-)
87%{_libdir}/libtcnative-%{tcnver}.*a
88%{_libdir}/libtcnative-%{tcnver}.so
89%{_libdir}/pkgconfig/tcnative-%{tcnver}.pc
90%{_includedir}/%{name}/*.h
91%doc --parents html
92
93%changelog
94* Sat Oct 31 2015 Rainer Jung <rjung@apache.org> 1.2.0-1
95- update for tcnative 1.2
96* Tue Jun 22 2004 Mladen Turk <mturk@jboss.com> 1.0.0-1
97- update to support v1.0.2 of APR
98
99