upgpkg: nginxbeautifier 1.0.19-3

remove ide folder from package; formatting
This commit is contained in:
2024-03-23 19:39:42 +01:00
parent e6ccf052f5
commit f4f779d924
2 changed files with 23 additions and 26 deletions

View File

@@ -1,10 +1,10 @@
pkgbase = nginxbeautifier pkgbase = nginxbeautifier
pkgdesc = nginx config file formatter and beautifier pkgdesc = nginx config file formatter and beautifier
pkgver = 1.0.19 pkgver = 1.0.19
pkgrel = 2 pkgrel = 3
url = https://github.com/vasilevich/nginxbeautifier url = https://github.com/vasilevich/nginxbeautifier
arch = any arch = any
license = Apache license = Apache-2.0
makedepends = git makedepends = git
makedepends = npm makedepends = npm
depends = nodejs depends = nodejs

View File

@@ -4,45 +4,42 @@
pkgname=nginxbeautifier pkgname=nginxbeautifier
pkgver=1.0.19 pkgver=1.0.19
pkgrel=2 pkgrel=3
pkgdesc="nginx config file formatter and beautifier" pkgdesc='nginx config file formatter and beautifier'
arch=(any) arch=(any)
url="https://github.com/vasilevich/nginxbeautifier" url='https://github.com/vasilevich/nginxbeautifier'
license=(Apache) license=(Apache-2.0)
depends=(nodejs) depends=(nodejs)
makedepends=(git npm) makedepends=(git npm)
_commit=734ff631f254d8f17661d81e43927ba68e69f545 _commit=734ff631f254d8f17661d81e43927ba68e69f545
source=("$pkgname::git+https://github.com/vasilevich/nginxbeautifier.git#commit=${_commit}") source=("$pkgname::git+https://github.com/vasilevich/nginxbeautifier.git#commit=${_commit}")
b2sums=('SKIP') b2sums=('SKIP')
prepare() {
cd "${pkgname}"
# remove junk
rm -rf ".idea/"
}
build() { build() {
cd "${pkgname}" cd $pkgname
# We create a taball of the project as "npm installing" (see package()) the directory itself only creates symlinks # we create a taball of the project as "npm installing" (see package()) the directory itself only creates symlinks
npm pack npm pack
} }
package() { package() {
cd "${pkgname}" cd $pkgname
npm install -g --prefix "${pkgdir}/usr" "${pkgname}-${pkgver}.tgz" npm install -g --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 # Non-deterministic race in npm gives 777 permissions to random directories.
# https://bugs.archlinux.org/task/63396 # See https://github.com/npm/npm/issues/9359 for details.
chown -R root:root "${pkgdir}" find "$pkgdir"/usr -type d -exec chmod 755 {} +
install -d "${pkgdir}/usr/share/doc/${pkgname}" # npm gives ownership of ALL FILES to build user
ln -s "/usr/lib/node_modules/${pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" # https://bugs.archlinux.org/task/63396
chown -R root:root "$pkgdir"
# remove ide stuff
rm -r "$pkgdir"/usr/lib/node_modules/nginxbeautifier/.idea
install -d "$pkgdir"/usr/share/doc/$pkgname
ln -s /usr/lib/node_modules/$pkgname/README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
} }
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et: