Permalink
Browse files

Initial attempt at sqoop

  • Loading branch information...
mamash committed Feb 11, 2013
1 parent 59f19fd commit 1a237da4b577451967962d080ba33d99e73b0da6
View
No changes.
View
@@ -0,0 +1,65 @@
+# $NetBSD$
+#
+
+DISTNAME= sqoop-1.4.2
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_APACHE:=sqoop/1.4.2/}
+
+MAINTAINER= filip@joyent.com
+HOMEPAGE= http://sqoop.apache.org
+COMMENT= Efficiently transfer bulk data between Hadoop and structured datastores
+LICENSE= apache-2.0
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+BUILD_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
+BUILD_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
+DEPENDS+= hadoop-[0-9]*:../../joyent/hadoop
+DEENDS+= hbase-[0-9]*:../../joyent/hbase
+
+PYTHON_FOR_BUILD_ONLY= yes
+
+SUBST_CLASSES+= path
+SUBST_STAGE.path= pre-build
+SUBST_MESSAGE.path= Fix paths
+SUBST_FILES.path= build.xml bin/configure-sqoop
+SUBST_VARS.path= PYTHONBIN PREFIX PKG_SYSCONFBASE PKG_SYSCONFDIR
+
+USE_LANGUAGES= # none
+USE_TOOLS= gmake
+
+BUILD_TARGET= package
+
+MAKE_ARGS+= -Dhadoopversion=100
+SQOOP_BUILD_DIR= ${WRKSRC}/build/${PKGNAME_NOREV}.bin__hadoop-1.0.0
+
+PKG_SYSCONFSUBDIR= sqoop
+EXAMPLES= sqoop-env-template.sh sqoop-site-template.xml
+.for file in ${EXAMPLES}
+CONF_FILES+= share/examples/sqoop/${file} ${PKG_SYSCONFDIR}/${file:S/-template//}
+.endfor
+
+INSTALLATION_DIRS= bin share/sqoop share/doc/sqoop share/examples/sqoop
+
+pre-build:
+ ${RM} -f ${WRKSRC}/bin/configure-sqoop.orig
+
+do-build: ant-build
+
+do-install:
+ cd ${SQOOP_BUILD_DIR} && ( \
+ ${PAX} -rw bin ${DESTDIR}${PREFIX}/ ; \
+ ${PAX} -rw lib *.jar ${DESTDIR}${PREFIX}/share/sqoop/ ; \
+ ${PAX} -rw *.txt ${DESTDIR}${PREFIX}/share/doc/sqoop/ )
+ cd ${SQOOP_BUILD_DIR}/docs && ( \
+ ${PAX} -rw man ${DESTDIR}${PREFIX}/ ; \
+ ${PAX} -rw *.html api docbook.css images index.html \
+ ${DESTDIR}${PREFIX}/share/doc/sqoop/ )
+.for file in ${EXAMPLES}
+ ${INSTALL_DATA} ${SQOOP_BUILD_DIR}/conf/${file} \
+ ${DESTDIR}${PREFIX}/share/examples/sqoop/${file}
+.endfor
+
+.include "../../joyent/hadoop/Makefile.common"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
View
@@ -0,0 +1,168 @@
+@comment $NetBSD$
+bin/configure-sqoop
+bin/sqoop
+bin/sqoop-codegen
+bin/sqoop-create-hive-table
+bin/sqoop-eval
+bin/sqoop-export
+bin/sqoop-help
+bin/sqoop-import
+bin/sqoop-import-all-tables
+bin/sqoop-job
+bin/sqoop-list-databases
+bin/sqoop-list-tables
+bin/sqoop-merge
+bin/sqoop-metastore
+bin/sqoop-version
+bin/start-metastore.sh
+bin/stop-metastore.sh
+man/sqoop-codegen.1.gz
+man/sqoop-create-hive-table.1.gz
+man/sqoop-eval.1.gz
+man/sqoop-export.1.gz
+man/sqoop-help.1.gz
+man/sqoop-import-all-tables.1.gz
+man/sqoop-import.1.gz
+man/sqoop-job.1.gz
+man/sqoop-list-databases.1.gz
+man/sqoop-list-tables.1.gz
+man/sqoop-merge.1.gz
+man/sqoop-metastore.1.gz
+man/sqoop-version.1.gz
+man/sqoop.1.gz
+share/doc/sqoop/CHANGELOG.txt
+share/doc/sqoop/COMPILING.txt
+share/doc/sqoop/LICENSE.txt
+share/doc/sqoop/NOTICE.txt
+share/doc/sqoop/README.txt
+share/doc/sqoop/SqoopDevGuide.html
+share/doc/sqoop/SqoopUserGuide.html
+share/doc/sqoop/api/allclasses-frame.html
+share/doc/sqoop/api/allclasses-noframe.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/BigDecimalSerializer.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/BlobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/BooleanParser.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/ClobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/DelimiterSet.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/FieldFormatter.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/FieldMapProcessor.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/FieldMappable.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/JdbcWritableBridge.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/LargeObjectLoader.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/LobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/LobSerializer.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/ProcessingException.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/RecordParser.ParseError.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/RecordParser.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/SqoopRecord.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/BigDecimalSerializer.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/BlobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/BooleanParser.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/ClobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/DelimiterSet.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/FieldFormatter.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/FieldMapProcessor.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/FieldMappable.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/JdbcWritableBridge.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/LargeObjectLoader.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/LobRef.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/LobSerializer.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/ProcessingException.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/RecordParser.ParseError.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/RecordParser.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/class-use/SqoopRecord.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/package-frame.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/package-summary.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/package-tree.html
+share/doc/sqoop/api/com/cloudera/sqoop/lib/package-use.html
+share/doc/sqoop/api/constant-values.html
+share/doc/sqoop/api/deprecated-list.html
+share/doc/sqoop/api/help-doc.html
+share/doc/sqoop/api/index-all.html
+share/doc/sqoop/api/index.html
+share/doc/sqoop/api/org/apache/sqoop/lib/BigDecimalSerializer.html
+share/doc/sqoop/api/org/apache/sqoop/lib/BlobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/BooleanParser.html
+share/doc/sqoop/api/org/apache/sqoop/lib/ClobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/DelimiterSet.html
+share/doc/sqoop/api/org/apache/sqoop/lib/FieldFormatter.html
+share/doc/sqoop/api/org/apache/sqoop/lib/FieldMapProcessor.html
+share/doc/sqoop/api/org/apache/sqoop/lib/FieldMappable.html
+share/doc/sqoop/api/org/apache/sqoop/lib/JdbcWritableBridge.html
+share/doc/sqoop/api/org/apache/sqoop/lib/LargeObjectLoader.html
+share/doc/sqoop/api/org/apache/sqoop/lib/LobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/LobSerializer.html
+share/doc/sqoop/api/org/apache/sqoop/lib/ProcessingException.html
+share/doc/sqoop/api/org/apache/sqoop/lib/RecordParser.ParseError.html
+share/doc/sqoop/api/org/apache/sqoop/lib/RecordParser.html
+share/doc/sqoop/api/org/apache/sqoop/lib/SqoopRecord.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/BigDecimalSerializer.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/BlobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/BooleanParser.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/ClobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/DelimiterSet.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/FieldFormatter.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/FieldMapProcessor.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/FieldMappable.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/JdbcWritableBridge.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/LargeObjectLoader.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/LobRef.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/LobSerializer.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/ProcessingException.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/RecordParser.ParseError.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/RecordParser.html
+share/doc/sqoop/api/org/apache/sqoop/lib/class-use/SqoopRecord.html
+share/doc/sqoop/api/org/apache/sqoop/lib/package-frame.html
+share/doc/sqoop/api/org/apache/sqoop/lib/package-summary.html
+share/doc/sqoop/api/org/apache/sqoop/lib/package-tree.html
+share/doc/sqoop/api/org/apache/sqoop/lib/package-use.html
+share/doc/sqoop/api/overview-frame.html
+share/doc/sqoop/api/overview-summary.html
+share/doc/sqoop/api/overview-tree.html
+share/doc/sqoop/api/serialized-form.html
+share/doc/sqoop/api/stylesheet.css
+share/doc/sqoop/docbook.css
+share/doc/sqoop/images/README
+share/doc/sqoop/images/callouts/1.png
+share/doc/sqoop/images/callouts/10.png
+share/doc/sqoop/images/callouts/11.png
+share/doc/sqoop/images/callouts/12.png
+share/doc/sqoop/images/callouts/13.png
+share/doc/sqoop/images/callouts/14.png
+share/doc/sqoop/images/callouts/15.png
+share/doc/sqoop/images/callouts/2.png
+share/doc/sqoop/images/callouts/3.png
+share/doc/sqoop/images/callouts/4.png
+share/doc/sqoop/images/callouts/5.png
+share/doc/sqoop/images/callouts/6.png
+share/doc/sqoop/images/callouts/7.png
+share/doc/sqoop/images/callouts/8.png
+share/doc/sqoop/images/callouts/9.png
+share/doc/sqoop/images/caution.png
+share/doc/sqoop/images/example.png
+share/doc/sqoop/images/home.png
+share/doc/sqoop/images/important.png
+share/doc/sqoop/images/next.png
+share/doc/sqoop/images/note.png
+share/doc/sqoop/images/prev.png
+share/doc/sqoop/images/tip.png
+share/doc/sqoop/images/up.png
+share/doc/sqoop/images/warning.png
+share/doc/sqoop/index.html
+share/doc/sqoop/${PKGNAME}.releasenotes.html
+share/examples/sqoop/sqoop-env-template.sh
+share/examples/sqoop/sqoop-site-template.xml
+share/sqoop/lib/ant-contrib-1.0b3.jar
+share/sqoop/lib/ant-eclipse-1.0-jvm1.2.jar
+share/sqoop/lib/avro-1.5.3.jar
+share/sqoop/lib/avro-ipc-1.5.3.jar
+share/sqoop/lib/avro-mapred-1.5.3.jar
+share/sqoop/lib/commons-io-1.4.jar
+share/sqoop/lib/hsqldb-1.8.0.10.jar
+share/sqoop/lib/jackson-core-asl-1.7.3.jar
+share/sqoop/lib/jackson-mapper-asl-1.7.3.jar
+share/sqoop/lib/jopt-simple-3.2.jar
+share/sqoop/lib/paranamer-2.3.jar
+share/sqoop/lib/snappy-java-1.0.3.2.jar
+share/sqoop/${PKGNAME}.jar
+share/sqoop/sqoop-test-${PKGVERSION}.jar
View
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (sqoop-1.4.2.tar.gz) = 7fd16e134952fab77de8eb98dacd6e4170c9274d
+RMD160 (sqoop-1.4.2.tar.gz) = 70ff04dd8bf15d1295a9f48fb39d8942ca4efbe9
+Size (sqoop-1.4.2.tar.gz) = 746101 bytes
+SHA1 (patch-bin_configure-sqoop) = cc168fefc67521401681e0cc1bee3357f1242879
+SHA1 (patch-build.xml) = 8572d27d50bf507e66f6e2f292c04eebdd244867
+SHA1 (patch-src_scripts_create-tool-scripts.sh) = a70cb4fc4cf97b0939ed03e20235b1fbf44adbc3
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- bin/configure-sqoop.orig 2012-08-14 11:21:52.000000000 +0000
++++ bin/configure-sqoop
+@@ -29,10 +29,10 @@ if [ -z "${bin}" ]; then
+ fi
+
+ if [ -z "$SQOOP_HOME" ]; then
+- export SQOOP_HOME=${bin}/..
++ export SQOOP_HOME=@PREFIX@/share/sqoop
+ fi
+
+-SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-${SQOOP_HOME}/conf}
++SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-@PKG_SYSCONFDIR@}
+
+ if [ -f "${SQOOP_CONF_DIR}/sqoop-env.sh" ]; then
+ . "${SQOOP_CONF_DIR}/sqoop-env.sh"
+@@ -41,10 +41,10 @@ fi
+ # Find paths to our dependency systems. If they are unset, use CDH defaults.
+
+ if [ -z "${HADOOP_HOME}" ]; then
+- HADOOP_HOME=/usr/lib/hadoop
++ HADOOP_HOME=@PREFIX@
+ fi
+ if [ -z "${HBASE_HOME}" ]; then
+- HBASE_HOME=/usr/lib/hbase
++ HBASE_HOME=@PREFIX@
+ fi
+
+ # Check: If we can't find our dependencies, give up here.
+@@ -90,7 +90,7 @@ if [ -e "$HBASE_HOME/bin/hbase" ]; then
+ SQOOP_CLASSPATH=${TMP_SQOOP_CLASSPATH}
+ fi
+
+-ZOOCFGDIR=${ZOOCFGDIR:-/etc/zookeeper}
++ZOOCFGDIR=${ZOOCFGDIR:-@PKG_SYSCONFBASE@/zookeeper}
+ if [ -d "${ZOOCFGDIR}" ]; then
+ SQOOP_CLASSPATH=$ZOOCFGDIR:$SQOOP_CLASSPATH
+ fi
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build.xml.orig 2012-08-14 11:21:52.000000000 +0000
++++ build.xml
+@@ -111,7 +111,7 @@
+ <property name="git.hash" value="" />
+
+ <!-- programs used -->
+- <property name="python" value="python" />
++ <property name="python" value="@PYTHONBIN@" />
+
+ <!-- locations in the source tree -->
+ <property name="base.src.dir" location="${basedir}/src" />
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/scripts/create-tool-scripts.sh.orig 2012-08-14 11:21:53.000000000 +0000
++++ src/scripts/create-tool-scripts.sh
+@@ -76,6 +76,7 @@ for p in $subprograms; do
+ target="${outdir}/sqoop-${p}"
+ cp "${template}" "${target}"
+ chmod +x "${target}"
+- sed -i -e "s/SUBCOMMANDMARKER/$p/" "${target}"
++ sed -e "s/SUBCOMMANDMARKER/$p/" "${target}" > "${target}.tmp" && \
++ mv "${target}.tmp" "${target}"
+ done
+

0 comments on commit 1a237da

Please sign in to comment.