diff options
author | Lorens Gwine | 2017-11-26 23:12:35 +0500 |
---|---|---|
committer | Lorens Gwine | 2017-11-26 23:12:35 +0500 |
commit | 87679fd2530ce4343287f37383ad5d64aac70de7 (patch) | |
tree | 186a87baddb7d6301ce50351009b7e412c774d97 | |
download | aur-87679fd2530ce4343287f37383ad5d64aac70de7.tar.gz |
creating tc-twitch-git
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..523045459b5d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = tc-twitch-git + pkgdesc = The chat client for Twitch™ + pkgver = 10.2.0.r0.ge8ed5df + pkgrel = 1 + url = https://github.com/mccxiv/tc-twitch + arch = any + license = custom + makedepends = git + makedepends = npm + provides = tc-twitch + conflicts = tc-twitch + source = tc-twitch-git::git+https://github.com/mccxiv/tc.git + md5sums = SKIP + +pkgname = tc-twitch-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..50d321542409 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Lorens Gwine <lorensgwine@gmail.com> +pkgname=tc-twitch-git +_pkgname=tc-twitch +pkgver=10.2.0.r0.ge8ed5df +pkgrel=1 +pkgdesc="The chat client for Twitch™" +arch=('any') +url="https://github.com/mccxiv/${_pkgname}" +license=('custom') +provides=($_pkgname) +conflicts=($_pkgname) +makedepends=('git' 'npm') +source=("$pkgname::git+https://github.com/mccxiv/tc.git") +md5sums=('SKIP') + +pkgver() { + cd $pkgname + git describe --tags --long | sed -r -e 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,[-_],.,g' +} + +build() { + cd $srcdir/$pkgname + rm -rf _dist + rm -rf _build + mkdir -p _build + npm install + npm install 7zip-bin-linux + node_modules/.bin/webpack + cp src/tc-renderer/index.html _build/index.html + cp src/package.json _build/package.json + npm run dist:linux + # license + sed -n '/### License/,/You may not/p' README.md > LICENSE +} + +package() { + install -d "$pkgdir"/{usr/bin,opt} + cp -a $srcdir/$pkgname/dist/linux-unpacked $pkgdir/opt/$_pkgname + ln -s $pkgdit/opt/$_pkgname/Tc $pkgdir/usr/bin/tc-twitch + install -Dm644 $srcdir/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE +} |