Monthly Archives: August 2005

Building a deb package for Parrot

This doc is subject to unexpected editing by me, as necessary.

Okay, here’s what I’m doing:

I’m building a Debian package for Parrot, or trying to anyway.

Make sure that you have your gnupg stuff setup!

tar -zxvf source.tgz
cd source
dh_make -e email -f ../source.tgz
edit debian/rules file and other files.
(optionally, cp ~/rules debian
remove references to /usr/local `grep -rn usr/local *`
config/gen/makefiles/ (2, 1 of them comment)
Change to: $(DESTDIR)/usr/parrot…
No, really, $(DESTDIR), that’s not some cute way for me to specify something, literally, $(DESTDIR).
parrot.spec (1)
icu/source/config/icu-config-bottom (1 comment)
icu/source/configure (1)
maybe icu/source/
rm emacsen-install.ex emacsen-remove.ex
rm emacsen-startup.ex init.d.ex menu.ex
rm conffiles.ex rm cron.d.ex
rm ex.package.doc-base manpage.sgml.ex
rm postinst.ex postrm.ex preinst.ex prerm.ex watch.ex
edit README.debian
edit copyright
edit control (change the section, and add descriptions)
time dpkg-buildpackage -rfakeroot
real 3m18.462s
user 2m58.507s
sys 0m14.796s

Find out all the things I did wrong when building the package:
lintian -i package_ver.changes

Look at the package contents:
dpkg-deb -x package_ver.deb tmpdir

I know that it makes clean but I like to start fresh for this first run through. Rebuilding when it screws up during initial build:
cp debian/rules ~
better yet, cp debian/* ~/packagefiles/debian/
cd ~ (or wherever)
rm package_ver-ver.diff.gz package_ver-ver.dsc
rm parrot_0.1.0-1_i386.changes
rm parrot_0.1.0-1_i386.deb
rinse. repeat.

Useful docs:

Neat things with the date command

Okay, so the date command in Linux. How boring is this? That’s what I thought until yesterday when I was playing around with it for a script.

By now, hopefully everyone knows the runquote trick to name a logfile. Like:

log.`date +%m%d%Y`

That works great to name a logfile based on the date when you’re moving them around or simply creating them.

But I did an `info coreutils date` yesterday and saw this tasty example:

$ date –date=”$(date +%Y-%m-15) -1 month” +’Last month was %B!’
Last month was June!