File jsvc.spec of Package jsvc
# vim: set sw=4 ts=4 et nu:
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: jsvc
Version: 1.0.15
Release: 0
Summary: Java Daemonization Frontend
Source: http://www.apache.org/dist/commons/daemon/source/commons-daemon-%{version}-src.tar.gz
URL: http://commons.apache.org/daemon/jsvc.html
Group: System/Daemons
License: Apache-2.0
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: jpackage-utils
%if 0%{?suse_version} > 0
BuildRequires: java-devel
%else
BuildRequires: java-1.6.0-openjdk-devel
%endif
BuildRequires: libcap-devel
BuildRequires: libxslt
BuildRequires: gcc make glibc-devel pkgconfig
BuildRequires: autoconf automake libtool
%if 0%{?suse_version}
BuildRequires: docbook2x
%endif
Provides: commons-daemon-native = %{version}
%description
Jsvc is a set of libraries and applications for making Java applications run on
UNIX more easily.
Jsvc allows the application (e.g. Tomcat) to perform some privileged operations
as root (e.g. bind to a port < 1024), and then switch identity to a
non-privileged user.
%prep
%setup -q -n "commons-daemon-%{version}-src"
#%patch1
%build
pushd src/native/unix
%configure \
--with-java="%{java_home}"
%__make %{?_smp_mflags}
popd
%if 0%{?suse_version}
pushd src/native/unix/man
docbook-to-man jsvc.1.xml
popd
%endif
%install
%__install -D -m0755 src/native/unix/jsvc "%{buildroot}%{_bindir}/jsvc"
%if 0%{?suse_version}
%__install -D -m0644 src/native/unix/man/JSVC.1 "%{buildroot}%{_mandir}/man1/jsvc.1"
%endif
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc src/native/unix/CHANGES.txt LICENSE.txt NOTICE.txt README RELEASE-NOTES.txt
%{_bindir}/jsvc
%if 0%{?suse_version}
%doc %{_mandir}/man1/jsvc.1*
%endif
%changelog