Debian packaging is much more than just adding dependencies. It could be quite complex and challenging to learn but I guarantee that it will be very beneficail.
In this example, I would like to use dh_make to create blank Debian packaging templates. This contains basic template to use pre/post scripts, configuration which is very easy to start. However, this template assumes that you have source to build for the package but the example assumes that there is no source.
- Create directory with package name and version (version required)
- cd into the directory and run dh_make (refer to dh_make manual for details)
- It creates a template directory called debian
- dh_make created a template debian and it contains all templates
- Modify rules file and comment out all line starting with $(Make) to suppress use of Makefile
- dh_make creates a template assuming package is built from source
- This example does not have Makefile since it is not built from source
- Makefile is used when source has to be built prior to packaging
emacs rules
#$(MAKE) #-$(MAKE) clean #$(MAKE) DESTDIR=$(CURDIR)/debian/tns-server install
- Modify control file for package information and dependencies
- Build the package
- Install the package
mkdir server-basic-1.0
cd server-basic-1.0 dh_make -s -n -e email@jakeyoon.com
cd debian ls
emacs control
Source: server-basic Section: unknown Priority: extra Maintainer: Jake Yoon <email@jakeyoon.com> Build-Depends: debhelper (>= 5) Standards-Version: 3.7.2 Package: server-basic Architecture: all Depends: openssh-server, ntp, snmpd, rsync, htop, iotop, less, tree Description: Basic Server Configuration Installs various basic services and its configuration.
dpkg-buildpackage -b -rfakeroot -tc -uc -us
dpkg -i basic-server-1.0_all.deb