emstar is now in marmalade
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
116dfbdce2
commit
72cbaa6d28
2 changed files with 44 additions and 48 deletions
|
@ -4,7 +4,6 @@
|
||||||
VERSION=hg$(date +"%Y.%m.%d_%H.%M")
|
VERSION=hg$(date +"%Y.%m.%d_%H.%M")
|
||||||
BUILD=1
|
BUILD=1
|
||||||
|
|
||||||
|
|
||||||
TAG=cyco
|
TAG=cyco
|
||||||
OUTPUT=/tmp
|
OUTPUT=/tmp
|
||||||
TMP=/tmp/$TAG
|
TMP=/tmp/$TAG
|
||||||
|
@ -27,7 +26,7 @@ mkdir -p $PKG
|
||||||
cd $TMP
|
cd $TMP
|
||||||
if [ ! -e $REPOSITORY ] ; then
|
if [ ! -e $REPOSITORY ] ; then
|
||||||
mkdir -p $(dirname $REPOSITORY)
|
mkdir -p $(dirname $REPOSITORY)
|
||||||
hg clone -r release https://go.googlecode.com/hg/ $(dirname $REPOSITORY)/$PRGNAM
|
hg clone -r release https://code.google.com/p/go/ $(dirname $REPOSITORY)/$PRGNAM
|
||||||
else
|
else
|
||||||
( cd $REPOSITORY
|
( cd $REPOSITORY
|
||||||
hg pull -u
|
hg pull -u
|
||||||
|
@ -36,45 +35,45 @@ fi
|
||||||
|
|
||||||
mkdir -p $PKG$PREFIX/libexec/ $PREFIX/libexec/
|
mkdir -p $PKG$PREFIX/libexec/ $PREFIX/libexec/
|
||||||
cp -R $REPOSITORY $PREFIX/libexec/
|
cp -R $REPOSITORY $PREFIX/libexec/
|
||||||
( cd $PREFIX/libexec/$PRGNAM
|
cd $PREFIX/libexec/$PRGNAM
|
||||||
GOROOT=$(pwd)
|
GOROOT=$(pwd)
|
||||||
GOBIN=$GOROOT/bin
|
GOBIN=$GOROOT/bin
|
||||||
GOOS=linux
|
GOOS=linux
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
x86_64)
|
x86_64)
|
||||||
GOARCH=amd64
|
GOARCH=amd64
|
||||||
;;
|
;;
|
||||||
"i?86")
|
"i?86")
|
||||||
GOARCH=386
|
GOARCH=386
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
GOARCH=arm
|
GOARCH=arm
|
||||||
esac
|
esac
|
||||||
mkdir -p $GOBIN
|
mkdir -p $GOBIN
|
||||||
find $GOROOT -name ".hg*" -exec rm -fr {} \;
|
find $GOROOT -name ".hg*" -exec rm -fr {} \;
|
||||||
cd $GOROOT/src
|
cd $GOROOT/src
|
||||||
GOROOT=$GOROOT GOBIN=$GOBIN GOOS=$GOOS GOARCH=$GOARCH bash ./all.bash
|
GOROOT=$GOROOT GOBIN=$GOBIN GOOS=$GOOS GOARCH=$GOARCH bash ./all.bash
|
||||||
|
|
||||||
mv $PREFIX/libexec/$PRGNAM $PKG$PREFIX/libexec/
|
mv $PREFIX/libexec/$PRGNAM $PKG$PREFIX/libexec/
|
||||||
|
|
||||||
( cd misc/emacs
|
( cd misc/emacs
|
||||||
find . -type f -name \*.el -exec emacs -batch -f batch-byte-compile {} \;
|
find . -type f -name \*.el -exec emacs -batch -f batch-byte-compile {} \;
|
||||||
)
|
)
|
||||||
|
|
||||||
mkdir -p $PKG$PREFIX/bin
|
|
||||||
( cd $PKG$PREFIX/bin
|
|
||||||
for i in ../libexec/$PRGNAM/bin/* ; do
|
|
||||||
ln -s $i ;
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/
|
mkdir -p $PKG$PREFIX/bin
|
||||||
( cd $PKG$PREFIX/share/emacs/site-lisp/
|
( cd $PKG$PREFIX/bin
|
||||||
ln -s ../../../libexec/$PRGNAM/misc/emacs golang
|
for i in ../libexec/$PRGNAM/bin/* ; do
|
||||||
)
|
ln -s $i ;
|
||||||
|
done
|
||||||
mkdir -p $PKG/etc/profile.d
|
)
|
||||||
cat <<EOF > $PKG/etc/profile.d/go.sh
|
|
||||||
|
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/
|
||||||
|
( cd $PKG$PREFIX/share/emacs/site-lisp/
|
||||||
|
ln -s ../../../libexec/$PRGNAM/misc/emacs golang
|
||||||
|
)
|
||||||
|
|
||||||
|
mkdir -p $PKG/etc/profile.d
|
||||||
|
cat <<EOF > $PKG/etc/profile.d/go.sh
|
||||||
GOROOT=$PREFIX/libexec/$PRGNAM
|
GOROOT=$PREFIX/libexec/$PRGNAM
|
||||||
GOBIN=\$GOROOT/bin
|
GOBIN=\$GOROOT/bin
|
||||||
GOOS=linux
|
GOOS=linux
|
||||||
|
@ -91,20 +90,18 @@ esac
|
||||||
|
|
||||||
export GOROOT GOBIN GOOS GOARCH
|
export GOROOT GOBIN GOOS GOARCH
|
||||||
EOF
|
EOF
|
||||||
chmod +x $PKG/etc/profile.d/go.sh
|
chmod +x $PKG/etc/profile.d/go.sh
|
||||||
|
|
||||||
mkdir -p $PKG$PREFIX/doc
|
mkdir -p $PKG$PREFIX/doc
|
||||||
( cd $PKG$PREFIX/doc
|
( cd $PKG$PREFIX/doc
|
||||||
ln -s ../libexec/$PRGNAM/doc $PRGNAM-$VERSION
|
ln -s ../libexec/$PRGNAM/doc $PRGNAM-$VERSION
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# correction
|
# correction
|
||||||
( cd $PKG
|
cd $PKG
|
||||||
chown -R root:root *
|
chown -R root:root *
|
||||||
|
|
||||||
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
||||||
)
|
|
||||||
|
|
||||||
# embaumement
|
# embaumement
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
|
@ -131,5 +128,4 @@ $PRGNAM: http://golang.org/
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# empaquetage
|
# empaquetage
|
||||||
cd $PKG
|
|
||||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||||
|
|
Loading…
Add table
Reference in a new issue