-
-
Save wizardjedi/cbddefa1ff955b267e52 to your computer and use it in GitHub Desktop.
simple debian package creation (src: http://programmers.stackexchange.com/questions/195633/good-approaches-for-packaging-php-web-applications-for-debian )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Package: tmp | |
Version: 0.1 | |
Maintainer: Huy Morzhoviy <[email protected]> | |
Architecture: all | |
Depends: | |
Description: Source simple package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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