Skip to content

Commit

Permalink
build: Arch Linux PKGBUILD (#120)
Browse files Browse the repository at this point in the history
Fixes #115 

Changes proposed in this pull request:
- Add Arch Linux PKGBUILD
  • Loading branch information
gjabell authored and ssmirr committed Apr 2, 2019
1 parent d2351b4 commit 59f5e81
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
35 changes: 35 additions & 0 deletions installers/PKGBUILD
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"
}
4 changes: 4 additions & 0 deletions installers/build-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ sed -i "" -e "s/Version: .*/Version: ${BAKER_RELEASE}/" "linux/deb-template/bake
echo "Updating AppVersion in win/scripts/baker.iss to be $BAKER_RELEASE";
sed -i "" -e "s/AppVersion=.*/AppVersion=${BAKER_RELEASE}/" "win/scripts/baker.iss"

echo "Updating pkgver in PKGBUILD to be $BAKER_RELEASE";
sed -i "" -e "s/^pkgver=.*$/pkgver=${BAKER_RELEASE}/" "PKGBUILD"

# clean any old files
rm -f macos/bin/*

Expand Down Expand Up @@ -50,6 +53,7 @@ echo "Version: ${BAKER_RELEASE}"

echo "You are not done, yet"
echo "You need to upload the .tar.gz, .pkg, and .deb on github."
echo "You also need to update the md5sums field in PKGBUILD to the md5 sum of the source .tar.gz."
echo "Then you need to switch to a windows machine and run 'grunt'"
echo "Then you need to rename win/bin/baker-setup.exe to baker-windows-latest.exe and upload too"
echo "Finally, you need to update the sha to $SHA and VERSION to ${BAKER_RELEASE} in ottomatica/homebrew"

0 comments on commit 59f5e81

Please sign in to comment.