On Sat, Nov 04, 2006 at 11:09:34PM +1100, Jeremy Visser wrote:
> I would like to know how to create a Debian package that consists of one
> file, not generated by source. I have tried using a Makefile that just
> copies files and running it with CheckInstall, but have failed to get it
> to recognise any changes.

I'm not sure what CheckInstall does, but this should be a fairly easy.
That said, building your first package has a bit of a learning curve
no matter what.

Firstly, write your Makefile to do what it needs to do; but make sure
you allow for a prefix variable correctly; e.g.

---
prefix := /usr

install:
        cp file ${prefix}/share/blah
---

This allows you to easily put it in whatever package (deb, rpm, blah)
you want.  automake makes it easy, if you want to learn it.  Put it in
a tarball and use dh_make to get the initial framework for the
package.

Then, your debian/rules file, using CDBS, can be as simple as

---
#!/usr/bin/make -f

include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_MAKE_CLEAN_TARGET    := clean
DEB_MAKE_BUILD_TARGET    := all
DEB_MAKE_INSTALL_TARGET  := install prefix=$(CURDIR)/debian/tmp/usr
---

dpkg-buildpackage -rfakeroot and you're done.

However, if you are really interested in learning about Debian
packaging, don't use CDBS but build it up by going through the new
maintainers guide [1] to actually learn what CDBS does.

[1] http://www.debian.org/doc/maint-guide/

-i
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to