title |
---|
如何把代码打包成一个 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 xxx
mkdir debian
cd debian
mkdir DEBIAN
vim control
Package: happyhello
Version: 1.0
Architecture: i386
Maintainer: Peter Wang <[email protected]>
Installed-Size: 8
Depends: hello
Homepage: http://www.haoduoshipin.com
Description: happypeter's helloWorld
the best software ever made!
Everything is cool
dpkg-deb --build debian/
sudo apt-get install dpkg-dev
dpkg-name debian.deb
sudo dpkg -i happyhello_1.0_i386.deb
sudo apt-get install hello
sudo apt-get remove happyhello
#!/bin/bash
echo "hi I am postinst"
#!/bin/bash
echo "hi I am prerm"
/etc/happyhello/happyconf
dpkg -L happyhello
sudo apt-get purge happyhello
ls /etc/|grep happy
sudo apt-get remove happyhello