slackbuilder/scripts/hhvm.sh
2020-12-09 18:28:42 +01:00

61 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
VERSION=${VERSION:-4.32.0}
set -e
git clone https://github.com/facebook/hhvm.git
mv hhvm hhvm-$VERSION
cd hhvm-$VERSION
git checkout HHVM-$VERSION
git submodule update --init --recursive
cd third-party
rm -rf libsqlite3 \
lz4 \
pcre
# libzip
cd ..
find -name "\.git*" -print0 | xargs -0 rm -rf
cd ..
tar Jcvf hhvm-$VERSION.tar.xz hhvm-$VERSION
rm -rf hhvm-$VERSION
scp hhvm-$VERSION.tar.xz caraus.de:/srv/httpd/dlackware/download/hosted-sources/hhvm
CHECKSUM=`md5sum hhvm-$VERSION.tar.xz | cut -d ' ' -f 1`
cat <<EOF > hhvm.info
PRGNAM="hhvm"
VERSION="$VERSION"
HOMEPAGE="https://hhvm.com/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://download.dlackware.com/hosted-sources/hhvm/hhvm-${VERSION}.tar.xz"
MD5SUM_x86_64="$CHECKSUM"
REQUIRES="tbb glog dwarf oniguruma libmemcached krb5 lz4 libsodium"
MAINTAINER="Eugene Wissner"
EMAIL="belka@caraus.de"
EOF
rm -f slackbuilds/development/hhvm/*.tar.xz
mv \
hhvm.info \
hhvm-$VERSION.tar.xz \
slackbuilds/development/hhvm/
cd slackbuilds/development/hhvm
# Update version in the SlackBuild.
sed -i "s#^\(VERSION=\)\${VERSION:-.\+#\1\${VERSION:-$VERSION}#" hhvm.SlackBuild
BRANCH="hhvm${VERSION//.}"
git checkout master
git checkout -b $BRANCH
git add .
git commit -m "development/hhvm: Updated for version $VERSION"
#git push origin $BRANCH