Add oil shell
This commit is contained in:
parent
7c35b93f3d
commit
1c4df84810
1 changed files with 67 additions and 0 deletions
67
ap/oil/SlackBuild
Executable file
67
ap/oil/SlackBuild
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=${VERSION:-$(curl -s "https://www.oilshell.org/download/?C=M;O=D" | grep -o "oil-[0-9].*tar.xz" | head -n1 | cut -d\> -f2 | sed 's|^oil-||' | sed 's|.tar.xz$||')}
|
||||
BUILD=1
|
||||
TAG=gwh
|
||||
ARCH=$(uname -m)
|
||||
|
||||
OUTPUT=/tmp
|
||||
TMP=/tmp/$TAG
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
|
||||
PREFIX=/usr
|
||||
|
||||
mkdir -p $TMP
|
||||
cd $TMP
|
||||
|
||||
# Cleaning
|
||||
rm -fr $PRGNAM-${VERSION} $PKG
|
||||
|
||||
# Fetching binaries
|
||||
[ ! -e $CWD/${PRGNAM}-${VERSION}.tar.xz ] && wget -c https://www.oilshell.org/download/${PRGNAM}-${VERSION}.tar.xz -O $CWD/${PRGNAM}-${VERSION}.tar.xz
|
||||
|
||||
tar xvf $CWD/${PRGNAM}-${VERSION}.tar.xz
|
||||
cd ${PRGNAM}-${VERSION}
|
||||
|
||||
# configuration
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--datarootdir=/usr
|
||||
|
||||
make
|
||||
|
||||
DESTDIR=$PKG ./install
|
||||
|
||||
# Cleaning
|
||||
|
||||
find $PKG$PREFIX/man -type f -not -name \*.gz -exec gzip -9 {} \;
|
||||
|
||||
cd $PKG
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Packaging
|
||||
mkdir install
|
||||
cat <<EOF > install/slack-desc
|
||||
$PRGNAM: $PRGNAM (is a new Unix shell)
|
||||
$PRGNAM:
|
||||
$PRGNAM: Oil is a new Unix shell. It's our upgrade path from bash to a better
|
||||
$PRGNAM: language and runtime. It's for Python and JavaScript users who avoid
|
||||
$PRGNAM: shell!
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://www.oilshell.org/
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz
|
Loading…
Reference in a new issue