[Gllug] creating deb package of simple directory tree
Richard Jones
rich at annexia.org
Thu May 24 19:13:54 UTC 2007
On Thu, May 24, 2007 at 04:22:01PM +0100, Aaron Trevena wrote:
> Hi GLLUGers
>
> I was hoping somebody could give me a pointer to docs/webpage/etc on
> how to create a debian package of a simple directory tree - I have a
> bunch of templates I want to put in /var/www/foo but I am failing to
> grok how to do this using dh_make, etc.
Look no further than:
http://www.debian.org/doc/debian-policy/
:-) OK, a simpler proposition is to download a package which is
similar to what you want and look at the source.
For example on a Debian system try this, where '#' means root and '$'
means any user:
# vi /etc/apt/sources.list
... and uncomment some deb-src lines
# apt-get update
$ apt-get source wordpress
$ cd wordpress-*/debian
The important files to look at first are control, rules and changelog.
(The changelog file is only used to get the package version, but it's
necessary).
Copy control, rules and changelog to your package's source tree, in a
new debian/ subdirectory, modify them to suit your package, and then
you should be able to do:
$ dpkg-buildpackage -rfakeroot
That will most probably give errors - fix them and repeat. Once
you've got some sort of .deb package [it'll be in the directory above
where you ran the dpkg-buildpackage command], you can examine the
package to see what it contains by doing:
$ ar t mypackage_*.deb
(See the 'ar' manpage for more options).
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list