Debian package makefile (minimal)
The first step is always to create a new folder that will contain your sources for the packages.
$ mkdir my_debs
$ cd my_debsThe next step is to download debpkg.mk. Right now the best way is to use the git repository as
source. Doing it this way causes a little bit loger url but works best.
$ wget https://raw.githubusercontent.com/bennof/debpkg.mk/master/debpkg.mkOr:
$ curl -O https://raw.githubusercontent.com/bennof/debpkg.mk/master/debpkg.mkTo create your first package just run:
$ make -f debpkg.mk new NAME=my_packageNow you should edit the control file in my_package/DEBIAN/control. All fields needed have a preset. The
Username is set using the $USER environment variable. The name ist the package name. For further information
read https://www.debian.org/doc/debian-policy/ch-controlfields.html
One of the most important fields is DEPENDS. Here are all dependency packages listed (comma sperated).
https://www.debian.org/doc/debian-policy/ch-relationships.html
Next you can build the filesystem tree and insert the files to be installed.
Just run:
$ make -f debpkg.mk buildAll packages are in ./.build/.
Experimental Just run:
$ sudo make -f debpkg.mk install
$ apt-get update
$ apt-cache search my_package
> my_package - some description You can create a Makefile after downloading debpkg.mk:
# My Makefile
BUILD_PATH:=some/path # here are the created deb-files (INFO: this folder should not be detected by SRCS)
REP_NAME:=repository_name
INSTALL_PATH:=/some/path/to/private/repository_name # here will the private repository be build
SRCS:=my_package_1 my_package_2 # your packages
include debpkg.mk
$ make -f debpkg.mk help$ make -f debpkg.mk test$ make -f debpkg.mk update$ make -f debpkg.mk init