Creating .deb Packages: Difference between revisions
From Leo's Notes
This page was last edited on 28 May 2013, at 20:37.
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Simple Binary Package == | |||
== Required Files and Directories == | === Required Files and Directories === | ||
At the minimum, you should have: | At the minimum, you should have: | ||
<syntaxhighlight lang="text" line start="1" enclose="div"> | <syntaxhighlight lang="text" line start="1" enclose="div"> | ||
| Line 28: | Line 28: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Building the .dep Package == | === Building the .dep Package === | ||
Once you have all your files | Once you have all your files | ||
| Line 51: | Line 51: | ||
rm $BaseDirectory/$1.deb | rm $BaseDirectory/$1.deb | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Building From Source == | |||
See http://wikipyw.appspot.com/How_To_Create_A_DEB_Package | |||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Todo]] | [[Category:Todo]] | ||
Revision as of 20:37, 28 May 2013
Simple Binary Package
Required Files and Directories
At the minimum, you should have:
./my-package/
./my-package/DEBIAN
./my-package/DEBIAN/prerm
./my-package/DEBIAN/postinst
./my-package/DEBIAN/control
./my-package/usr/some/other/file
What's critical is the control file. The prerm/postinst scripts are optional. The rest are the files that are part of your package.
The control File
Package: cpsc-gpxe
Section: cpsc
Priority: extra
Maintainer: Leo Leung <lleung@ucalgary.ca>
Version: 0.1.1
Homepage: http://pages.cpsc.ucalgary.ca/~leo/support
Architecture: all
Depends: bash, coreutils, grub2-common, cpsc-initd
Description: Enables the gPXE grub option
Building the .dep Package
Once you have all your files
#!/bin/sh
BaseDirectory="/mnt/package_build/debbuild"
OutputDirectory="/mnt/repository/extras"
if [ -z $1 ] ; then
echo "Usage: sh build <package directory>"
exit
fi
cd $BaseDirectory
dpkg-deb --build $1
dpkg-sig --sign builder $1.deb
cd $OutputDirectory
sh add_deb.sh $BaseDirectory/$1.deb
rm $BaseDirectory/$1.deb