-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #115 Changes proposed in this pull request: - Add Arch Linux PKGBUILD
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Maintainer: Samim Mirhosseini <samim@ottomatica.io> | ||
pkgname="baker" | ||
pkgver=0.7.0 | ||
pkgrel=1 | ||
pkgdesc="Quick and easy baking of computing environments." | ||
arch=('x86_64') | ||
url="https://github.com/ottomatica/Baker" | ||
license=('Apache') | ||
provides=('baker') | ||
makedepends=('npm' 'jq' 'python2') | ||
optdepends=('virtualbox: virtual machine support') | ||
source=($pkgname-$pkgver.tar.gz::https://github.com/ottomatica/Baker/archive/v$pkgver.tar.gz) | ||
md5sums=('63a02cc6837a64b917558c763dff1341') | ||
|
||
package() { | ||
npm install -g \ | ||
--user root \ | ||
--prefix "$pkgdir"/usr \ | ||
--cache "${srcdir}/npm-cache" \ | ||
"$srcdir"/$pkgname-$pkgver.tar.gz | ||
|
||
# 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 {} + | ||
|
||
# Remove dependency references to $pkgdir | ||
find "$pkgdir" -name package.json -print0 | xargs -0 sed -i '/_where/d' | ||
|
||
# Remove package references to $pkgdir | ||
local tmppackage="$(mktemp)" | ||
local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" | ||
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" | ||
mv "$tmppackage" "$pkgjson" | ||
chmod 644 "$pkgjson" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters