1. Make sure the following packages are already installed in your system: build-essential, devscripts, ubunt-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 .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
阅读(835) | 评论(0) | 转发(0) |