[d/crystalline-bin] added
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
db16ae0e36
commit
7ef26cb36c
1 changed files with 62 additions and 0 deletions
62
d/crystalline-bin/SlackBuild
Executable file
62
d/crystalline-bin/SlackBuild
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/elbywan/crystalline/tags | jq -r '.[0].name')}
|
||||
ARCH=$(uname -m)
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-gwh}
|
||||
TMP=${TMP:-/tmp/$TAG}
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
|
||||
|
||||
mkdir -p $REPOSITORY
|
||||
|
||||
[ ! -e $REPOSITORY/crystalline_x86_64-unknown-linux-gnu-${VERSION}.gz ] && wget -c -O $REPOSITORY/crystalline_x86_64-unknown-linux-gnu-${VERSION}.gz https://github.com/elbywan/crystalline/releases/download/${VERSION}/crystalline_x86_64-unknown-linux-gnu.gz
|
||||
|
||||
DOCS="LICENSE README.md"
|
||||
for i in $DOCS; do
|
||||
[ ! -e $REPOSITORY/${i}-${VERSION} ] && wget -c -O $REPOSITORY/${i}-${VERSION} https://raw.githubusercontent.com/elbywan/crystalline/${VERSION}/$i
|
||||
done
|
||||
|
||||
rm -fr $PKG
|
||||
mkdir -p $PKG/usr/{bin,doc/crystalline}/
|
||||
|
||||
cp $REPOSITORY/crystalline_x86_64-unknown-linux-gnu-${VERSION}.gz $PKG/usr/bin/
|
||||
gunzip $PKG/usr/bin/crystalline_x86_64-unknown-linux-gnu-${VERSION}.gz
|
||||
mv $PKG/usr/bin/crystalline_x86_64-unknown-linux-gnu-${VERSION} $PKG/usr/bin/crystalline
|
||||
chmod +x $PKG/usr/bin/crystalline
|
||||
|
||||
for i in $DOCS; do
|
||||
cp $REPOSITORY/${i}-${VERSION} $PKG/usr/doc/crystalline/$i
|
||||
done
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
$PRGNAM: $PRGNAM (A Language Server Protocol implementation for Crystal.)
|
||||
$PRGNAM:
|
||||
$PRGNAM: Crystalline is an implementation of the Language Server Protocol written in and
|
||||
$PRGNAM: for the Crystal Language. It aims to provide limited language features (like go-to,
|
||||
$PRGNAM: autocompletion, syntax and semantic checking) and ease development with any
|
||||
$PRGNAM: compatible code editor.
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: https://github.com/elbywan/crystalline
|
||||
EOF
|
||||
|
||||
cd $PKG
|
||||
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
||||
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-$(echo ${VERSION} | tr - _)-${ARCH}-${BUILD}${TAG}.txz
|
Loading…
Reference in a new issue