Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Zeschin committed Jan 14, 2014
0 parents commit 8fcd8c8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Heroku Buildpack: Pngquant
=======================

This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for using [pngquant](http://www.pngquant.org/) in your application.

It is designed to be used with [heroku-buildpack-multi](https://github.com/ddollar/heroku-buildpack-multi) to combine it with the appropriate real buildpack for your app.

This is based on http://github.com/jayzes/heroku-buildpack-ffmpeg, which was in turn based on https://github.com/shunjikonishi/heroku-buildpack-ffmpeg

Usage
-----
Add a `.buildpacks` file to the root of your repo that contains this buildpack URL and your real buildpack URL:

https://github.com/shunjikonishi/heroku-buildpack-ffmpeg
https://github.com/heroku/heroku-buildpack-play

Then create an application using the multi buildpack:

$ heroku create --buildpack https://github.com/ddollar/heroku-buildpack-multi

or configure an existing application:

$ heroku config BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi

You can verify that everything is properly installed by running the following command:

$ heroku run "ffmpeg -version"

22 changes: 22 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

indent() {
sed -u 's/^/ /'
}

echo "-----> Installing pngquant"
BUILD_DIR=$1
VENDOR_DIR="vendor"
PNGQUANT_DOWNLOAD_URL=""

echo "PNGQUANT_DOWNLOAD_URL = " $PNGQUANT_DOWNLOAD_URL | indent

cd $BUILD_DIR
mkdir -p $VENDOR_DIR
cd $VENDOR_DIR
curl -L --silent $PNGQUANT_DOWNLOAD_URL | tar xz

echo "exporting PATH" | indent
PROFILE_PATH="$BUILD_DIR/.profile.d/pngquant.sh"
mkdir -p $(dirname $PROFILE_PATH)
echo 'export PATH="$PATH:vendor/pngquant/bin"' >> $PROFILE_PATH
5 changes: 5 additions & 0 deletions bin/detect
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# this pack is valid for all apps
echo "pngquant"
exit 0
2 changes: 2 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo "--- {}"

0 comments on commit 8fcd8c8

Please sign in to comment.