mirror of
https://github.com/bertptrs/aur.git
synced 2025-12-25 20:40:32 +01:00
Initial packaging.
This commit is contained in:
16
.SRCINFO
Normal file
16
.SRCINFO
Normal file
@@ -0,0 +1,16 @@
|
||||
pkgbase = nodejs-node-pre-gyp
|
||||
pkgdesc = Node.js tool for easy binary deployment of C++ addons
|
||||
pkgver = 0.12.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/mapbox/node-pre-gyp
|
||||
arch = any
|
||||
license = GPL
|
||||
makedepends = npm
|
||||
makedepends = jq
|
||||
depends = nodejs
|
||||
noextract = nodejs-node-pre-gyp-0.12.0.tar.gz
|
||||
source = nodejs-node-pre-gyp-0.12.0.tar.gz::https://github.com/mapbox/node-pre-gyp/archive/v0.12.0.tar.gz
|
||||
sha256sums = 6d3207e85c68539da11ea5f10fb730cdaf9170ed855158957df00b5a8d692c67
|
||||
|
||||
pkgname = nodejs-node-pre-gyp
|
||||
|
||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!.gitignore
|
||||
!PKGBUILD
|
||||
!.SRCINFO
|
||||
32
PKGBUILD
Normal file
32
PKGBUILD
Normal file
@@ -0,0 +1,32 @@
|
||||
# Maintainer: Bert Peters <bert@bertptrs.nl>
|
||||
_npmname=node-pre-gyp
|
||||
pkgname=nodejs-node-pre-gyp
|
||||
pkgver=0.12.0
|
||||
pkgrel=1
|
||||
pkgdesc="Node.js tool for easy binary deployment of C++ addons "
|
||||
arch=('any')
|
||||
url="https://github.com/mapbox/node-pre-gyp"
|
||||
license=('GPL')
|
||||
depends=('nodejs')
|
||||
makedepends=('npm' 'jq')
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
||||
noextract=("$pkgname-$pkgver.tar.gz")
|
||||
sha256sums=('6d3207e85c68539da11ea5f10fb730cdaf9170ed855158957df00b5a8d692c67')
|
||||
|
||||
package() {
|
||||
npm install -g --user root --prefix "$pkgdir/usr" "$pkgname-$pkgver.tar.gz"
|
||||
|
||||
# Remove references to $pkgdir
|
||||
find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"
|
||||
|
||||
# Remove references to $srcdir
|
||||
local tmppackage="$(mktemp)"
|
||||
local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
|
||||
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
|
||||
mv "$tmppackage" "$pkgjson"
|
||||
chmod 644 "$pkgjson"
|
||||
|
||||
# Install LICENSE in a more findable spot.
|
||||
install -Dm644 -t "$pkgdir/usr/share/licences/$pkgname" \
|
||||
"$pkgdir/usr/lib/node_modules/$_npmname/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user