incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1388735 - in /incubator/bigtop/trunk/bigtop-packages/src: common/pig/install_pig.sh deb/pig/rules rpm/pig/SPECS/pig.spec
Date Sat, 22 Sep 2012 05:53:40 GMT
Author: bmahe
Date: Sat Sep 22 05:53:39 2012
New Revision: 1388735

URL: http://svn.apache.org/viewvc?rev=1388735&view=rev
Log:
BIGTOP-704. Make variables used in pig build/install scripts consistent  (Anatoli Fomenko
via Bruno Mahé)

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/pig/install_pig.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/pig/rules
    incubator/bigtop/trunk/bigtop-packages/src/rpm/pig/SPECS/pig.spec

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/pig/install_pig.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/pig/install_pig.sh?rev=1388735&r1=1388734&r2=1388735&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/pig/install_pig.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/pig/install_pig.sh Sat Sep 22 05:53:39
2012
@@ -92,31 +92,30 @@ for var in PREFIX BUILD_DIR ; do
   fi
 done
 
-MAN_DIR=$PREFIX/usr/share/man/man1
-DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/pig}
-LIB_DIR=${LIB_DIR:-$PREFIX/usr/lib/pig}
+MAN_DIR=/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-/usr/share/doc/pig}
+LIB_DIR=${LIB_DIR:-/usr/lib/pig}
 INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/pig}
 EXAMPLES_DIR=${EXAMPLES_DIR:-$DOC_DIR/examples}
-BIN_DIR=${BIN_DIR:-$PREFIX/usr/bin}
-CONF_DIR=/etc/pig
+BIN_DIR=${BIN_DIR:-/usr/bin}
 CONF_DIST_DIR=/etc/pig/conf.dist
 
 # First we'll move everything into lib
-install -d -m 0755 $LIB_DIR
-(cd $BUILD_DIR/tar/pig* && tar -cf - .) | (cd $LIB_DIR && tar -xf -)
+install -d -m 0755 $PREFIX/$LIB_DIR
+(cd $BUILD_DIR/tar/pig* && tar -cf - .) | (cd $PREFIX/$LIB_DIR && tar -xf
-)
 
 # Salavage a few files from the contrib &co
-find $LIB_DIR/contrib -name \*.jar -exec cp {} $LIB_DIR \;
-cp $BUILD_DIR/pig-*-smoketests.jar $LIB_DIR/
+find $PREFIX/$LIB_DIR/contrib -name \*.jar -exec cp {} $PREFIX/$LIB_DIR \;
+cp $BUILD_DIR/pig-*-smoketests.jar $PREFIX/$LIB_DIR/
 
 # Remove directories that are going elsewhere
 for dir in shims conf src lib-src docs tutorial test build.xml contrib ivy pig-*.stage.jar
ivy.xml build.properties
 do
-   rm -rf $LIB_DIR/$dir
+   rm -rf $PREFIX/$LIB_DIR/$dir
 done
 
 # Remove a fat JAR that contains system Hadoop dependencies
-for jar in $LIB_DIR/pig*.jar ; do
+for jar in $PREFIX/$LIB_DIR/pig*.jar ; do
   if jar tvf $jar | fgrep -q ' org/apache/hadoop/hdfs' ; then
     rm -f $jar
   fi
@@ -125,11 +124,11 @@ done
 # Copy in the configuration files
 install -d -m 0755 $PREFIX/$CONF_DIST_DIR
 cp *.properties $PREFIX/$CONF_DIST_DIR
-ln -s /etc/pig/conf $LIB_DIR/conf
+ln -s /etc/pig/conf $PREFIX/$LIB_DIR/conf
 
 # Copy in the /usr/bin/pig wrapper
-install -d -m 0755 $BIN_DIR
-cat > $BIN_DIR/pig <<EOF
+install -d -m 0755 $PREFIX/$BIN_DIR
+cat > $PREFIX/$BIN_DIR/pig <<EOF
 #!/bin/sh
 
 # Autodetect JAVA_HOME if not defined
@@ -148,24 +147,24 @@ fi
 
 exec $INSTALLED_LIB_DIR/bin/pig "\$@"
 EOF
-chmod 755 $BIN_DIR/pig
+chmod 755 $PREFIX/$BIN_DIR/pig
 
-install -d -m 0755 $MAN_DIR
-gzip -c pig.1 > $MAN_DIR/pig.1.gz
+install -d -m 0755 $PREFIX/$MAN_DIR
+gzip -c pig.1 > $PREFIX/$MAN_DIR/pig.1.gz
 
 # Copy in the docs
-install -d -m 0755 $DOC_DIR
-(cd $BUILD_DIR/tar/pig*/docs && tar -cf - .)|(cd $DOC_DIR && tar -xf -)
-mv $LIB_DIR/license $DOC_DIR
-
-install -d -m 0755 $EXAMPLES_DIR
-(cd $LIB_DIR ; ln -s pig*withouthadoop.jar pig.jar)
-(cd $BUILD_DIR/tar/pig*/tutorial && tar -cf - .)|(cd $EXAMPLES_DIR && tar
-xf -)
-sed -i -e "s|../pig.jar|/usr/lib/pig/pig.jar|" $EXAMPLES_DIR/build.xml
+install -d -m 0755 $PREFIX/$DOC_DIR
+(cd $BUILD_DIR/tar/pig*/docs && tar -cf - .)|(cd $PREFIX/$DOC_DIR && tar
-xf -)
+mv $PREFIX/$LIB_DIR/license $PREFIX/$DOC_DIR
+
+install -d -m 0755 $PREFIX/$EXAMPLES_DIR
+(cd $PREFIX/$LIB_DIR ; ln -s pig*withouthadoop.jar pig.jar)
+(cd $BUILD_DIR/tar/pig*/tutorial && tar -cf - .)|(cd $PREFIX/$EXAMPLES_DIR &&
tar -xf -)
+sed -i -e "s|../pig.jar|/usr/lib/pig/pig.jar|" $PREFIX/$EXAMPLES_DIR/build.xml
 
 # It's somewhat silly that the hadoop jars are included in the pig lib
 # dir, since we depend on hadoop in our packages. We can rm them
-rm -f $LIB_DIR/lib/hadoop*jar
+rm -f $PREFIX/$LIB_DIR/lib/hadoop*jar
 
 # Pig log directory
 install -d -m 1777 $PREFIX/var/log/pig

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/pig/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/pig/rules?rev=1388735&r1=1388734&r2=1388735&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/pig/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/pig/rules Sat Sep 22 05:53:39 2012
@@ -53,8 +53,8 @@ install-indep:	
 	sh -x debian/install_pig.sh \
 	  --build-dir=build \
 	  --prefix=debian/${pig_pkg_name} \
-          --doc-dir=debian/${pig_pkg_name}/usr/share/doc/${pig_pkg_name} \
-          --examples-dir=debian/${pig_pkg_name}/usr/share/doc/${pig_pkg_name}/examples
+          --doc-dir=/usr/share/doc/${pig_pkg_name} \
+          --examples-dir=/usr/share/doc/${pig_pkg_name}/examples
 
 	dh_install -i
 	(dh_lintian) || /bin/true

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/pig/SPECS/pig.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/pig/SPECS/pig.spec?rev=1388735&r1=1388734&r2=1388735&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/pig/SPECS/pig.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/pig/SPECS/pig.spec Sat Sep 22 05:53:39
2012
@@ -125,7 +125,7 @@ cp $RPM_SOURCE_DIR/pig.1 .
 cp $RPM_SOURCE_DIR/pig.properties .
 sh -x %{SOURCE2} \
           --build-dir=build \
-          --doc-dir=$RPM_BUILD_ROOT%{doc_pig} \
+          --doc-dir=%{doc_pig} \
           --prefix=$RPM_BUILD_ROOT
 
 %pre



Mime
View raw message