summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de6014327332f6acff45cdab724336b4a23fdcf2 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# SPDX-License-Identifier: AGPL-3.0
#
# Maintainer:  Pellegrino Prevete <pellegrinoprevete@gmail.com>
# Maintainer:  Truocolo <truocolo@aol.com>
# Contributor: Filipe Bertelli <filipebertelli@tutanota.com>

_pkg="inherits"
pkgbase="${_pkg}"
pkgname=(
  "nodejs-${pkgbase}"
)
_pkgdesc=(
  'Browser-friendly inheritance fully compatible'
  'with standard node.js'
)
pkgdesc="${_pkgdesc[*]}"
pkgver=2.0.4
pkgrel=1
arch=(
  'any'
)
_gh="https://github.com"
_ns="isaacs"
_http="${_gh}"
url="${_http}/${_ns}/${pkgbase}"
license=(
  'custom'
)
depends=(
  'nodejs'
)
makedepends=(
  'npm'
)
provides=(
  "${pkgbase}=${pkgver}"
)
_npm="http://registry.npmjs.org"
source=(
  "${_npm}/${pkgbase}/-/${pkgbase}-${pkgver}.tgz"
)
noextract=(
  "${pkgbase}-${pkgver}.tgz"
)
sha512sums=(
  '93fbc6697e3f6256b75b3c8c0af4d039761e207bea38ab67a8176ecd31e9ce9419cc0b2428c859d8af849c189233dcc64a820578ca572b16b8758799210a9ec1'
)

build() {
  cd \
    "${srcdir}"
  _sha="$( \
    sha512sum \
      "${pkgbase}-${pkgver}.tgz")"
  printf \
    "%s\n  %s\n  %s\n" \
    "SHA512 checksum of source file:" \
    "${pkgbase}-${pkgver}.tgz:" \
    "${_sha}"
}

package() {
  cd \
    "${pkgdir}"
  local \
    _npm_options=()
  _npm_options=(
    -g
    # --user
    #   root
    --prefix
      "${pkgdir}/usr"
  )
  npm \
    install \
      "${_npm_options[@]}" \
      "${srcdir}/${pkgbase}-${pkgver}.tgz"
  rm \
    -fr \
    "${pkgdir}/usr/etc"
  # Fix npm derp
  find \
    "${pkgdir}/usr" \
    -type \
      d \
    -exec \
      chmod \
        755 \
	'{}' \
	+
}

# vim:set sw=2 sts=-1 et: