diff --git a/README.md b/README.md deleted file mode 100644 index 14f24c0..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# apache-commons-daemon - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/apache-commons-daemon-JAVA_OS.patch b/apache-commons-daemon-JAVA_OS.patch new file mode 100644 index 0000000..b67b56e --- /dev/null +++ b/apache-commons-daemon-JAVA_OS.patch @@ -0,0 +1,11 @@ +--- commons-daemon-1.0.12-src/src/native/unix/configure~ 2013-01-14 07:45:15.000000000 +0100 ++++ commons-daemon-1.0.12-src/src/native/unix/configure 2013-01-24 15:55:59.757193071 +0100 +@@ -2776,7 +2776,7 @@ + echo "${ECHO_T}jni_md.h found in $JAVA_HOME/$JAVA_INC" >&6 + INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/$JAVA_INC" + else +- INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os" ++ INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$JAVA_OS" + fi + + if test "$GCC" = "yes" diff --git a/apache-commons-daemon-aarch64.patch b/apache-commons-daemon-aarch64.patch new file mode 100644 index 0000000..cf40653 --- /dev/null +++ b/apache-commons-daemon-aarch64.patch @@ -0,0 +1,43 @@ +backport from http://svn.apache.org/viewvc?view=revision&revision=1533345 + +https://issues.apache.org/jira/browse/DAEMON-308 + +--- + src/native/unix/configure | 4 ++++ + src/native/unix/support/apsupport.m4 | 4 ++++ + 2 files changed, 8 insertions(+) + +--- commons-daemon-1.0.15-src.orig/src/native/unix/configure ++++ commons-daemon-1.0.15-src/src/native/unix/configure +@@ -2695,10 +2695,14 @@ echo "$as_me: error: Unsupported operati + arm*) + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" + HOST_CPU=arm + ;; ++ aarch64*) ++ CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\"" ++ supported_os="aarch64" ++ HOST_CPU=aarch64;; + *) + echo "$as_me:$LINENO: result: failed" >&5 + echo "${ECHO_T}failed" >&6 + { { echo "$as_me:$LINENO: error: Unsupported CPU architecture \"$host_cpu\"" >&5 + echo "$as_me: error: Unsupported CPU architecture \"$host_cpu\"" >&2;} +--- commons-daemon-1.0.15-src.orig/src/native/unix/support/apsupport.m4 ++++ commons-daemon-1.0.15-src/src/native/unix/support/apsupport.m4 +@@ -164,10 +164,14 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ + arm*) + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" + HOST_CPU=arm + ;; ++ aarch64*) ++ CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\"" ++ supported_os="aarch64" ++ HOST_CPU=aarch64;; + *) + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);; + esac + diff --git a/apache-commons-daemon-secondary.patch b/apache-commons-daemon-secondary.patch new file mode 100644 index 0000000..de2263b --- /dev/null +++ b/apache-commons-daemon-secondary.patch @@ -0,0 +1,60 @@ +--- commons-daemon-1.0.15-src/src/native/unix/configure.secondary 2017-08-23 12:52:35.697817597 +0200 ++++ commons-daemon-1.0.15-src/src/native/unix/configure 2017-08-23 12:53:15.313367933 +0200 +@@ -2611,8 +2611,16 @@ echo "$as_me: error: Unsupported operati + esac + case $host_cpu in + powerpc) +- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +- HOST_CPU=$host_cpu ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc\\\"" ++ HOST_CPU=ppc ++ ;; ++ powerpc64) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64\\\"" ++ HOST_CPU=ppc64 ++ ;; ++ powerpc64le) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64le\\\"" ++ HOST_CPU=ppc64le + ;; + sparc*) + CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +@@ -2687,7 +2695,7 @@ echo "$as_me: error: Unsupported operati + HOST_CPU=ia64 + fi + ;; +- s390) ++ s390 | s390x) + CFLAGS="$CFLAGS -DCPU=\\\"s390\\\"" + supported_os="s390" + HOST_CPU=s390 +--- commons-daemon-1.0.15-src/src/native/unix/support/apsupport.m4.secondary 2013-03-27 09:09:02.000000000 +0100 ++++ commons-daemon-1.0.15-src/src/native/unix/support/apsupport.m4 2017-08-23 12:53:01.391525956 +0200 +@@ -80,8 +80,16 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ + esac + case $host_cpu in + powerpc) +- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +- HOST_CPU=$host_cpu ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc\\\"" ++ HOST_CPU=ppc ++ ;; ++ powerpc64) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64\\\"" ++ HOST_CPU=ppc64 ++ ;; ++ powerpc64le) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64le\\\"" ++ HOST_CPU=ppc64le + ;; + sparc*) + CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +@@ -156,7 +164,7 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ + HOST_CPU=ia64 + fi + ;; +- s390) ++ s390 | s390x) + CFLAGS="$CFLAGS -DCPU=\\\"s390\\\"" + supported_os="s390" + HOST_CPU=s390 diff --git a/apache-commons-daemon.spec b/apache-commons-daemon.spec new file mode 100644 index 0000000..1389f8b --- /dev/null +++ b/apache-commons-daemon.spec @@ -0,0 +1,66 @@ +Name: apache-commons-daemon +Version: 1.0.15 +Release: 19 +Summary: Defines API to support an alternative invocation mechanism +License: ASL 2.0 +URL: http://commons.apache.org/daemon +Source0: http://archive.apache.org/dist/commons/daemon/source/commons-daemon-%{version}-src.tar.gz +BuildRequires: maven-local java-devel >= 1:1.6.0 jpackage-utils apache-commons-parent +BuildRequires: maven-surefire-provider-junit xmlto gcc make +Provides: apache-commons-daemon-jsvc = %{version}-%{release} jsvc = 1:%{version}-%{release} +Obsoletes: apache-commons-daemon-jsvc < %{version}-%{release} + +Patch0001: apache-commons-daemon-JAVA_OS.patch +Patch0002: apache-commons-daemon-secondary.patch +Patch0003: apache-commons-daemon-aarch64.patch + +%description +The scope of this package is to define an API in line with the current Java Platform APIs to support +an alternative invocation mechanism which could be used instead of the public static void main(String[]) method. +This specification covers the behavior and life cycle of what we define as Java daemons, or, in other words, non interactive Java applications. + +%package help +Requires: jpackage-utils +BuildArch: noarch +Summary: Help documents for apache-commons-daemon +Provides: apache-commons-daemon-javadoc = %{version}-%{release} +Obsoletes: apache-commons-daemon-javadoc < %{version}-%{release} + +%description help +The apache-commons-daemon-help package conatins manual pages and API documents for apache-commons-daemon. + +%prep +%autosetup -n commons-daemon-%{version}-src -p1 + +rm -rf src/samples/build/* +cd src/native/unix +xmlto man man/jsvc.1.xml + +%build +cd src/native/unix +%configure --with-java=%{java_home} +make clean +%make_build +cd - + +%mvn_file : commons-daemon apache-commons-daemon +%mvn_alias : org.apache.commons:commons-daemon +%mvn_build + +%install +install -Dpm 755 src/native/unix/jsvc $RPM_BUILD_ROOT%{_bindir}/jsvc +install -Dpm 644 src/native/unix/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1/jsvc.1 + +%mvn_install + +%files -f .mfiles +%doc LICENSE.txt +%{_bindir}/jsvc + +%files help -f .mfiles-javadoc +%doc PROPOSAL.html NOTICE.txt RELEASE-NOTES.txt src/samples src/docs/* +%{_mandir}/man1/jsvc.1* + +%changelog +* Mon Dec 2 2019 liujing - 1.0.15-19 +- Package init diff --git a/commons-daemon-1.0.15-src.tar.gz b/commons-daemon-1.0.15-src.tar.gz new file mode 100644 index 0000000..e4cebfb Binary files /dev/null and b/commons-daemon-1.0.15-src.tar.gz differ