Author: rvs
Date: Fri Mar 2 18:39:21 2012
New Revision: 1296376
URL: http://svn.apache.org/viewvc?rev=1296376&view=rev
Log:
BIGTOP-389. need to start packaging apache commons daemon jsvc
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/do-component-build
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/bigtop-jsvc.install
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/.gitignore
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/RPMS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/RPMS/.gitignore
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/.gitignore
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/bigtop-jsvc.spec
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SRPMS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SRPMS/.gitignore
Modified:
incubator/bigtop/branches/hadoop-0.23/bigtop.mk
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/do-component-build
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/do-component-build?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/do-component-build
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/do-component-build
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+rm -f jsvc
+
+pushd unix
+ ./configure --prefix=/usr
+ make
+ cp -f jsvc ../jsvc
+popd
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,90 @@
+#!/bin/bash -x
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+usage() {
+ echo "
+usage: $0 <options>
+ Required not-so-options:
+ --build-dir=DIR path to hive/build/dist
+ --prefix=PREFIX path to install into
+ "
+ exit 1
+}
+
+OPTS=$(getopt \
+ -n $0 \
+ -o '' \
+ -l 'prefix:' \
+ -l 'build-dir:' \
+ -l 'bin-dir:' \
+ -l 'doc-dir:' \
+ -l 'man-dir:' \
+ -- "$@")
+
+if [ $? != 0 ] ; then
+ usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+ case "$1" in
+ --prefix)
+ PREFIX=$2 ; shift 2
+ ;;
+ --build-dir)
+ BUILD_DIR=$2 ; shift 2
+ ;;
+ --bin-dir)
+ BIN_DIR=$2 ; shift 2
+ ;;
+ --man-dir)
+ MAN_DIR=$2 ; shift 2
+ ;;
+ --doc-dir)
+ DOC_DIR=$2 ; shift 2
+ ;;
+ --)
+ shift ; break
+ ;;
+ *)
+ echo "Unknown option: $1"
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+for var in PREFIX BUILD_DIR; do
+ if [ -z "$(eval "echo \$$var")" ]; then
+ echo Missing param: $var
+ usage
+ fi
+done
+
+BIN_DIR=${BIN_DIR:-$PREFIX/usr/lib/bigtop-utils}
+DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/bigtop-jsvc}
+MAN_DIR=${MAN_DIR:-$PREFIX/usr/man}
+
+#libexec
+install -d -m 0755 ${BIN_DIR}
+cp ${BUILD_DIR}/jsvc ${BIN_DIR}
+
+# docs
+install -d -m 0755 ${DOC_DIR}
+cp ${BUILD_DIR}/*.txt ${DOC_DIR}/
+cp ${BUILD_DIR}/README ${DOC_DIR}/
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-jsvc/install_jsvc.sh
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/bigtop-jsvc.install
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/bigtop-jsvc.install?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/bigtop-jsvc.install
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/bigtop-jsvc.install
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,2 @@
+/usr/lib/bigtop-utils
+/usr/share/doc/bigtop-jsvc
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog
Fri Mar 2 18:39:21 2012
@@ -0,0 +1 @@
+--- This is auto-generated
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/changelog
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat
Fri Mar 2 18:39:21 2012
@@ -0,0 +1 @@
+6
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/compat
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Source: bigtop-jsvc
+Section: misc
+Priority: extra
+Maintainer: Bigtop <[email protected]>
+Build-Depends: debhelper (>= 6), autoconf, automake, gcc
+Standards-Version: 3.8.0
+Homepage: http://commons.apache.org/daemon/
+
+Package: bigtop-jsvc
+Architecture: any
+Description: Application to launch java daemon
+ jsvc executes classfile that implements a Daemon interface.
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/control
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://commons.apache.org/daemon/
+Upstream-Name: Apache Commons Daemon
+
+Files: *
+Copyright: 2008-2012, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2012, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/copyright
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS=-s
+
+jsvc_pkg_name=bigtop-jsvc
+
+patch: patch-stamp
+patch-stamp:
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f *-stamp
+ dh_clean
+ rm -Rf debian/tmp debian/$(jsvc_pkg_name)
+ find debian -name .\*swp -exec rm -f {} \;
+
+build: build-stamp
+build-stamp: patch-stamp
+ bash debian/do-component-build -Divy.home=${HOME}/.ivy2
+ touch $@
+
+install-arch:
+ dh_testdir
+ dh_testroot
+ sh -x debian/install_jsvc.sh \
+ --build-dir=. \
+ --prefix=debian/tmp
+ dh_install -s --sourcedir=debian/tmp
+
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_installinit
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture dependant packages using the common target.
+binary: binary-arch
+binary-arch: build install-arch binary-common
+ @echo Build is done
+
+.PHONY: build clean binary-indep binary install-indep binary-arch
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-jsvc/rules
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/.gitignore?rev=1296376&view=auto
==============================================================================
(empty)
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/RPMS/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/RPMS/.gitignore?rev=1296376&view=auto
==============================================================================
(empty)
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/.gitignore?rev=1296376&view=auto
==============================================================================
(empty)
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/bigtop-jsvc.spec
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/bigtop-jsvc.spec?rev=1296376&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/bigtop-jsvc.spec
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SPECS/bigtop-jsvc.spec
Fri Mar 2 18:39:21 2012
@@ -0,0 +1,67 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+%define man_dir %{_mandir}
+
+%if %{?suse_version:1}0
+%define bin_jsvc /usr/lib/bigtop-utils
+%define doc_jsvc %{_docdir}/%{name}
+%else
+%define bin_jsvc %{_libexecdir}/bigtop-utils
+%define doc_jsvc %{_docdir}/%{name}-%{bigtop_jsvc_version}
+%endif
+
+Name: bigtop-jsvc
+Version: %{bigtop_jsvc_version}
+Release: %{bigtop_jsvc_release}
+Summary: Application to launch java daemon
+URL: http://commons.apache.org/daemon/
+Group: Development/Libraries
+Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
+License: ASL 2.0
+Source0: commons-daemon-%{bigtop_jsvc_base_version}.tar.gz
+Source1: do-component-build
+Source2: install_jsvc.sh
+BuildRequires: ant, autoconf, automake, gcc
+Provides: jsvc
+
+%description
+jsvc executes classfile that implements a Daemon interface.
+
+%prep
+%setup -n commons-daemon-%{bigtop_jsvc_base_version}-native-src
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%build
+bash %{SOURCE1}
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+sh %{SOURCE2} \
+ --build-dir=. \
+ --bin-dir=$RPM_BUILD_ROOT/%{bin_jsvc} \
+ --doc-dir=$RPM_BUILD_ROOT/%{doc_jsvc} \
+ --man-dir=$RPM_BUILD_ROOT/%{man_dir} \
+ --prefix=$RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{bin_jsvc}
+%doc %{doc_jsvc}
+
+
+%changelog
+
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SRPMS/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-jsvc/SRPMS/.gitignore?rev=1296376&view=auto
==============================================================================
(empty)
Modified: incubator/bigtop/branches/hadoop-0.23/bigtop.mk
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop.mk?rev=1296376&r1=1296375&r2=1296376&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop.mk (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop.mk Fri Mar 2 18:39:21 2012
@@ -157,3 +157,15 @@ BIGTOP_UTILS_BASE_VERSION=$(subst -,.,$(
BIGTOP_UTILS_PKG_VERSION=$(BIGTOP_UTILS_BASE_VERSION)
BIGTOP_UTILS_RELEASE_VERSION=1
$(eval $(call PACKAGE,bigtop-utils,BIGTOP_UTILS))
+
+# Bigtop-jsvc
+BIGTOP_JSVC_NAME=bigtop-jsvc
+BIGTOP_JSVC_RELNOTES_NAME=Apache Commons Daemon (jsvc)
+BIGTOP_JSVC_PKG_NAME=bigtop-jsvc
+BIGTOP_JSVC_BASE_VERSION=1.0.10
+BIGTOP_JSVC_PKG_VERSION=1.0.10
+BIGTOP_JSVC_RELEASE_VERSION=1
+BIGTOP_JSVC_TARBALL_SRC=commons-daemon-$(BIGTOP_JSVC_BASE_VERSION)-native-src.tar.gz
+BIGTOP_JSVC_TARBALL_DST=commons-daemon-$(BIGTOP_JSVC_BASE_VERSION).tar.gz
+BIGTOP_JSVC_SITE=$(APACHE_MIRROR)/commons/daemon/source/
+$(eval $(call PACKAGE,bigtop-jsvc,BIGTOP_JSVC))