Search This Blog

Tuesday, May 15, 2007

updating texmacs to new upstream release

As of Tue, May 15, 2007 Debian contains the following versions of Texmacs.

Stable (Etch) : 1:1.0.6-10
Testing (Lenny) : 1:1.0.6-11
Unstable (Sid) : 1:1.0.6.9-4

On my system, I am using Debian Etch, texmacs 1.0.6.9-2. Couple of days back, texmacs released 1.0.6.10. As a maintainer of this package, I want to build the 1.0.6.10 package which can eventually be uploaded to Debian Sid. This document provides a recipe of commands to achieve this goal.

Here I assumed that you are using pdebuild for the first time. If you have used it before, skip the appropriate steps.

$cp /usr/share/doc/pbuilder/examples/pbuilder-distribution.sh ~/bin/pbuilder-sid
$mkdir -p ~/pbuilder/result
$sudo aptitude install cdebootstrap
$pbuilder-sid create # if second time, use 'pbuilder-sid update'

$cat ~/bin/pdebuild-distribution.sh
#!/bin/sh

DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
BASE_DIR="$HOME/pbuilder"
pdebuild --buildsourceroot fakeroot \
--buildresult $BASE_DIR/result \
--auto-debsign \
-- --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
--distribution $DISTRIBUTION $@

$cp ~/bin/pdebuild-distribution.sh ~/bin/pdebuild-sid
$chmod +x ~/bin/pdebuild-sid

$cd ~/practice/

Obtain the latest source from texmacs website

$wget ftp://ftp.texmacs.org/pub/TeXmacs/targz/TeXmacs-1.0.6.10-src.tar.gz

Rename the upstream sources

$tar xzvf TeXmacs-1.0.6.10-src.tar.gz -C .
$mv TeXmacs-1.0.6.10-src texmacs-1.0.6.10
$tar czvf texmacs_1.0.6.10.orig.tar.gz texmacs-1.0.6.10
$rm -rf TeXmacs-1.0.6.10-src.tar.gz texmacs-1.0.6.10
$ls texmacs*
texmacs_1.0.6.10.orig.tar.gz

Obtain the latest sources available in Debian Sid

wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9.orig.tar.gz
wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9-4.dsc
wget http://ftp.debian.org/debian/pool/main/t/texmacs/texmacs_1.0.6.9-4.diff.gz

Create the corresponding Debian source for 1.0.6.10

$dpkg-source -x texmacs_1.0.6.9-4.dsc
$cd texmacs-1.0.6.9/
$uupdate -u ../texmacs_1.0.6.10.orig.tar.gz
New Release will be 1:1.0.6.10-1.
-- Untarring the new sourcecode archive ../texmacs_1.0.6.10.orig.tar.gz
Success! The diffs from version 1:1.0.6.9-4 worked fine.
Remember: Your current directory is the OLD sourcearchive!
Do a "cd ../texmacs-1.0.6.10" to see the new package
$cd ..
$rm -rf texmacs-1.0.6.9/

Update the changelog and do other necessary stuff

$cd texmacs-1.0.6.10/debian/
$dch
...
$cd ..
...

Build the package. The final packages will be in ~/pbuilder/result

$pdebuild-sid
$cd ~/pbuilder/result
$ls texmacs*1.0.6.10*
texmacs_1.0.6.10-1.diff.gz texmacs_1.0.6.10-1_i386.changes texmacs_1.0.6.10.orig.tar.gz
texmacs_1.0.6.10-1.dsc texmacs_1.0.6.10-1_i386.deb texmacs-common_1.0.6.10-1_all.deb
$linda texmacs_1.0.6.10-1.dsc
$lintian texmacs_1.0.6.10-1.dsc

Followers