Skip to content

Instantly share code, notes, and snippets.

@coolswitcher
Last active October 24, 2017 09:49
Show Gist options
  • Save coolswitcher/6870f51e0281881917318a626ae647a0 to your computer and use it in GitHub Desktop.
Save coolswitcher/6870f51e0281881917318a626ae647a0 to your computer and use it in GitHub Desktop.
Create deb file from compiled source files
apt-get install checkinstall
curl --silent --output /usr/local/pkg https://gist.githubusercontent.com/coolswitcher/6870f51e0281881917318a626ae647a0/raw/af73d87204ba03d184f4924f0fe266c573550930/pkg
chmod +x /usr/local/pkg
Use:
- compile source (configure, make ...)
- run pkg or pkg "pkgname"
#!/bin/bash
pkgname="${1}"
if [[ -z "${pkgname}" ]]; then
pkgname="$(basename $(pwd))"
fi
/usr/bin/checkinstall --pkgname="${pkgname}" --pkgversion="$(date +%Y%m%d%H%M)" --backup=no --deldoc=yes --default --fstrans=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment