如何把代码打包成一个 deb package
Resources:
- http://users.telenet.be/mydotcom/howto/linux/package.htm
- http://www.bytehold.com/index.php/projects/176-debian-binary-package-and-repository-howto
- http://www.debian.org/doc/debian-policy/ch-controlfields.html
- Ubuntu wiki—complete
- Ubuntu wiki—basic
gcc hello.c -o happyhello
cd xxxmkdir debiancd debianmkdir DEBIANvim control
Package: happyhelloVersion: 1.0Architecture: i386Maintainer: Peter Wang <happypeter1983@gmail.com>Installed-Size: 8Depends: helloHomepage: http://www.haoduoshipin.comDescription: happypeter's helloWorld the best software ever made! Everything is cool
dpkg-deb --build debian/sudo apt-get install dpkg-devdpkg-name debian.debsudo dpkg -i happyhello_1.0_i386.debsudo apt-get install hello
sudo apt-get remove happyhello
#!/bin/bashecho "hi I am postinst"
#!/bin/bashecho "hi I am prerm"
/etc/happyhello/happyconf
dpkg -L happyhellosudo apt-get purge happyhellols /etc/|grep happysudo apt-get remove happyhello