summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa8241376da495a3a60440896746b56a5094a188 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer: Andre Kugland <kugland@gmail.com>

pkgname=preact-cli
pkgver=3.0.0
pkgrel=2
pkgdesc='Your next Preact PWA starts in 30 seconds.'
arch=(any)
url=https://github.com/preactjs/preact-cli
license=(MIT)
depends=("nodejs>=11")
makedepends=(npm)
source=(
  "https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz"
  "https://raw.githubusercontent.com/preactjs/preact-cli/d9701e55da813b694fb6af6e8200afecbce16018/LICENCE"
)
noextract=($pkgname-$pkgver.tgz)
sha256sums=('44edde7295776b5cc7ec7888a20364382b6c1ff37d4f33b0ab3e1194709945be'
            'df88246bd228fce9d1e476692e8ea2c3309101070652f9ad57fff8fb566e6790')

package() {
  npm i -g --prefix "$pkgdir"/usr $pkgname-$pkgver.tgz
  install -Dm 644 LICENCE -T "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  cd "$pkgdir"/usr

  # Fix permissions
  find . -exec chown -h 0:0 {} +
  find . -type d -exec chmod 755 {} +
}