2012-06-15 13:47:39 +02:00
|
|
|
#
|
|
|
|
# spec file for package apache-commons-daemon
|
|
|
|
#
|
2020-06-08 13:03:40 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2012-06-15 13:47:39 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-25 18:35:52 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-06-15 13:47:39 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define short_name commons-daemon
|
|
|
|
Name: apache-%{short_name}
|
2020-06-08 13:03:40 +02:00
|
|
|
Version: 1.2.2
|
2012-06-15 13:47:39 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Commons Daemon - Controlling of Java Daemons
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Daemons
|
2020-06-08 13:03:40 +02:00
|
|
|
URL: https://commons.apache.org/daemon/
|
2020-06-08 13:11:14 +02:00
|
|
|
Source0: https://archive.apache.org/dist/commons/daemon/source/%{short_name}-%{version}-src.tar.gz
|
|
|
|
Source1: https://archive.apache.org/dist/commons/daemon/source/%{short_name}-%{version}-src.tar.gz.asc
|
2013-05-16 14:13:05 +02:00
|
|
|
Source2: apache-commons-daemon.keyring
|
|
|
|
Patch0: apache-commons-daemon-JAVA_OS.patch
|
|
|
|
Patch1: apache-commons-daemon-s390x.patch
|
2020-06-08 13:03:40 +02:00
|
|
|
Patch2: apache-commons-daemon-riscv64.patch
|
2018-05-15 10:30:52 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2017-05-19 12:14:31 +02:00
|
|
|
BuildRequires: javapackages-local
|
2012-06-15 13:47:39 +02:00
|
|
|
BuildRequires: libcap-devel
|
2020-06-08 13:03:40 +02:00
|
|
|
BuildRequires: maven-local
|
2012-06-15 13:47:39 +02:00
|
|
|
BuildRequires: xmlto
|
2020-06-08 13:03:40 +02:00
|
|
|
BuildRequires: mvn(junit:junit)
|
|
|
|
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
|
2015-03-25 10:16:10 +01:00
|
|
|
Provides: jakarta-%{short_name} = %{version}
|
2012-06-15 13:47:39 +02:00
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}
|
2015-03-25 10:16:10 +01:00
|
|
|
Provides: jakarta-%{short_name}-java = %{version}
|
2012-06-15 13:47:39 +02:00
|
|
|
Obsoletes: jakarta-%{short_name}-java < %{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Daemon Component contains a set of Java and native code, including
|
|
|
|
a set of Java interfaces applications must implement and Unix native
|
|
|
|
code to control a Java daemon from a Unix operating system.
|
|
|
|
|
|
|
|
%package jsvc
|
|
|
|
Summary: Java daemon launcher
|
|
|
|
Group: System/Daemons
|
|
|
|
Provides: jsvc = %{version}-%{release}
|
|
|
|
Obsoletes: jsvc < %{version}
|
|
|
|
Provides: jakarta-%{short_name}:%{_sbindir}/jsvc
|
|
|
|
|
|
|
|
%description jsvc
|
|
|
|
Jsvc is a set of libraries and applications for making Java applications run on
|
|
|
|
UNIX more easily. It 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.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Commons Daemon Javadoc
|
|
|
|
Group: Documentation/Other
|
|
|
|
Provides: jakarta-%{short_name}-javadoc = %{version}-%{release}
|
|
|
|
Obsoletes: jakarta-%{short_name}-javadoc < %{version}
|
2015-03-25 10:16:10 +01:00
|
|
|
BuildArch: noarch
|
2012-06-15 13:47:39 +02:00
|
|
|
|
|
|
|
%description javadoc
|
2015-03-25 10:16:10 +01:00
|
|
|
The Javadoc Documentation for Commons Daemon.
|
2012-06-15 13:47:39 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
# remove java binaries from sources
|
|
|
|
rm -rf src/samples/build/
|
|
|
|
|
2013-05-16 14:13:05 +02:00
|
|
|
# remove files for different OS
|
|
|
|
rm -rf src/samples/*.cmd
|
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
# mark example files as non-executable
|
2013-05-16 14:13:05 +02:00
|
|
|
chmod -R 0644 src/samples/*
|
2012-06-15 13:47:39 +02:00
|
|
|
|
2019-03-25 18:35:52 +01:00
|
|
|
%pom_remove_parent .
|
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
# build manpage for jsvc
|
2012-06-15 14:25:18 +02:00
|
|
|
pushd src/native/unix
|
2012-06-15 13:47:39 +02:00
|
|
|
xmlto man man/jsvc.1.xml
|
2012-06-15 14:25:18 +02:00
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
%build
|
2012-06-15 13:47:39 +02:00
|
|
|
# build native jsvc
|
2020-06-08 13:03:40 +02:00
|
|
|
pushd src/native/unix
|
|
|
|
sh support/buildconf.sh
|
|
|
|
|
2012-06-15 13:47:39 +02:00
|
|
|
%configure --with-java=%{java_home}
|
2020-06-08 13:03:40 +02:00
|
|
|
%make_build
|
2012-06-15 13:47:39 +02:00
|
|
|
popd
|
2020-06-08 13:03:40 +02:00
|
|
|
|
|
|
|
# build jars
|
|
|
|
%mvn_file : %{short_name} %{name}
|
|
|
|
%mvn_alias : org.apache.commons:%{short_name}
|
|
|
|
%mvn_build
|
2012-06-15 13:47:39 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
# install native jsvc
|
|
|
|
install -Dm 0755 src/native/unix/jsvc %{buildroot}%{_bindir}/jsvc
|
2015-03-25 10:16:10 +01:00
|
|
|
install -Dpm 644 src/native/unix/jsvc.1 %{buildroot}%{_mandir}/man1/jsvc.1
|
2012-06-15 13:47:39 +02:00
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
%mvn_install
|
|
|
|
|
2012-06-15 13:47:39 +02:00
|
|
|
# jars
|
2020-06-08 13:03:40 +02:00
|
|
|
install -Dpm 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2012-06-15 13:47:39 +02:00
|
|
|
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
|
|
|
|
|
|
|
# pom
|
2015-03-25 10:16:10 +01:00
|
|
|
install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
2012-06-15 13:47:39 +02:00
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.apache.commons:%{short_name}"
|
|
|
|
|
|
|
|
# javadoc
|
2015-03-25 10:16:10 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
2020-06-08 13:03:40 +02:00
|
|
|
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
2018-05-15 10:30:52 +02:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
2012-06-15 13:47:39 +02:00
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE.txt NOTICE.txt
|
|
|
|
%doc PROPOSAL.html RELEASE-NOTES.txt src/samples
|
|
|
|
%doc src/docs/*
|
2012-06-15 13:47:39 +02:00
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%{_javadir}/%{short_name}.jar
|
|
|
|
%{_mavenpomdir}/JPP-%{name}.pom
|
2015-03-18 11:05:46 +01:00
|
|
|
%{_datadir}/maven-metadata/%{name}.xml
|
2012-06-15 13:47:39 +02:00
|
|
|
|
|
|
|
%files jsvc
|
2020-06-08 13:03:40 +02:00
|
|
|
%license LICENSE.txt NOTICE.txt
|
2012-06-15 13:47:39 +02:00
|
|
|
%{_bindir}/jsvc
|
|
|
|
%{_mandir}/man1/jsvc.1*
|
|
|
|
|
2020-06-08 13:03:40 +02:00
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
|
|
%license LICENSE.txt NOTICE.txt
|
2012-06-15 13:47:39 +02:00
|
|
|
%doc src/docs/*
|
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|