6.7. LFS-Dpkg-Wrapper-0.2

The LFS Dpkg Wrapper provides a script to automate the tasks involved in creating a deb package archive.

Approximate build time: less than 0.1 SBU
Required disk space: unknown

6.7.1. Installation of LFS Dpkg Wrapper

The version of buildpkg to be used in this chapter and beyond will use a different set up fixup scripts than the version used in the previous chapter. In order to create the new package using the new set of fixup scripts, again create a temporary version of the main script which will be able to run using the install image:

make PREFIX=$(pwd)/debian/tmp/usr
mv -v buildpkg buildpkg.tmp
make clean

Install the package into a temporary directory:

make install DESTDIR=$(pwd)/debian/tmp
[Note]

Note

If you wish to customize the way that your packages are created, you should take a look at the snippets in debian/tmp/usr/lib/lfs-dpkg-wrapper. For example, if you want to preserve debugging information, then remove 50strip.sh from that directory.

Run the custom version of the script to create a package archive:

./buildpkg.tmp

Install the package:

dpkg -i ../lfs-dpkg-wrapper_0.2_*.deb

Remove the previous version of the package:

dpkg --purge lfs-dpkg-wrapper-pass1

6.7.2. Contents of LFS Dpkg Wrapper

Installed script: /usr/bin/buildpkg
Installed directory: /usr/lib/lfs-dpkg-wrapper

Short Descriptions

buildpkg

Apply fixups to the package staging directory and then build a package archive

/usr/lib/lfs-dpkg-wrapper

Contains snippets sourced by the main buildpkg script to do the actual work