Skip to content

Instantly share code, notes, and snippets.

Created January 31, 2015 08:59
Show Gist options
  • Save anonymous/68905526759375867b71 to your computer and use it in GitHub Desktop.
Save anonymous/68905526759375867b71 to your computer and use it in GitHub Desktop.
Package: tmp
Version: 0.1
Maintainer: Huy Morzhoviy <[email protected]>
Architecture: all
Depends:
Description: Source simple package
#!/bin/bash
# create a clean debian package directory
rm -rf debian
mkdir -p debian/DEBIAN
mkdir -p debian/root
# populate the debian directory
cp control debian/DEBIAN
# Copy your web-app file anywhere you want
date > debian/root/1.tmp
# finish through fakeroot so we can adjust ownerships without needing to be root
fakeroot ./finish_package.sh debian .
#!/bin/bash
# $1 is the debian directory, $2 is the output directory
# adjust ownerships
chown -R root:root $1
# finally build the package
dpkg-deb --build $1 $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment