summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDazzy Ding2015-06-23 12:04:20 +0800
committerDazzy Ding2015-06-23 12:04:20 +0800
commit232eb429433576e9f609d78764a34c2a75444887 (patch)
tree48667072f341b39137aac1be32143d0f8e656a5a
downloadaur-232eb429433576e9f609d78764a34c2a75444887.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD42
-rw-r--r--xunlei-lixian-git.install6
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c9d1e462d415
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = xunlei-lixian-git
+ pkgdesc = A python script for Xunlei lixian.
+ pkgver = r621.ac605e8
+ pkgrel = 1
+ url = https://github.com/iambus/xunlei-lixian/
+ install = xunlei-lixian-git.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python2
+ depends = wget
+ optdepends = aria2: better download performance
+ optdepends = axel: better download performance
+ source = git+https://github.com/iambus/xunlei-lixian.git
+ source = xunlei-lixian-git.install
+ sha256sums = SKIP
+ sha256sums = 9d806e9a4dc66105c052a5941de67c8f51f62f25de5a218cb47936d47434bb75
+
+pkgname = xunlei-lixian-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..44c7043a310a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Dazzy Ding <h at dazzyd.org>
+# Contributor: cuihao <cuihao dot leo at gmail dot com>
+
+pkgname=xunlei-lixian-git
+pkgver=r621.ac605e8
+pkgrel=1
+pkgdesc="A python script for Xunlei lixian."
+arch=('any')
+url="https://github.com/iambus/xunlei-lixian/"
+license=('MIT')
+depends=('python2' 'wget')
+optdepends=('aria2: better download performance'
+ 'axel: better download performance')
+makedepends=('git')
+source=("git+https://github.com/iambus/xunlei-lixian.git"
+ "xunlei-lixian-git.install")
+sha256sums=('SKIP'
+ '9d806e9a4dc66105c052a5941de67c8f51f62f25de5a218cb47936d47434bb75')
+install='xunlei-lixian-git.install'
+_gitname='xunlei-lixian'
+
+pkgver() {
+ cd $_gitname
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd $_gitname
+
+ sed -i -r "s|^#!/usr/bin/env python|#!/usr/bin/env python2|" lixian_{batch,cli,hash}.py
+
+ mkdir -p "$pkgdir/usr/share/$pkgname/"
+ cp -r lixian* "$pkgdir/usr/share/$pkgname/"
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
+ cp LICENSE "$pkgdir/usr/share/licenses/$pkgname/"
+
+ mkdir -p "$pkgdir/usr/bin/"
+ ln -sf "/usr/share/$pkgname/lixian_cli.py" "$pkgdir/usr/bin/lixian"
+ ln -sf "/usr/share/$pkgname/lixian_batch.py" "$pkgdir/usr/bin/lixian-batch"
+ ln -sf "/usr/share/$pkgname/lixian_hash.py" "$pkgdir/usr/bin/lixian-hash"
+}
diff --git a/xunlei-lixian-git.install b/xunlei-lixian-git.install
new file mode 100644
index 000000000000..c272f239ab13
--- /dev/null
+++ b/xunlei-lixian-git.install
@@ -0,0 +1,6 @@
+post_install() {
+ echo "Commands below are available:"
+ echo "/usr/bin/lixian -> lixian_cli.py"
+ echo "/usr/bin/lixian_batch -> lixian_batch.py"
+ echo "/usr/bin/lixian_hash -> lixian_hash.py"
+}