Warren Falk

Tip: make checkinstall

I’ve been creating several python scripts lately for various things, and I’m installing them all right in /usr. (This is ubuntu, btw).

To keep my system clean, I’ve been creating debian packages with checkinstall and installing those. To make that easier, I’ve come up with a bit of a system. I create a make file with an install target, and then add a “checkinstall” target which runs the checkinstall command for me. This works pretty well

In addition to this, I’ve added the ability to get the subversion working copy revision and use it for the pkg version.

I put something like the following at the beginning of Makefile:

REVISION=`svn info | python -c "import re, sys;\
print [m.group(1) for m in [re.match('^Revision: ([0-9]+)', line) for line in sys.__stdin__] if m][0]"`

and then use $(REVISION) inside Makefile wherever I need the subversion revision number.

So I have something like the following, later on:

checkinstall:
    checkinstall --pkgversion r$(REVISION)\
     --pkgname trivial-backup\
     --maintainer warren@warrenfalk.com

One Response to “Tip: make checkinstall”

  1. Hap E. Birdae Says:

    Congrats on making it to 10000! I never did learn how to count in Canary but it’s cool that you can.

Leave a Reply

Not logged in: Log in

.
Entries (RSS) and Comments (RSS).