#!/bin/sh
# This is just to provide clues for packaging. Not ready to be run as a script.

cd alexandria
rake package
# sometimes I have to run 'rake docs' before this works properly.
# this creates tarball in pkg/ (doesn't contain everything yet)

mkdir /tmp/build-alexandria-deb
mv pkg/alexandria-0.6.4.tar.gz /tmp/build-alexandria-deb/alexandria-0.6.4.orig.tar.gz
cd /tmp/build-alexandria-deb
tar zxf alexandria-0.6.4.orig.tar.gz
cd alexandria-0.6.4

# this is where we build the deb packages from a pristine source tree
# (Note: as a first step 'rake clobber' is automaticallly run, making
#        the source tree even more pristine...)


cp -a ~/software/projects/alexandria/svn/trunk/debian-gnusense/ ./debian
# NOW edit the files in debian/ as needed

dpkg-buildpackage -d -rfakeroot
# you will be prompted for your GnuPG passphrase twice (it takes your
# key id from the e-mail address of the most recent change in
# debian/changelog)

cd ..
ls -l

# this  should give you:
# a source tarball:          alexandria_0.6.4-1.tar.gz
# a source code description: alexandria_0.6.4-1.dsc
# a binary deb:              alexandria_0.6.4-1_all.deb
# a changes file:            alexandria_0.6.4-1_i386.changes
# 
