Skip to content
Permalink
Browse files
BIGTOP-1149: Package Kite
  • Loading branch information
youngwookim committed Jul 30, 2015
1 parent 8effb90 commit a04eacebfeb8692bf05b193cef7fef6493fa281e
Show file tree
Hide file tree
Showing 21 changed files with 572 additions and 0 deletions.
@@ -7,6 +7,7 @@ hbase: andrew purtell, rvs
hive: mark grover, youngwoo kim
hue: oflebbe
itest: cos, rvs
kite: youngwoo kim
mvn publishing/packaging: rvs
oozie evans ye, rvs
phoenix: andrew purtell, youngwoo kim
@@ -0,0 +1,48 @@
#!/bin/bash
# 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

. `dirname $0`/bigtop.bom

mvn clean install \
-DjavaVersion=${JDK_VERSION} \
-Dvers.hadoop2=${HADOOP_VERSION} \
-Dvers.hbase2=${HBASE_VERSION}-hadoop2 \
-Dvers.flume=${FLUME_VERSION} \
-Dvers.spark=${SPARK_VERSION} \
-Dvers.crunch=${CRUNCH_VERSION} \
-DskipTests -Dmaven.repo.local=${HOME}/.m2/repository "$@"

rm -rf build

mkdir -p build/kite-${KITE_VERSION}/{bin,lib}

# Kite Data
cp kite-data/kite-*/target/kite-*.jar build/kite-${KITE_VERSION}/lib
# Kite Tools
cp kite-tools-parent/kite-tools/target/kite-dataset build/kite-${KITE_VERSION}/bin/
cp kite-tools-parent/kite-tools/target/kite-*.jar build/kite-${KITE_VERSION}/lib/

# Kite Morphlines
cp kite-morphlines/kite-morphlines-all/target/lib/* build/kite-${KITE_VERSION}/lib/

# Kite Maven plugin
cp kite-maven-plugin/target/kite-*.jar build/kite-${KITE_VERSION}/lib/




@@ -0,0 +1,106 @@
#!/bin/bash

# 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 dist.dir
--prefix=PREFIX path to install into
Optional options:
--lib-dir=DIR path to install home [/usr/lib/kite]
--build-dir=DIR path to dist dir
... [ see source for more similar options ]
"
exit 1
}

OPTS=$(getopt \
-n $0 \
-o '' \
-l 'prefix:' \
-l 'lib-dir:' \
-l 'build-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
;;
--lib-dir)
LIB_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

LIB_DIR=${LIB_DIR:-/usr/lib/kite}
BIN_DIR=${BIN_DIR:-/usr/bin}

# First we'll move everything into lib
install -d -m 0755 $PREFIX/$LIB_DIR
cp -r $BUILD_DIR/* $PREFIX/$LIB_DIR

install -d -m 0755 $PREFIX/$BIN_DIR

# Wrapper for kite-dataset
cat > $PREFIX/$BIN_DIR/kite-dataset <<EOF
#!/bin/bash
# Autodetect JAVA_HOME if not defined
. /usr/lib/bigtop-utils/bigtop-detect-javahome
exec ${LIB_DIR}/bin/kite-dataset "\$@"
EOF
chmod 755 $PREFIX/$BIN_DIR/kite-dataset

rm $PREFIX/$LIB_DIR/lib/kite*-{sources,javadoc,tests}.jar

# Version-less symlinks
for jar in $PREFIX/$LIB_DIR/lib/kite-*jar ; do
jar=$(basename $jar)
versionless_jar=`echo $jar | sed "s|-$KITE_VERSION||"`
(cd $PREFIX/$LIB_DIR; mv lib/$jar ./; ln -s $jar $versionless_jar)
done



@@ -0,0 +1 @@
--- This is auto-generated
@@ -0,0 +1 @@
9
@@ -0,0 +1,28 @@
# 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: kite
Section: misc
Priority: extra
Maintainer: Bigtop <dev@bigtop.apache.org>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.4
Homepage: http://kitesdk.org

Package: kite
Architecture: all
Depends: hadoop-client, hbase, hive, zookeeper, bigtop-utils (>= 0.7)
Description: The Kite Software Development Kit is a set of libraries, tools, examples, and
documentation focused on making it easier to build systems on top of the Hadoop ecosystem.
@@ -0,0 +1,15 @@
Format: http://dep.debian.net/deps/dep5
Source: http://kitesdk.org/
Upstream-Name: Kite Software Development Kit

Files: *
Copyright: 2013, Cloudera, Inc
License: Apache-2.0

Files debian/*
Copyright: 2011, 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".
@@ -0,0 +1,2 @@
/usr/lib/kite
/usr/bin
@@ -0,0 +1,2 @@
/usr/lib/kite
/usr/bin/kite-dataset
@@ -0,0 +1,32 @@
#!/bin/bash
# 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 -e

case "$1" in
configure)
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#
@@ -0,0 +1,37 @@
#!/bin/bash
# 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 -e

case "$1" in
remove|upgrade|deconfigure)
;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
@@ -0,0 +1,49 @@
#!/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

lib_kite=/usr/lib/kite
lib_zookeeper=/usr/lib/zookeeper
lib_hadoop=/usr/lib/hadoop

# This has to be exported to make some magic below work.
export DH_OPTIONS

%:
dh $@

override_dh_auto_build:
# we'll just use the build from the tarball.
bash debian/do-component-build

override_dh_auto_install:
bash -x debian/install_kite.sh \
--prefix=debian/tmp \
--build-dir=build/kite-${KITE_BASE_VERSION}

rm -f debian/tmp/${lib_kite}/lib/zookeeper*.jar
rm -f debian/tmp/${lib_kite}/lib/hadoop*.jar

ln -s ${lib_zookeeper}/zookeeper.jar debian/tmp/${lib_kite}/lib
ln -s ${lib_hadoop}/client/hadoop-annotations.jar debian/tmp/${lib_kite}/lib
ln -s ${lib_hadoop}/client/hadoop-auth.jar debian/tmp/${lib_kite}/lib
ln -s ${lib_hadoop}/client/hadoop-common.jar debian/tmp/${lib_kite}/lib
ln -s ${lib_hadoop}/client/hadoop-hdfs.jar debian/tmp/${lib_kite}/lib
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit a04eace

Please sign in to comment.