DEBBUILD | ||
LICENSE | ||
makedeb | ||
README.md |
makedeb
Script for building Debian package quickly and easily. Inspired by Archlinux's makepkg.
Example
Check the DEBBUILD
Reference
Build process
First it download needed content from array sources
, then use function pkgver
to determine the package version, then run function build
and function package
, then run hooks debian_(pre|post)(inst|rm)
and make the printed strings as debian's hook scripts. Finally generate .deb with files in $pkgdir
.
Download and extract source
Every string in array source
should be like <actual_file_name>::<download_url>
. When downloading, the download_url
content will be named with <actual_file_name>
. When build
and pacage
run, every <actual_file_name>
will be copied to $srcdir
. If the file is a compressed file, it will be decompressed, if the file is a git repo, the specific branch, commit or tag will be checkouted.
Global variables
pkgname
: package's namepkgver
: package's version, if need to extract version from source, use functionpkgver
pkgrel
: debian package reference, it should increase by one every buildpkgdesc
: package's descriptionurl
: packages upstream urlmaintainer
: maintainer's contect information
Global functions
pkgver
: should print the actual version. This override the variablepkgver
build
: do something like compile sourcepackage
: do something like copy file from$srcdir
to$pkgdir
debian_(pre|post)(inst|rm)
: should print content of debian hooks file