![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Generar paquetes debian sin usar debhelperEsta explicación es una versión ligeramente modificada de la que ponen aquí:How to create a Debian/Ubuntu package (.deb) manuallyThis blog post gives some hints how to create a .deb package file (to be used with Debian, Ubuntu and similar Linux distributions). The intended audience is programmers and system administrators, both with a strong Debian or Ubuntu Linux background and strong scripting skills. It is assumed that you know almost everything about your Linux system, you have installed .deb packages by hand (with dpkg. and apt-get), you understand the dependencies etc., and the only information you need how to create a .deb package from your software. This blog post describes a low-level, hacky and quick approach with little automatic validation and instrumentation. This approach is useful for packages which don't require compilation or complicated runtime configuration. To start learning the more consistent, heavy-weight, validated approaches, fetch some source packages with apt-get source, and have a look at their debian subdirectories. The merit of our approach is simplicity (you have to understand only a few basic concepts to create your first package) and speed. Disadvantages are that it lets you create suboptimal, nonworking or nonstandard packages since there is only very little automatic validation, so you may sometimes recognize problems with your .deb packages too late, when it's too expensive to fix them; also this approach doesn't force you learn and follow the conventions and best practices of your Linux distribution. First, have a look at the contents of .deb packages similar to your software. To get the .deb file, use apt-get -d install --reinstall ${PACKAGENAME}, and fetch the file you are interested in from /var/cache/apt/sources. Once you have the .deb file, extract it with dpkg-deb: $ dpkg-deb -x .../${MYFILE}.deb /tmp/${MYFILE}
$ dpkg-deb -e .../${MYFILE}.deb /tmp/${MYFILE}/DEBIAN
Important text files are:
Use Google to find out more about these (and possibly other) special files. To get examples, look at the special files of the packages installed to your system; those special files are in /var/lib/dpkg/info. Google is your friend. Search for how to build a debian package. The first two results I've found seem to be useful, I strongly recommend you read them: Debian-Binary-Package-Building-HOWTO; How-to-make-deb-packages. However, be prepared that some of the information you find is outdated or obsoleted. Always compare the instructions found on the web to what the packages of your distribution contain. Also be prepared that you don't find any definitive, comprehensive, up-to-date or useful documentation on a particular subtopic: learn from examples then. Follow the these steps to create your .deb package:
|