Ubuntu Package
Synopsis
This section covers the creation and usage of the freenac ubuntu package. The package is still in an early state and mainly tries to ease installation of all required packages. Configuration of freenac is not yet included.
The package creation is still carried out all by hand. None of the debian provided tools were used so far.
Install the package
First all the dependencies of the freenac package must be installed. Since the package is a simple deb and not embedded in a repository, dependency handling can not be done by apt. Hence the dependency list must be extracted from the deb and feeded to apt manually.
$ dpkg -f freenac_....deb depends | sed -e 's/,//g' | xargs sudo apt-get -qq install
Now the freenac package can be installed.
$ sudo dpkg -i freenac_....deb
Extract a Package
To obtain all data (files to be installed as well as control files) from a package without installing it, proceed as follows.
To extract the files which would be installed,
$ dpkg-deb -x freenac_....deb dir-to-extract/
To extract the control files,
$ dpkg-deb -e freenac_....deb dit-to-extract/
To obtain the proper layout from which the package can be recreated again do the following. It's assumed that you created an empty directory freenac where everything will be extracted to.
$ dpkg-deb -x freenac_....deb freenac/
$ dpkg-deb -e freenac_....deb freenac/DEBIAN
Create a Package
To create the freenac package, proceed as follows.
- Start with an empty directory, e.g. freenac/
- Create two subdirectories, DEBIAN/ and opt/
- Check out the freenac version to package from subversion
$ svn co https://opennac.svn.sourceforge.net/svnroot/opennac/... freenac/opt/nac2.2/
-
Create the necessary files in freenac/DEBIAN (see next section)
-
Create the package
$ dpkg-deb -b freenac/ ./
The Files in DEBIAN/
The following files should be inside the DEBIAN directory.
- changelog
Contains a high level changelog for this package - control
Specifies the package name, version, architecture, dependencies and a short description about this package. - copyright
License issues - rules
For an example of what these files should contain, have a look at the contrib/package_files directory.
- Printer-friendly version
- Login or register to post comments