Skip to content

Instantly share code, notes, and snippets.

@wbs75
Created August 22, 2013 09:52
Show Gist options
  • Save wbs75/6305310 to your computer and use it in GitHub Desktop.
Save wbs75/6305310 to your computer and use it in GitHub Desktop.
Barebones Script that downloads .dmg then builds .pkg from .app using luggage
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=Foo
REVERSE_DOMAIN=com.foo
PACKAGE_VERSION=#.#
PAYLOAD=\
pack-foo \
FooURL="http://foo.server.com/foo-${PACKAGE_VERSION}.dmg"
prepare-foo: l_Applications
@sudo curl -L ${FooURL} -o "Foo-${PACKAGE_VERSION}.dmg"
@sudo hdiutil attach ./Foo-${PACKAGE_VERSION}.dmg -mountpoint /Volumes/LuggageFoo -nobrowse -noautoopen
@sudo ${CP} -a "/Volumes/LuggageFoo/Foo.app" ${WORK_D}/Applications/Foo.app
@sudo hdiutil detach /Volumes/LuggageFoo
pack-foo: prepare-foo
@sudo app2luggage.rb --application ${WORK_D}/Applications/Foo.app --package-id #.# --reverse-domain com.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment