diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-12-09 18:28:42 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-12-09 18:28:42 +0100 |
| commit | 2910a89d6c59b997a3896f05c6ad7fb65c26f813 (patch) | |
| tree | 3d3edebdf32b0c972e8449b82be2c10742395d6c /scripts/hhvm.sh | |
| parent | be64bc6dbb9d0f717f7cbdd83d9371de979d4c63 (diff) | |
| download | slackbuilder-2910a89d6c59b997a3896f05c6ad7fb65c26f813.tar.gz | |
Add autoupdater
Diffstat (limited to 'scripts/hhvm.sh')
| -rwxr-xr-x | scripts/hhvm.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/scripts/hhvm.sh b/scripts/hhvm.sh new file mode 100755 index 0000000..5aba70b --- /dev/null +++ b/scripts/hhvm.sh @@ -0,0 +1,60 @@ +#!/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 |
