Skip to content

Instantly share code, notes, and snippets.

@ignacio
Last active August 29, 2015 14:06
Show Gist options
  • Save ignacio/9303ea96872f35703adc to your computer and use it in GitHub Desktop.
Save ignacio/9303ea96872f35703adc to your computer and use it in GitHub Desktop.
Packaging LuaRocks with FPM
#!/bin/bash
#
# Install fpm
#
apt-get install ruby-dev gcc
gem install fpm
# Packing something that uses Make
# https://github.com/jordansissel/fpm/wiki/PackageMakeInstall
#
wget -O luarocks-2.2.0.tar.gz http://luarocks.org/releases/luarocks-2.2.0.tar.gz
tar xvf luarocks-2.2.0.tar.gz
INSTALLDIR=$PWD/installdir
mkdir -p $INSTALLDIR
pushd luarocks-2.2.0
./configure --prefix=/usr
make build
make install DESTDIR=$INSTALLDIR
popd
fpm -s dir -t deb -n luarocks -v 2.2.0 -C $INSTALLDIR -p luarocks-VERSION-all.deb -d "lua5.1" -d "liblua5.1-dev" -d "wget" -d "zip" usr etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment