Merge branch 'master' of github.com:cycojesus/slackbuilds

This commit is contained in:
Gwenhael Le Moine 2015-03-03 16:54:19 +01:00
commit 3ce9334a15
2 changed files with 76 additions and 23 deletions

View file

@ -3,7 +3,7 @@
CWD=$(pwd) CWD=$(pwd)
PRGNAM=$(basename $CWD) PRGNAM=$(basename $CWD)
VERSION=git$(date +%Y.%m.%d_%H.%M) VERSION=nightly
BUILD=1 BUILD=1
ARCH=$(uname -m) ARCH=$(uname -m)
@ -21,28 +21,17 @@ PREFIX=/usr
rm -fr $PKG rm -fr $PKG
mkdir -p $TMP $PKG mkdir -p $TMP $PKG
# get sources # get
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES [ "$VERSION" == "nightly" ] && rm $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
if [ -e $REPOSITORIES/$PRGNAM ] ; then [ ! -e $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz ] && wget -c https://static.rust-lang.org/dist/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz -O $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
( cd $REPOSITORIES/$PRGNAM
git pull
)
else
git clone http://github.com/mozilla/rust/ $REPOSITORIES/$PRGNAM
( cd $REPOSITORIES/$PRGNAM
git submodule init
git submodule update
)
fi
cd $TMP cd $TMP
rm -fr $PRGNAM-$VERSION && cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION tar xvf $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
cd $PRGNAM-$VERSION cd rust-nightly-x86_64-unknown-linux-gnu
./configure \ ./install.sh --prefix=$PKG/usr
--prefix=$PREFIX
make echo "${ARCH}" | grep -q -o 64 && mv $PKG/usr/lib $PKG/usr/lib64
make DESTDIR=$PKG install
mv $PKG/usr/share/man $PKG/usr/ mv $PKG/usr/share/man $PKG/usr/
find $PKG/usr/man/ -type f -name \*.\? -exec gzip -9 {} \; find $PKG/usr/man/ -type f -name \*.\? -exec gzip -9 {} \;
@ -50,16 +39,16 @@ cd $PKG
mkdir -p install mkdir -p install
cat <<EOF > install/slack-desc cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (a safe, concurrent, practical language) $PRGNAM: $PRGNAM (a safe, concurrent, practical language)
$PRGNAM: $PRGNAM:
$PRGNAM: Rust is a curly-brace, block-structured expression language. $PRGNAM: Rust is a curly-brace, block-structured expression language.
$PRGNAM: It visually resembles the C language family, but differs significantly in $PRGNAM: It visually resembles the C language family, but differs significantly in
$PRGNAM: syntactic and semantic details. Its design is oriented toward concerns of $PRGNAM: syntactic and semantic details. Its design is oriented toward concerns of
$PRGNAM: “programming in the large”, that is, of creating and maintaining boundaries $PRGNAM: “programming in the large”, that is, of creating and maintaining boundaries
$PRGNAM: both abstract and operational that preserve large-system integrity, $PRGNAM: both abstract and operational that preserve large-system integrity,
$PRGNAM: availability and concurrency. $PRGNAM: availability and concurrency.
$PRGNAM: $PRGNAM:
$PRGNAM: http://www.rust-lang.org/ $PRGNAM: http://www.rust-lang.org/
$PRGNAM: $PRGNAM:
EOF EOF
chown -R root:root * chown -R root:root *
@ -69,4 +58,6 @@ chown -R root:root *
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
[ "$VERSION" == "nightly" ] && VERSION=${VERSION}_$(date +%F | tr - .)
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz

62
d/rustc/rustc.SlackBuild Executable file
View file

@ -0,0 +1,62 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=nightly
BUILD=1
ARCH=$(uname -m)
REPOSITORIES=/home/installs/SlackBuilds/repositories
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
mkdir -p $TMP $PKG
# get sources
[ "$VERSION" == "nightly" ] && rm $CWD/rustc-${VERSION}-src.tar.gz
[ ! -e $CWD/rustc-${VERSION}-src.tar.gz ] && wget -c https://static.rust-lang.org/dist/rustc-${VERSION}-src.tar.gz
cd $TMP
tar xvf $CWD/rustc-${VERSION}-src.tar.gz
cd $PRGNAM-$VERSION
./configure \
--prefix=$PREFIX
make
make DESTDIR=$PKG install
mv $PKG/usr/share/man $PKG/usr/
find $PKG/usr/man/ -type f -name \*.\? -exec gzip -9 {} \;
cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (a safe, concurrent, practical language)
$PRGNAM:
$PRGNAM: Rust is a curly-brace, block-structured expression language.
$PRGNAM: It visually resembles the C language family, but differs significantly in
$PRGNAM: syntactic and semantic details. Its design is oriented toward concerns of
$PRGNAM: “programming in the large”, that is, of creating and maintaining boundaries
$PRGNAM: both abstract and operational that preserve large-system integrity,
$PRGNAM: availability and concurrency.
$PRGNAM:
$PRGNAM: http://www.rust-lang.org/
$PRGNAM:
EOF
chown -R root:root *
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz