Permalink
Browse files

Debian support

  • Loading branch information...
1 parent da871d3 commit c26191e84482b911bfb141fa51c5e613a21896ca @toddlipcon committed Oct 21, 2009
Showing with 146 additions and 5 deletions.
  1. +5 −0 debian/changelog
  2. +1 −0 debian/compat
  3. +15 −0 debian/control
  4. +11 −0 debian/copyright
  5. +2 −0 debian/dirs
  6. +1 −0 debian/docs
  7. +89 −0 debian/rules
  8. +22 −5 run.sh
View
@@ -0,0 +1,5 @@
+hadoop-gpl-compression (0.2.0svn46~unbuilt-1) UNRELEASED; urgency=low
+
+ * Initial release
+
+ -- Todd Lipcon <todd@cloudera.com> Tue, 20 Oct 2009 19:42:33 -0700
View
@@ -0,0 +1 @@
+5
View
@@ -0,0 +1,15 @@
+Source: hadoop-gpl-compression
+Section: devel
+Priority: extra
+Maintainer: Todd Lipcon <todd@cloudera.com>
+Build-Depends: debhelper (>= 5), sun-java6-jdk, liblzo2-dev, ant
+Standards-Version: 3.8.0
+Homepage: http://code.google.com/p/hadoop-gpl-compression/
+
+Package: hadoop-gpl-compression
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: GPL compression libraries for Hadoop
+ Hadoop can use some compression libraries like LZO that are released
+ under a GPL license. GPL is not compatible with the Apache license.
+ This package installs those libraries into hadoop so they are usable.
View
@@ -0,0 +1,11 @@
+This package was debianized by Todd Lipcon <todd@cloudera.com> on
+Tue, 20 Oct 2009 19:17:38 -0700.
+
+It was checked out of SVN from http://code.google.com/p/hadoop-gpl-compression/
+
+License:
+
+ GPLv3 - /usr/share/common-licenses/GPL-3
+
+The Debian packaging is copyright 2009, Todd Lipcon <todd@cloudera.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'.
View
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
View
@@ -0,0 +1 @@
+CHANGES.txt
View
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+VERSION=$(shell dpkg-parsechangelog | grep Version | head -1 | awk '{print $$2}')
+
+DESTDIR=$(CURDIR)/debian/hadoop-gpl-compression
+NAME_VER=hadoop-gpl-compression-$(VERSION)
+HADOOP_HOME=/usr/lib/hadoop
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ JAVA_HOME=/usr/lib/jvm/java-6-sun ant -Dversion=$(VERSION) compile-native package
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ ant clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+
+ mkdir -p $(DESTDIR)/$(HADOOP_HOME)/lib
+ install -m644 $(CURDIR)/build/$(NAME_VER).jar $(DESTDIR)/$(HADOOP_HOME)/lib/
+ install -m644 $(CURDIR)/build/$(NAME_VER).jar $(DESTDIR)/$(HADOOP_HOME)/lib/
+ rsync -av $(CURDIR)/build/$(NAME_VER)/lib/native/ $(DESTDIR)/$(HADOOP_HOME)/lib/native/
+
+
+# Build architecture-independent files here.
+binary-indep: install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs CHANGES.txt
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
View
@@ -13,18 +13,18 @@ RELEASE=${RELEASE:-1}
# End configurables
##############################
-BINDIR=$(dirname $0)
+BINDIR=$(readlink -f $(dirname $0))
TOPDIR=$BINDIR/build/topdir
SVNCO=$BINDIR/hadoop-gpl-compression-$VERSION
-SVNTAR=$BINDIR/hadoop-gpl-compression-$VERSION.tar.gz
+SVNTAR=$BINDIR/build/hadoop-gpl-compression-$VERSION.tar.gz
if [ ! -d $SVNCO ]; then
svn export -r $SVN_REV $SVNURL $SVNCO
fi
if [ ! -e $SVNTAR ]; then
- tar czf $SVNTAR $SVNCO
+ (cd $SVNCO && cd .. && tar czf $SVNTAR $(basename $SVNCO))
fi
@@ -41,7 +41,7 @@ echo "SVN Revision: $SVN_REV"
##############################
# RPM
##############################
-
+if [ -z "$SKIP_RPM" ]; then
rm -Rf $TOPDIR
mkdir -p $TOPDIR
@@ -62,8 +62,25 @@ rpmbuild $RPMBUILD_FLAGS \
--buildroot $(pwd)/../BUILDROOT \
--define "_topdir $(pwd)/.." \
-ba hadoop-gpl-compression.spec
+popd
+fi
##############################
# Deb
##############################
-# COMING SOON!
+if [ -z "$SKIP_DEB"]; then
+DEB_DIR=$BINDIR/build/deb
+mkdir -p $DEB_DIR
+rm -Rf $DEB_DIR
+
+mkdir $DEB_DIR
+cp -a $SVNTAR $DEB_DIR/hadoop-gpl-compression_$VERSION.orig.tar.gz
+pushd $DEB_DIR
+tar xzf *.tar.gz
+cp -a $BINDIR/debian/ hadoop-gpl-compression-$VERSION
+pushd hadoop-gpl-compression-$VERSION
+
+dch -D $(lsb_release -cs) --newversion $VERSION-$RELEASE "Local automatic build"
+debuild -uc -us -sa
+
+fi

0 comments on commit c26191e

Please sign in to comment.