gildegoma / chef-android-sdk

Development repository for Android SDK Chef Cookbook
https://supermarket.chef.io/cookbooks/android-sdk
Apache License 2.0
26 stars 29 forks source link

Provide better support for mac_os_x #25

Open Brantone opened 8 years ago

Brantone commented 8 years ago

expect is typically default installed on OSX, so not always needed, thus 'homebrew' not required either (and some instances 'homebrew' might not be allowed anyway).

More importantly /etc/profile.d does not exist, thus https://github.com/gildegoma/chef-android-sdk/blob/master/recipes/default.rb#L91 fails - although set_environment_variables can be used to to circumvent, would be nice still set and have legit.

gildegoma commented 8 years ago

@Brantone thanks for filing these issues. At the moment, this cookbook is not officially supporting the Mac OS X platform.

Instead of patching isolated items (e.g. expect optional setup - #26), I'd prefer to address mac_os_x support as a whole. Relying on homebrew's android-sdk could be a good start, although Hombrew default approach is to only provide the latest stable release (i.e. no easy version selection). Or do you think that this cookbook should indeed offer an "advanced" alternative to the hombrew way?

Brantone commented 8 years ago

Ultimately it would be nice to see this move towards LWRP, but in interim, the 2 main hurdles to some semblance of osx support is expect and /etc/profile.d, both of which being pretty straight forward to solve. Because expect is usually standard on OSX machines, could take a gamble on it being installed ... as for profile.d, the OSX equivalent is /etc/paths.d and is a modified version of android-sdk.sh.erb

gildegoma commented 8 years ago

@Brantone and then this cookbook will be fully independent of any Mac package manager (e.g. no call to any package resource), correct?

Brantone commented 8 years ago

That's my current line of reasoning, yes ... always open to suggestions on something I might have missed.

gildegoma commented 8 years ago

So far LGTM, are you willing to provide a pull request for this then?

Brantone commented 8 years ago

You mean LWRP (light weight resource provider)? ... I wish I had time to do it sooner rather than later :( might not be for a while yet.

gildegoma commented 8 years ago

No, I am currently not interested to introduce the LWRP. Only the points you mentioned above: