make-deb
14期 2012年3月26日

make-deb

本集介绍如何把软件打包成ubuntu包管理系统所使用的deb格式的package
本期要点

Resources:

terminal
gcc hello.c -o happyhello
terminal
cd xxx
mkdir debian
cd debian
mkdir DEBIAN
vim control
control
Package: happyhello
Version: 1.0
Architecture: i386
Maintainer: Peter Wang <happypeter1983@gmail.com>
Installed-Size: 8
Depends: hello
Homepage: http://www.happycasts.net
Description: happypeter's helloWorld
  the best software ever made!
  Everything is cool
terminal
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
terminal
sudo apt-get remove happyhello
postinst
#!/bin/bash
echo "hi I am postinst"
prerm
#!/bin/bash
echo "hi I am prerm"
conffiles
/etc/happyhello/happyconf
terminal
dpkg -L happyhello
sudo apt-get purge happyhello
ls /etc/|grep happy
sudo apt-get remove happyhello
0评论