diff options
author | Marcel Radzio | 2019-03-27 20:09:25 +0100 |
---|---|---|
committer | Marcel Radzio | 2019-03-27 20:11:59 +0100 |
commit | 3c6299ed3feb5bb039259913b06ec7195afa05cb (patch) | |
tree | dd705c13663c57f6f88c44fa5b87c6f3c40dfe60 | |
parent | b840ec8db6c3f592d85578f70aa9fb77f1d4ebf3 (diff) | |
download | aur-3c6299ed3feb5bb039259913b06ec7195afa05cb.tar.gz |
Update to newest version and new building instructions
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rwxr-xr-x | fetch-develop.deps.sh | 110 |
3 files changed, 129 insertions, 20 deletions
@@ -1,13 +1,14 @@ pkgbase = riot-desktop-git pkgdesc = A glossy Matrix collaboration client for the desktop. - pkgver = v0.16.5.r26.gf69869ac - pkgrel = 2 + pkgver = v1.0.5.r56.ga8e49496 + pkgrel = 1 url = https://riot.im arch = any license = Apache makedepends = git - makedepends = npm + makedepends = nodejs makedepends = jq + makedepends = yarn depends = electron provides = riot-desktop conflicts = riot-desktop @@ -16,9 +17,11 @@ pkgbase = riot-desktop-git source = riot-desktop-git::git://github.com/vector-im/riot-web.git#branch=develop source = riot-desktop.desktop source = riot-desktop.sh + source = fetch-develop.deps.sh sha256sums = SKIP sha256sums = ae0654027f0646178961f6397322aefdc817d052625772dd297d636fe9726aff sha256sums = 0f8d896793e6f6f677febb5921b2256c9786fad67294cb32efd6d059ed21e04c + sha256sums = 9e157d4c5c958c4bf7aa5de43919a2017f4a850f8171a46786b306531c8b03b0 pkgname = riot-desktop-git @@ -1,28 +1,29 @@ # Maintainer: Marcel Radzio <info@nordgedanken.de> pkgbase=riot-desktop-git -pkgver=v0.16.5.r26.gf69869ac -pkgrel=2 +pkgver=v1.0.5.r56.ga8e49496 +pkgrel=1 pkgname=riot-desktop-git pkgdesc="A glossy Matrix collaboration client for the desktop." arch=('any') url="https://riot.im" license=('Apache') depends=('electron') -makedepends=('git' 'npm' 'jq') +makedepends=('git' 'nodejs' 'jq' 'yarn') conflicts=('riot-desktop' 'riot-web') provides=('riot-desktop') backup=("etc/riot/config.json") source=('riot-desktop-git::git://github.com/vector-im/riot-web.git#branch=develop' "riot-desktop.desktop" - "riot-desktop.sh") + "riot-desktop.sh" + "fetch-develop.deps.sh") sha256sums=('SKIP' - 'ae0654027f0646178961f6397322aefdc817d052625772dd297d636fe9726aff' - '0f8d896793e6f6f677febb5921b2256c9786fad67294cb32efd6d059ed21e04c') + 'ae0654027f0646178961f6397322aefdc817d052625772dd297d636fe9726aff' + '0f8d896793e6f6f677febb5921b2256c9786fad67294cb32efd6d059ed21e04c' + '9e157d4c5c958c4bf7aa5de43919a2017f4a850f8171a46786b306531c8b03b0') pkgver() { cd "$srcdir/${pkgname}" -# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ( set -o pipefail git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" @@ -37,16 +38,11 @@ prepare() { build() { cd "$srcdir/${pkgname}" - jq '.dependencies."matrix-react-sdk" = "github:matrix-org/matrix-react-sdk#develop"' "$srcdir/${pkgname}/package.json" > "$srcdir/${pkgname}/package_tmp.json" - cp "$srcdir/${pkgname}/package_tmp.json" "$srcdir/${pkgname}/package.json" - jq '.dependencies."matrix-js-sdk" = "github:matrix-org/matrix-js-sdk#develop"' "$srcdir/${pkgname}/package.json" > "$srcdir/${pkgname}/package_tmp.json" - mv "$srcdir/${pkgname}/package_tmp.json" "$srcdir/${pkgname}/package.json" - jq '.scripts."build:react-sdk" = "node scripts/npm-sub.js matrix-react-sdk run build"' "$srcdir/${pkgname}/package.json" > "$srcdir/${pkgname}/package_tmp.json" - mv "$srcdir/${pkgname}/package_tmp.json" "$srcdir/${pkgname}/package.json" - npm install --cache "${srcdir}/npm-cache" + "${srcdir}"/fetch-develop.deps.sh "${srcdir}/npm-cache" - npm run build + yarn install --cache-folder="${srcdir}/npm-cache" + yarn build } @@ -61,7 +57,7 @@ package() { echo "${pkgver}" > "${pkgdir}"/usr/share/webapps/riot/version cd electron_app - npm install --cache "${srcdir}/npm-cache" + yarn --cache-folder "${srcdir}/npm-cache" cd .. install -d "${pkgdir}"{/usr/lib/riot/electron_app,/etc/webapps/riot} @@ -78,7 +74,7 @@ package() { install -Dm644 "${srcdir}"/riot-desktop.desktop "${pkgdir}"/usr/share/applications/riot.desktop install -Dm755 "${srcdir}"/riot-desktop.sh "${pkgdir}"/usr/bin/riot-desktop - install -Dm644 res/themes/riot/img/logos/riot-logo.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/riot.svg + install -Dm644 "${srcdir}"/riot-desktop-git/webapp/themes/riot/img/logos/riot-im-logo.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/riot.svg for i in 16 24 48 64 96 128 256 512; do install -Dm644 electron_app/build/icons/${i}x${i}.png "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/apps/riot.png done diff --git a/fetch-develop.deps.sh b/fetch-develop.deps.sh new file mode 100755 index 000000000000..97a9a89375b9 --- /dev/null +++ b/fetch-develop.deps.sh @@ -0,0 +1,110 @@ +#!/bin/bash + +# Fetches the js-sdk and matrix-react-sdk dependencies for development +# or testing purposes +# If there exists a branch of that dependency with the same name as +# the branch the current checkout is on, use that branch. Otherwise, +# use develop. + +set -ex + +YARN_INSTALL_ARGS=("$@") +[ -z "$defbranch" ] && defbranch="develop" + +# clone a specific branch of a github repo +function clone() { + org=$1 + repo=$2 + branch=$3 + + # Chop 'origin' off the start as jenkins ends up using + # branches on the origin, but this doesn't work if we + # specify the branch when cloning. + branch=${branch#origin/} + + if [ -n "$branch" ] + then + echo "Trying to use $org/$repo#$branch" + git clone git://github.com/$org/$repo.git $repo --branch $branch --depth 1 + return $? + fi + return 1 +} + +function dodep() { + deforg=$1 + defrepo=$2 + rm -rf $defrepo + + # Try the PR author's branch in case it exists on the deps as well. + # Try the target branch of the push or PR. + # Use the default branch as the last resort. + if [[ "$BUILDKITE" == true ]]; then + # If BUILDKITE_BRANCH is set, it will contain either: + # * "branch" when the author's branch and target branch are in the same repo + # * "author:branch" when the author's branch is in their fork + # We can split on `:` into an array to check. + BUILDKITE_BRANCH_ARRAY=(${BUILDKITE_BRANCH//:/ }) + if [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then + prAuthor=${BUILDKITE_BRANCH_ARRAY[0]} + prBranch=${BUILDKITE_BRANCH_ARRAY[1]} + else + prAuthor=$deforg + prBranch=$BUILDKITE_BRANCH + fi + clone $prAuthor $defrepo $prBranch || + clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH || + clone $deforg $defrepo $defbranch || + return $? + else + clone $deforg $defrepo $ghprbSourceBranch || + clone $deforg $defrepo $GIT_BRANCH || + clone $deforg $defrepo `git rev-parse --abbrev-ref HEAD` || + clone $deforg $defrepo $defbranch || + return $? + fi + + echo "$defrepo set to branch "`git -C "$defrepo" rev-parse --abbrev-ref HEAD` +} + +############################## + +echo -en 'travis_fold:start:matrix-js-sdk\r' +echo 'Setting up matrix-js-sdk' + +dodep matrix-org matrix-js-sdk + +pushd matrix-js-sdk +yarn link +yarn install --cache-folder="${YARN_INSTALL_ARGS[@]}" +popd + +yarn link matrix-js-sdk + +echo -en 'travis_fold:end:matrix-js-sdk\r' + +############################## + +echo -en 'travis_fold:start:matrix-react-sdk\r' +echo 'Setting up matrix-react-sdk' + +dodep matrix-org matrix-react-sdk + +pushd matrix-react-sdk +yarn link +yarn link matrix-js-sdk +yarn install --cache-folder="${YARN_INSTALL_ARGS[@]}" +popd + +yarn link matrix-react-sdk + +echo -en 'travis_fold:end:matrix-react-sdk\r' + +############################## + +# Link the reskindex binary in place: if we used `yarn link`, +# Yarn would do this for us, but we don't because we'd have +# to define the Yarn binary prefix somewhere so it could put the +# intermediate symlinks there. Instead, we do it ourselves. +mkdir -p node_modules/.bin +ln -sfv ../matrix-react-sdk/scripts/reskindex.js node_modules/.bin/reskindex |