Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Last active September 3, 2018 20:10
Show Gist options
  • Save Voronenko/5a742cab099cc601efde2fa6f88e7be1 to your computer and use it in GitHub Desktop.
Save Voronenko/5a742cab099cc601efde2fa6f88e7be1 to your computer and use it in GitHub Desktop.
#!/bin/sh
WORKDIR=${PWD}/OUT/app
mkdir -p $WORKDIR/DEBIAN
cat <<EOF > $WORKDIR/DEBIAN/control
Package: app
Architecture: all
Maintainer: YOURNAME
Priority: optional
Version: 0.1
Description: some desc
EOF
mkdir -p $WORKDIR/opt/app/bin
cp app-binary $WORKDIR/opt/app/bin
cat <<EOF > $WORKDIR/DEBIAN/preinst
#!/bin/bash
touch $WORKDIR/opt/app/preinst
EOF
chmod 755 $WORKDIR/DEBIAN/preinst
cat <<EOF > $WORKDIR/DEBIAN/postinst
#!/bin/bash
touch $WORKDIR/opt/app/postinst
EOF
chmod 755 $WORKDIR/DEBIAN/postinst
dpkg-deb --build $WORKDIR
#!/bin/sh
#https://github.com/krobertson/deb-s3
gem install --no-ri --no-rdoc deb-s3
Effing package management!
Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Installation:
```
gem install --no-ri --no-rdoc fpm
```
#!/bin/sh
sudo apt-get install rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment