summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorH.D. Lin2019-06-10 22:13:07 +0800
committerHuidong Lin2019-06-10 22:17:45 +0800
commit891d7b4fbd558163a116a09f5f1d2e5e0a86f44c (patch)
tree4907641e623d605490034474a721529178ebc79c
downloadaur-891d7b4fbd558163a116a09f5f1d2e5e0a86f44c.tar.gz
first commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD34
2 files changed, 49 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..60e01eb39a3e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = linggle-git
+ pkgdesc = A CLI tool of Linggle implemented in rust.
+ pkgver = r11.acf52f6
+ pkgrel = 1
+ url = https://github.com/OIdiotLin/linggle-rust
+ arch = x86_64
+ license = MIT
+ makedepends = rust
+ makedepends = cargo
+ makedepends = git
+ source = git+https://github.com/OIdiotLin/linggle-rust.git
+ md5sums = SKIP
+
+pkgname = linggle-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b41f4e27c4a1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: H.D. Lin <oidiotlin@gmail.com>
+pkgname=linggle-git
+pkgver=r11.acf52f6
+pkgrel=1
+url="https://github.com/OIdiotLin/linggle-rust"
+_gitname="linggle-rust"
+_appname="linggle"
+license=('MIT')
+source=('git+https://github.com/OIdiotLin/linggle-rust.git')
+makedepends=('rust' 'cargo' 'git')
+arch=('x86_64')
+pkgdesc="A CLI tool of Linggle implemented in rust."
+md5sums=('SKIP')
+
+pkgver() {
+ cd $_gitname
+ # git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd $_gitname
+ cargo build --release
+}
+
+check() {
+ cd $_gitname
+ cargo test --release --jobs 1
+}
+
+package() {
+ cd $_gitname
+ install -Dm 755 target/release/$_appname -t "${pkgdir}/usr/bin"
+}