summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack O'Sullivan2019-02-05 20:54:12 +0000
committerJack O'Sullivan2019-02-05 20:54:12 +0000
commit8e632a1e3631a2635b9b53c7eed7ad6d4587d6bb (patch)
treefd116ee315d122bec91ca9b2e4afec1d526de049
downloadaur-8e632a1e3631a2635b9b53c7eed7ad6d4587d6bb.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--fetch-deps.patch28
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1580fbe6abd6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = riot-web-develop-git
+ pkgdesc = A glossy Matrix collaboration client for the web (develop branch).
+ pkgver = r6845.8630d031
+ pkgrel = 1
+ url = https://riot.im
+ arch = any
+ license = Apache
+ makedepends = npm
+ makedepends = git
+ provides = vector-web
+ conflicts = riot-web
+ replaces = vector-web
+ source = git+https://github.com/vector-im/riot-web#branch=develop
+ source = fetch-deps.patch
+ sha256sums = SKIP
+ sha256sums = d6428c19067f447a051bedf49a28686c5e60ab3bbb3534065889584e28f61cf5
+
+pkgname = riot-web-develop-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..091dcf20f987
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Jack O'Sullivan <jackos1998 at gmail dot com>
+
+_pkgbase=riot
+_pkgname=riot-web
+pkgname=riot-web-develop-git
+pkgver=r6845.8630d031
+pkgrel=1
+pkgdesc="A glossy Matrix collaboration client for the web (develop branch)."
+arch=('any')
+url="https://riot.im"
+_url="https://github.com/vector-im/riot-web"
+license=('Apache')
+makedepends=('npm' 'git')
+source=("git+${_url}#branch=develop"
+ "fetch-deps.patch")
+sha256sums=('SKIP'
+ 'd6428c19067f447a051bedf49a28686c5e60ab3bbb3534065889584e28f61cf5')
+provides=('vector-web') # @vith
+replaces=('vector-web') # @vith
+conflicts=('riot-web')
+
+pkgver() {
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd ${_pkgname}
+ patch -Np0 < ../fetch-deps.patch
+}
+
+build() {
+ cd ${_pkgname}
+ GIT_BRANCH=develop scripts/fetch-develop.deps.sh
+ npm run build --cache ../npm-cache
+}
+
+package() {
+ cd ${_pkgname}
+
+ install -d "${pkgdir}"/{usr/share/webapps,etc/webapps}/${_pkgbase}
+
+ cp -r webapp/* "${pkgdir}"/usr/share/webapps/${_pkgbase}/
+ install -Dm644 config.sample.json -t "${pkgdir}"/etc/webapps/${_pkgbase}/
+ ln -s /etc/webapps/${_pkgbase}/config.json "${pkgdir}"/usr/share/webapps/${_pkgbase}/
+ echo "${pkgver}" > "${pkgdir}"/usr/share/webapps/${_pkgbase}/version
+}
diff --git a/fetch-deps.patch b/fetch-deps.patch
new file mode 100644
index 000000000000..822d2ba87a0c
--- /dev/null
+++ b/fetch-deps.patch
@@ -0,0 +1,28 @@
+--- scripts/fetch-develop.deps.sh 2019-02-05 20:35:16.903635811 +0000
++++ scripts/fetch-develop.deps.sh.patched 2019-02-05 20:35:12.493542910 +0000
+@@ -55,8 +55,13 @@
+
+ echo "$repo set to branch "`git -C "$repo" rev-parse --abbrev-ref HEAD`
+
+- mkdir -p node_modules
+- npm link "./$repo" # This does an npm install for us
++ cd "$repo"
++ npm install
++ cd ..
++
++ npm install
++ rm -rf node_modules/"$repo"
++ ln -s "../$repo" node_modules/"$repo"
+ }
+
+ ##############################
+@@ -82,7 +87,8 @@
+ #
+ # (note this matches the instructions in the README.)
+ cd matrix-react-sdk
+-npm link ../matrix-js-sdk
++rm -rf node_modules/matrix-js-sdk
++ln -s ../../matrix-js-sdk node_modules/matrix-js-sdk
+ cd ../
+
+ echo -en 'travis_fold:end:matrix-react-sdk\r'