2024-03-23 21:01:05 +00:00
|
|
|
# Maintainer: Giovanni Harting <539@idlegandalf.com>
|
|
|
|
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>
|
2023-05-15 06:39:09 +00:00
|
|
|
# Contributor: Yosef Langer (vasilevich1234 dot gmail dot ...)
|
|
|
|
|
|
|
|
pkgname=nginxbeautifier
|
|
|
|
pkgver=1.0.19
|
2024-03-23 21:01:05 +00:00
|
|
|
pkgrel=3
|
|
|
|
pkgdesc='nginx config file formatter and beautifier'
|
2023-05-15 06:39:09 +00:00
|
|
|
arch=(any)
|
2024-03-23 21:01:05 +00:00
|
|
|
url='https://github.com/vasilevich/nginxbeautifier'
|
|
|
|
license=(Apache-2.0)
|
|
|
|
depends=(nodejs)
|
|
|
|
makedepends=(git npm)
|
|
|
|
_commit=734ff631f254d8f17661d81e43927ba68e69f545
|
2023-05-15 06:39:09 +00:00
|
|
|
source=("$pkgname::git+https://github.com/vasilevich/nginxbeautifier.git#commit=${_commit}")
|
2024-03-23 21:01:05 +00:00
|
|
|
b2sums=('SKIP')
|
2023-05-15 06:39:09 +00:00
|
|
|
|
|
|
|
build() {
|
2024-03-23 21:01:05 +00:00
|
|
|
cd $pkgname
|
2023-05-15 06:39:09 +00:00
|
|
|
|
2024-03-23 21:01:05 +00:00
|
|
|
# we create a taball of the project as "npm installing" (see package()) the directory itself only creates symlinks
|
|
|
|
npm pack
|
2023-05-15 06:39:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2024-03-23 21:01:05 +00:00
|
|
|
cd $pkgname
|
|
|
|
|
|
|
|
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 {} +
|
2023-05-15 06:39:09 +00:00
|
|
|
|
2024-03-23 21:01:05 +00:00
|
|
|
# npm gives ownership of ALL FILES to build user
|
|
|
|
# https://bugs.archlinux.org/task/63396
|
|
|
|
chown -R root:root "$pkgdir"
|
2023-05-15 06:39:09 +00:00
|
|
|
|
2024-03-23 21:01:05 +00:00
|
|
|
# remove ide stuff
|
|
|
|
rm -r "$pkgdir"/usr/lib/node_modules/nginxbeautifier/.idea
|
2023-05-15 06:39:09 +00:00
|
|
|
|
2024-03-23 21:01:05 +00:00
|
|
|
install -d "$pkgdir"/usr/share/doc/$pkgname
|
|
|
|
ln -s /usr/lib/node_modules/$pkgname/README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
|
2023-05-15 06:39:09 +00:00
|
|
|
}
|
|
|
|
|
2024-03-23 21:01:05 +00:00
|
|
|
# vim:set ts=2 sw=2 et:
|