Skip to content

Instantly share code, notes, and snippets.

@GochoMugo
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GochoMugo/3cb6878df13a4c1522bd to your computer and use it in GitHub Desktop.
Save GochoMugo/3cb6878df13a4c1522bd to your computer and use it in GitHub Desktop.
A Makefile to install the latest Addon SDK from Mozilla.org

Addon-SDK-Makefile

This gist shows a simple Makefile that you could include with your addon code to help users download and install the Mozilla addon SDK effortlessly.

How To

To install the addon SDK, just type make in the directory holding this Makefile.

It downloads the addon from Mozilla.org ftp site, unpacks it, copies the content to the standard program directories (/usr/local/lib) and finally creates a link in the binary folder (/usr/bin/).

From then on, the command cfx will be available to a user from the terminal.Get more information on the SDK here.

Dependencies

  1. wget
  • make (of course!)
**Keep Social Coding**
.PHONY: download_cfx, find_cfx, install_cfx, clean
init:
make install_cfx
download_cfx:
@wget -q -O cfx.zip https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/jetpack-sdk-latest.zip
@mkdir temp cfx
@unzip -q cfx.zip -d temp
@cp -r temp/*/. cfx
@rm -r temp cfx.zip
@echo "Addon SDK downloaded."
find_cfx:
if [ ! -d cfx ] ; \
then \
make download_cfx ; \
fi ;
install_cfx:
@make find_cfx > /dev/null
@sudo cp -r cfx /usr/local/lib/
@sudo ln -s /usr/local/lib/cfx/bin/cfx /usr/bin/cfx
@echo "Addon SDK installed."
clean:
@rm -r cfx
@echo "It's now clean.'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment