diff options
author | Sainnhe Park | 2021-06-16 16:05:12 +0800 |
---|---|---|
committer | Sainnhe Park | 2021-06-16 16:05:12 +0800 |
commit | 295de99ada61cfcc6bfb6568c20d644383e27967 (patch) | |
tree | 1b4162b403f4de4ee029a9501ffd9faf989a4775 | |
download | aur-295de99ada61cfcc6bfb6568c20d644383e27967.tar.gz |
init
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f34d51ec0603 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = vim-doge-git + pkgdesc = (Do)cumentation (Ge)nerator 10+ languages. Generate proper code documentation skeletons with a single keypress. + pkgver = 3.10.0.r3.g584c2e1 + pkgrel = 1 + url = https://github.com/kkoomen/vim-doge + arch = any + groups = vim-plugins + license = GPL3 + makedepends = git + makedepends = npm + depends = vim + depends = nodejs + provides = vim-doge + conflicts = vim-doge + source = git+https://github.com/kkoomen/vim-doge.git + sha256sums = SKIP + +pkgname = vim-doge-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..17cfcd71e89b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Sainnhe Park <sainnhe@gmail.com> +pkgname='vim-doge-git' +pkgver=3.10.0.r3.g584c2e1 +pkgrel=1 +pkgdesc='(Do)cumentation (Ge)nerator 10+ languages. Generate proper code documentation skeletons with a single keypress.' +arch=('any') +url='https://github.com/kkoomen/vim-doge' +license=('GPL3') +groups=('vim-plugins') +provides=('vim-doge') +conflicts=('vim-doge') +depends=('vim' 'nodejs') +makedepends=('git' 'npm') +source=("git+${url}.git") +sha256sums=('SKIP') +_packdir='usr/share/vim/vimfiles/pack/vim-doge/start/vim-doge' + +pkgver() { + cd "${srcdir}/vim-doge" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${srcdir}/vim-doge" + npm ci --cache "${srcdir}/.cache" + npm run build:binary:unix -- vim-doge +} + +package() { + cd "${srcdir}/vim-doge" + npm pack; tar xvf *.tgz; rm *.tgz + cd package + npm install --production --ignore-scripts --prefer-offline --cache "${srcdir}/.cache" + find autoload build/index.js build/build doc/doge.txt doc/tags ftplugin node_modules package.json plugin -type f -exec \ + install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \; + install -Dm 644 "${srcdir}/vim-doge/LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + mkdir "${pkgdir}/${_packdir}/bin" + sed -i '1i#!/usr/bin/node' "${pkgdir}/${_packdir}/build/index.js" + chmod +x "${pkgdir}/${_packdir}/build/index.js" + ln -s "/${_packdir}/build/index.js" "${pkgdir}/${_packdir}/bin/vim-doge" + find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + chown -R root:root "${pkgdir}" + rm -rf "${srcdir}/vim-doge/package" +} + |