Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux PKGBUILD #116

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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<6.0.0: 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"
66 changes: 23 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baker",
"version": "0.6.15",
"version": "0.6.16",
"description": "baker creates ansible powered virtual machines",
"engines": {
"node": ">=7.10.0"
Expand Down Expand Up @@ -50,7 +50,7 @@
"netaddr": "^1.1.0",
"node-powershell": "^4.0.0",
"node-vagrant": "^1.3.6",
"node-virtualbox": "^0.1.35",
"node-virtualbox": "^0.1.36",
"ora": "^3.2.0",
"ping": "^0.2.2",
"prompt": "^1.0.0",
Expand Down