diff options
author | Sefa Eyeoglu | 2020-10-21 11:54:12 +0200 |
---|---|---|
committer | Sefa Eyeoglu | 2020-10-21 11:54:12 +0200 |
commit | 74b9efb220f4166a60bab5613ddac279e2f0bfa2 (patch) | |
tree | 8ad32af4b493cae904ad3a30ede16eb50c01cc7f | |
parent | 3b590f9697f75aa39a27397421a0239feecac1bb (diff) | |
download | aur-74b9efb220f4166a60bab5613ddac279e2f0bfa2.tar.gz |
upgpkg: nginxbeautifier 1.0.19-1
upstream release
Update to latest upstream revision
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 56 |
2 files changed, 49 insertions, 22 deletions
@@ -1,14 +1,15 @@ pkgbase = nginxbeautifier - pkgdesc = Nginx config formatter and beautifier. - pkgver = 1.0.18 + pkgdesc = nginx config file formatter and beautifier + pkgver = 1.0.19 pkgrel = 1 - url = https://nginxbeautifier.com + url = https://github.com/vasilevich/nginxbeautifier arch = any - license = Apache-2.0 + license = Apache + makedepends = git + makedepends = npm depends = nodejs - provides = nginxbeautifier - source = nginxbeautifier::git://github.com/vasilevich/nginxbeautifier.git - md5sums = SKIP + source = nginxbeautifier::git+https://github.com/vasilevich/nginxbeautifier.git#commit=734ff631f254d8f17661d81e43927ba68e69f545 + sha512sums = SKIP pkgname = nginxbeautifier @@ -1,20 +1,46 @@ -# Maintainer: Yosef Langer (vasilevich1234 dot gmail dot ...) +# Maintainer: Sefa Eyeoglu <contact@scrumplex.net> +# Contributor: Yosef Langer (vasilevich1234 dot gmail dot ...) +_commit=734ff631f254d8f17661d81e43927ba68e69f545 pkgname=nginxbeautifier -pkgver=1.0.18 +pkgver=1.0.19 pkgrel=1 -pkgdesc='Nginx config formatter and beautifier.' -arch=('any') -url='https://nginxbeautifier.com' -license=('Apache-2.0') -provides=('nginxbeautifier') -depends=('nodejs') -source=($pkgname::"git://github.com/vasilevich/${pkgname}.git") -sha512sum=('SKIP') +pkgdesc="nginx config file formatter and beautifier" +arch=(any) +url="https://github.com/vasilevich/nginxbeautifier" +license=("Apache") +depends=("nodejs") +makedepends=("git" "npm") +source=("$pkgname::git+https://github.com/vasilevich/nginxbeautifier.git#commit=${_commit}") +sha512sums=('SKIP') + + +prepare() { + cd "${pkgname}" + + # remove junk + rm -rf ".idea/" +} + +build() { + cd "${pkgname}" + + # We create a taball of the project as "npm installing" (see package()) the directory itself only creates symlinks + npm pack +} + package() { - cd "$pkgname" - git checkout "49eaeb032466797705edcd4680d965e5d4ac513d" - install -D -m 755 nginxbeautifier.js "$pkgdir/usr/bin/nginxbeautifier" - + cd "${pkgname}" + + npm install -g --user root --prefix "${pkgdir}/usr" "${pkgname}-${pkgver}.tgz" + # Non-deterministic race in npm gives 777 permissions to random directories. + # See https://github.com/npm/npm/issues/9359 for details. + find "${pkgdir}/usr" -type d -exec chmod 755 {} + + + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "${pkgdir}" + + install -d "${pkgdir}/usr/share/doc/${pkgname}" + ln -s "/usr/lib/node_modules/${pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" } -md5sums=('SKIP') |