diff options
author | Wenxuan Zhang | 2020-10-20 17:41:33 +0800 |
---|---|---|
committer | Wenxuan Zhang | 2020-10-20 17:41:33 +0800 |
commit | 4c36696f53a972d2f08e6ad9889847c3910e1e3a (patch) | |
tree | 58149ba762b4e66c1f76a35564001eefd9b13a7d | |
download | aur-4c36696f53a972d2f08e6ad9889847c3910e1e3a.tar.gz |
init commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 22 | ||||
-rw-r--r-- | PKGBUILD | 37 |
4 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0b39fe0df63c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = csview-git + pkgdesc = A high performance csv viewer with cjk/emoji support + pkgver = 0.3.6.48.gca098b0 + pkgrel = 1 + url = https://github.com/wfxr/csview + arch = i686 + arch = x86_64 + license = MIT + license = APACHE + makedepends = rust + makedepends = cargo + conflicts = csview + source = csview::git+https://github.com/wfxr/csview.git + sha256sums = SKIP + +pkgname = csview-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ee591e8bed32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/src +*.gz diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000000..1322305dfbeb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.1.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + - id: mixed-line-ending +- repo: local + hooks: + - id: makepkg + name: makepkg + pass_filenames: false + always_run: true + language: system + entry: | + sh -c ' + makepkg --printsrcinfo > .SRCINFO && + git add PKGBUILD .SRCINFO + ' diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c997d18bd6a9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Wenxuan <wenxuangm@gmail.com> +pkgname=csview-git +_pkgname="csview" +pkgver=0.3.6.48.gca098b0 +pkgrel=1 +pkgdesc="A high performance csv viewer with cjk/emoji support" +arch=(i686 x86_64) +url="https://github.com/wfxr/csview" +license=("MIT" "APACHE") +depends=() +makedepends=("rust" "cargo") +conflicts=("csview") +sha256sums=("SKIP") + +source=("${_pkgname}::git+https://github.com/wfxr/csview.git") + +pkgver() { + cd "${_pkgname}" + echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" +} + +build() { + cd "${_pkgname}" + cargo build --release --locked +} + +package() { + cd "$srcdir/${_pkgname}" + install -Dm755 "target/release/${_pkgname}" "$pkgdir/usr/bin/${_pkgname}" + install -Dm644 "completions/fish/${_pkgname}.fish" "$pkgdir/usr/share/fish/vendor_completions.d/${_pkgname}.fish" + install -Dm644 "completions/zsh/_${_pkgname}" "$pkgdir/usr/share/zsh/site-functions/_${_pkgname}" + install -Dm644 "README.md" "$pkgdir/usr/share/doc/${_pkgname}/README.md" + install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE-MIT" + install -Dm644 "LICENSE-APACHE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE-APACHE" +} + +# vim:set noet sts=0 sw=4 ts=4 ft=PKGBUILD: |