package a fix tag as the master branch often breaks as it's using maven snapshot artifacts :/
This commit is contained in:
parent
aebafcb22b
commit
84e707ce3e
1 changed files with 34 additions and 37 deletions
|
@ -1,62 +1,60 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
# variables
|
||||
VERSION=master_$(date +"%Y.%m.%d_%H.%M")
|
||||
BUILD=1
|
||||
VERSION=${VERSION:=$(date +"%Y.%m.%d_%H.%M")}
|
||||
BUILD=${BUILD:=1}
|
||||
GIT_TAG=${GIT_TAG:=1.4.0}
|
||||
|
||||
|
||||
TAG=cyco
|
||||
OUTPUT=/tmp
|
||||
TAG=${TAG:=cyco}
|
||||
OUTPUT=${OUTPUT:=/tmp}
|
||||
TMP=/tmp/$TAG
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
PKG=${PKG:=$TMP/pkg-$PRGNAM}
|
||||
|
||||
ARCH=$(uname -m)
|
||||
ARCH=${ARCH:=java}
|
||||
|
||||
REPOSITORY=/home/cycojesus/projets/packages/repositories/$PRGNAM
|
||||
PREFIX=/usr
|
||||
REPOSITORY=${REPOSITORY:=/home/cycojesus/projets/packages/repositories/$PRGNAM}
|
||||
PREFIX=${PREFIX:=/usr}
|
||||
|
||||
EMACS=$(basename $(ls /usr/bin/emacs-2*))
|
||||
EMACS_VERSION=$(echo "$EMACS" | grep -o "\-[0-9\.]*\-" | tr -d - | head -n1)
|
||||
|
||||
# mise en place
|
||||
mkdir -p $TMP/
|
||||
cd $TMP
|
||||
if [ ! -e $REPOSITORY ] ; then
|
||||
git clone "http://github.com/espenhw/malabar-mode.git" $REPOSITORY
|
||||
else
|
||||
( cd $REPOSITORY
|
||||
git pull
|
||||
)
|
||||
fi
|
||||
|
||||
# nettoyage préalable
|
||||
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
||||
rm -fr $PKG $TMP/$PRGNAM*
|
||||
|
||||
mkdir -p $PKG
|
||||
|
||||
# mise en place
|
||||
cd $TMP
|
||||
if [ ! -e $REPOSITORY ] ; then
|
||||
mkdir -p $(dirname $REPOSITORY)
|
||||
cd $(dirname $REPOSITORY)
|
||||
git clone "http://github.com/espenhw/malabar-mode.git" $PRGNAM
|
||||
fi
|
||||
|
||||
( cd $REPOSITORY
|
||||
git pull
|
||||
)
|
||||
|
||||
mkdir -p $TMP/
|
||||
cp -R $REPOSITORY $TMP/
|
||||
( cd $TMP/$PRGNAM
|
||||
mvn package -Dmaven.skip.test=true
|
||||
)
|
||||
cd $TMP/$PRGNAM
|
||||
if [ "x$GIT_TAG" != "x" ]; then
|
||||
git checkout malabar-$GIT_TAG
|
||||
VERSION=$GIT_TAG
|
||||
fi
|
||||
mvn package -Dmaven.skip.test=true
|
||||
|
||||
mkdir -p $PKG$PREFIX/share/emacs/site-lisp
|
||||
( cd $PKG$PREFIX/share/emacs/site-lisp
|
||||
unzip $TMP/$PRGNAM/target/malabar-*-dist.zip
|
||||
ln -s malabar-* malabar
|
||||
( cd malabar
|
||||
chmod -x COPYING.txt README.md
|
||||
)
|
||||
)
|
||||
cd $PKG$PREFIX/share/emacs/site-lisp
|
||||
unzip $TMP/$PRGNAM/target/malabar-*-dist.zip
|
||||
ln -s malabar-* malabar
|
||||
cd malabar
|
||||
chmod -x COPYING.txt README.md
|
||||
|
||||
# correction
|
||||
( cd $PKG
|
||||
chown -R root:root *
|
||||
)
|
||||
cd $PKG
|
||||
chown -R root:root *
|
||||
|
||||
# embaumement
|
||||
mkdir -p $PKG/install
|
||||
|
@ -84,5 +82,4 @@ $PRGNAM:
|
|||
EOF
|
||||
|
||||
# empaquetage
|
||||
cd $PKG
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||
|
|
Loading…
Reference in a new issue