Commits

Kuan-Chung Huang  committed 97251de

gitolite: Updated for version 3.03

  • Participants
  • Parent commits ab9ff28

Comments (0)

Files changed (3)

File gitolite/doinst.sh

-config() {
-  NEW="$1"
-  OLD="$(dirname $NEW)/$(basename $NEW .new)"
-  if [ ! -r $OLD ]; then
-    mv $NEW $OLD
-  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
-    rm $NEW
-  fi
-}
-

File gitolite/gitolite.SlackBuild

 
 
 PRGNAM=gitolite
-VERSION=${VERSION:-2.3}
+VERSION=${VERSION:-3.03}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}	
 
+SRCNAM=sitaramc-gitolite
+FULL_VERSION=v3.03-32-gfbd7459
+COMMIT_ID=fbd745958e4c42d49d0fa3e82d3235c3129d50b4
+SRCDIR=$SRCNAM-$(echo $COMMIT_ID | cut -b-7)
+
 ARCH=noarch
 
 CWD=$(pwd)
 rm -rf $PKG
 mkdir -p $TMP $PKG $OUTPUT
 cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCDIR
+# Because wget may ignore Content-Disposition header, the downloaded filename
+# may be different. Check that and choose the right filename.
+if [ -r "$CWD/$SRCNAM-$FULL_VERSION.tar.gz" ]; then
+  tar xvf $CWD/$SRCNAM-$FULL_VERSION.tar.gz
+elif [ -r "$CWD/$COMMIT_ID" ]; then
+  tar xvf $CWD/$COMMIT_ID
+fi
+cd $SRCDIR
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;
 
-src/gl-system-install /usr/bin /etc/$PRGNAM /usr/share/$PRGNAM/hooks $PKG || true
+# Change GL_BINDIR variable to correct value
+sed -i 's#$FindBin::RealBin#"/usr/libexec/gitolite"#' src/gitolite
+sed -i 's#$FindBin::RealBin#"/usr/libexec/gitolite"#' src/gitolite-shell
+# Manual installation
+mkdir -p $PKG/usr/bin
+mv src/gitolite $PKG/usr/bin/
+eval $(perl -V:installvendorlib)
+mkdir -p $PKG$installvendorlib
+mv src/lib/Gitolite $PKG$installvendorlib/
+mkdir -p $PKG/usr/libexec
+mv src $PKG/usr/libexec/gitolite
+echo $FULL_VERSION > $PKG/usr/libexec/gitolite/VERSION
 
 if [ "$GITUSER" ]; then
   # Set execution permission to only user or group of $GITUSER
 
 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
 cp -a \
-  doc/*.mkd \
+  doc/*.mkd doc/extras \
   $PKG/usr/doc/$PRGNAM-$VERSION
 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
 
 mkdir -p $PKG/install
 cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-# Add .new extension to all configuration files
-# and add them to doinst.sh
-for file in $(find $PKG/etc/$PRGNAM -type f \( -name "*.rc" -o -name "*.conf" \))
-do
-  mv $file $file.new
-  echo "config ${file#$PKG/}.new" >> $PKG/install/doinst.sh
-done
 
 cd $PKG
 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

File gitolite/gitolite.info

+PRGNAM="gitolite"
+VERSION="3.03"
+HOMEPAGE="https://github.com/sitaramc/gitolite"
+DOWNLOAD="https://github.com/sitaramc/gitolite/tarball/v3.03-32-gfbd7459"
+MD5SUM="8f8fbadc4520d957d598cce4bc13bd1a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Guan-Zhong Huang"
+EMAIL="imprazaguy@gmail.com"
+APPROVED=""