Chinaunix首页 | 论坛 | 博客
  • 博客访问: 421047
  • 博文数量: 120
  • 博客积分: 3125
  • 博客等级: 中校
  • 技术积分: 1100
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 10:59
文章分类

全部博文(120)

文章存档

2012年(28)

2011年(22)

2010年(34)

2009年(1)

2008年(35)

我的朋友

分类: LINUX

2009-05-14 11:30:43

1.
Make sure the following packages are already installed in your
system: build-essential, devscripts, ubuntu-dev-tools, debhelper,
dh-make, quilt, gnupg, gnupg-agent, fakeroot, lintian, pbuilder.

#apt-get install -y build-essential devscripts ubuntu-dev-tools debhelper dh-make quilt  gnupg gnupg-agent fakeroot lintian pbuilder

2.
Make sure that all the linux-image and linux-headers are
installed for which you want to create Ubuntu packages.

3.
Generate a key using GNUPG

#gpg --gen-key

Select "DSA and Elgamal" when prompted for the kind of key
Keep the default keysize as 2048.
Keep the default key validity period(0 means never expire)
Enter your name, email-id and passphrase when prompted. These same data
will be used to digitally sign the packages you build.
Note down the key generated.

4.
Create or edit .bashrc file in your home directory, and add the
following line at the end.
#export GPGKEY=
Logout and login once again for the settings to take effect.

5.
Start the gnupg agent

#gpg-agent -daemon

6.Rename the source package as

tar czfv Test.tar.gz Test/

.orig.tar.gz (Note the underscore between
packagename and packageversion)

#cp .tar.gz
.orig.tar.gz

7.
Untar the source package

#tar -xvzf .orig.tar.gz

8.
Change to the source package directory

#cd

9.

#dh_make -e (The email-id entered here should be same

as that entered in step 2 above.)
Select single binary when prompted for "type of package"
Accept all other defaults and press return.
This will create a new directory called "debian" under the source
package directory

10.
Edit the files debian/changelog and debian/conrol as per your
needs.

11.
Enter the following command from the root of source package
directory.

#debuild

This command if successfull will create .deb, .dsc, and .diff.gz files
outside source directory.

12.
Install the debian packages by issuing the following command.

#dpkg -i .deb
 
For additional reference, please refer the following link:


henry su's gpg key
-------------------------------------------
pub   1024D/9569EA7D 2009-05-14
      Key fingerprint = 46F8 2327 E20D 2449 D08F  B7BF AE52 AC28 9569 EA7D
uid                  henry su (henry su)
sub   2048g/BB7C4E72 2009-05-14

阅读(706) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~