knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-61: First iteration of changes for creating RPM. Need to find out if there is a platform independent way to generate RPMs next.
Date Thu, 25 Apr 2013 16:45:48 GMT
Updated Branches:
  refs/heads/master b2031a71a -> 330244a9e


KNOX-61: First iteration of changes for creating RPM.  Need to find out if there is a platform
independent way to generate RPMs next.


Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/330244a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/330244a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/330244a9

Branch: refs/heads/master
Commit: 330244a9e4c4f97c1911501169b50ada5e9772fc
Parents: b2031a7
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Thu Apr 25 12:45:40 2013 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Thu Apr 25 12:45:40 2013 -0400

----------------------------------------------------------------------
 build.xml                     |   13 +++++++
 gateway-rpm/build_knox_rpm.sh |   40 ++++++++++++++++++++++
 gateway-rpm/knox.spec         |   66 ++++++++++++++++++++++++++++++++++++
 3 files changed, 119 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/330244a9/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index cdd5d0a..e2a0149 100644
--- a/build.xml
+++ b/build.xml
@@ -43,6 +43,10 @@
         <os family="windows" />
     </condition>
 
+    <condition property="distributive_builder" value="./gateway-rpm/build_knox_rpm.sh">
+        <os family="unix" />
+    </condition>
+
     <target name="init" description="Initialize the build.">
     </target>
 
@@ -75,6 +79,15 @@
         </exec>
     </target>
 
+    <target name="make_distributive" depends="package" description="Build rpm of the product.">
+        <exec executable="${distributive_builder}">
+            <arg value="target"/>
+            <arg value="${gateway-artifact}"/>
+            <arg value="${gateway-version}"/>
+            <arg value="${release-manager}"/>
+        </exec>
+    </target>	
+	
     <!--
     <target name="archive" depends="init" description="Create the release ZIP.">
         <zip destfile="target/${gateway-version}/${gateway-artifact}-${gateway-version}.zip">

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/330244a9/gateway-rpm/build_knox_rpm.sh
----------------------------------------------------------------------
diff --git a/gateway-rpm/build_knox_rpm.sh b/gateway-rpm/build_knox_rpm.sh
new file mode 100644
index 0000000..b4489c7
--- /dev/null
+++ b/gateway-rpm/build_knox_rpm.sh
@@ -0,0 +1,40 @@
+#!/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.
+#
+
+# target
+KNOX_PACKAGE_TARGET=$1
+# knox
+KNOX_NAME=$2
+# 0.3.0-SNAPSHOT
+KNOX_VERSION=$3
+# target/RPM base directory
+KNOX_RPM_BUILD_ROOT="$(pwd)"/$KNOX_PACKAGE_TARGET/RPM
+
+
+#SOURCES Contains the original sources, patches, and icon files.
+#SPECS Contains the spec files used to contrl the build process. 
+#The BUILD directory in which the sources are unpacked, and the software is built.
+#RPMS Contains the binary package files created by the build process.
+#SRPMS Contains the source package files created by the build process.
+mkdir -p $KNOX_RPM_BUILD_ROOT/{SOURCES,SPECS,BUILD,RPMS,SRPMS}
+
+cp ./gateway-rpm/knox.spec $KNOX_RPM_BUILD_ROOT/SPECS
+cp ./$KNOX_PACKAGE_TARGET/$KNOX_VERSION/$KNOX_NAME-$KNOX_VERSION.tar.gz $KNOX_RPM_BUILD_ROOT/SOURCES
+
+rpmbuild --define "_topdir $KNOX_RPM_BUILD_ROOT" --define "_knox_name $KNOX_NAME" --define
"_knox_ver $KNOX_VERSION" -bb $KNOX_RPM_BUILD_ROOT/SPECS/knox.spec 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/330244a9/gateway-rpm/knox.spec
----------------------------------------------------------------------
diff --git a/gateway-rpm/knox.spec b/gateway-rpm/knox.spec
new file mode 100644
index 0000000..c241f9c
--- /dev/null
+++ b/gateway-rpm/knox.spec
@@ -0,0 +1,66 @@
+#
+# Knox spec file for RPM...
+#
+
+#
+#  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.
+#
+
+Summary: Knox
+Name: %_knox_name
+Version: 0.3.0
+Release: 1
+License: Apache License, Version 2.0
+Group: Applications/Server
+Vendor: Hortonworks.
+Packager: Hortonworks <packager@hortonworks.com>
+BuildArch: i386
+
+#knox-0.3.0-SNAPSHOT.tar.gz
+Source: %{name}-%{_knox_ver}.tar.gz
+
+%description
+Knox server...
+
+%prep
+echo "Knox installation preparation"
+
+%setup -n %{name}-%{_knox_ver}
+
+%build
+echo "Knox installation build"
+
+%install
+mkdir -p $RPM_BUILD_ROOT/usr/lib/knox/
+cp -R ./ $RPM_BUILD_ROOT/usr/lib/knox/
+
+%clean
+rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR
+
+%files
+/usr/lib/knox/
+
+%pre
+
+%post
+echo "Knox installation complete"
+
+%postun
+
+
+
+
+- 


Mime
View raw message