TurboPrint-2 b6 .deb HOWTO (i386, AMD64)

Questions on Installation
Post Reply

Did it work?

YES :-)
0
No votes
NO :-(
0
No votes
 
Total votes: 0

voland-it
Posts: 3
Joined: Fri May 16, 2008 3:26 pm

TurboPrint-2 b6 .deb HOWTO (i386, AMD64)

Post by voland-it »

This mini guide explains how to create a package to install the beta version of TurboPrint 2 on debian-based distributions. You just need update the old builder script with new dependencies and run it. This is a sub optimal solution, but works for me until the official .deb packages will be ready. Tested on Ubuntu 8.04 LTS Hardy Heron AMD64, MIGHT work on other debian-based systems as well.

NO WARRANTY! NO SUPPORT! DO IT AT YOUR OWN RISK!

Installing the beta version http://www.turboprint.info/beta2/download.html of TurboPrint is as easy as can be: just unpack the tar you just downloaded

Code: Select all

tar -xzf turboprint-2.00-beta6.tgz
move into the new directory

Code: Select all

cd turboprint-2.00-beta6
and execute the installer

Code: Select all

./setup
However, for those willing to install the package via the built-in package management infrastructure, the procedure is nearly as easy:

1 - Download the archive http://www.turboprint.info/beta2/download.html, unpack it

Code: Select all

tar -xzf turboprint-2.00-beta6.tgz
2 - move into the new directory

Code: Select all

cd turboprint-2.00-beta6/debian
3 - edit the package builder script

Code: Select all

gedit deb/maketpdeb
4 - zap its content and replace it with the following:

Code: Select all

#!/bin/bash
VERSION=2.00
REVISION=beta6
ARCH=i386
PACKAGENAME="turboprint_${VERSION}-${REVISION}_${ARCH}"
TEMPDIR="../maketpdeb.tmp"
DATADIR=$TEMPDIR/$PACKAGENAME
CONFDIR=$DATADIR/DEBIAN

# create temporary directory
mkdir $TEMPDIR
mkdir $DATADIR
mkdir $CONFDIR

# install static files
export RPM_BUILD_ROOT=$DATADIR
# rm -rf $DATADIR/*
lib/install-static --rpm
echo "[TurboPrint_Config_File]" > $DATADIR/etc/turboprint/turboprint.cfg

# create archive of data files
tar -c -z -f $TEMPDIR/data.tar.gz -C $DATADIR .

# rm -rf $DATADIR

# get installed size
SIZE=$(du -s -k $DATADIR)
SIZE=${SIZE%%[^0-9]*}

# create config files
echo "Package: turboprint" > $CONFDIR/control
echo "Version: ${VERSION}-$REVISION" >> $CONFDIR/control
echo "Section: alien" >> $CONFDIR/control
echo "Priority: extra" >> $CONFDIR/control
echo "Architecture: $ARCH" >> $CONFDIR/control
echo "Depends: libc6, libglib2.0-0, libx11-6, libxext6, libxi6, libgtk2.0-0, cupsys" >> $CONFDIR/control
echo "Installed-Size: $SIZE" >> $CONFDIR/control
echo "Maintainer: Florian Zeiler <zeiler@zedo.net.de>" >> $CONFDIR/control
cat deb/description >> $CONFDIR/control
echo "/etc/turboprint/system.cfg" > $CONFDIR/conffiles
echo "/etc/turboprint/turboprint.cfg" >> $CONFDIR/conffiles

echo "#!/bin/sh" > $CONFDIR/postinst
echo "# called after rpm installation, generate non-static files" >> $CONFDIR/postinst
echo "/usr/share/turboprint/lib/install-post --rpm" >> $CONFDIR/postinst
chmod ugo+x $CONFDIR/postinst

echo "#!/bin/sh" > $CONFDIR/prerm
echo "# called before rpm deinstallation, delete non-static files" >> $CONFDIR/prerm
echo "/usr/share/turboprint/lib/uninstall-pre --rpm" >> $CONFDIR/prerm
chmod ugo+x $CONFDIR/prerm

# create md5 sums
#cd $TEMPDIR/data
#md5sum * > ../control/md5sums
#md5sum */* >> ../control/md5sums
#md5sum */*/* >> ../control/md5sums
#md5sum */*/*/* >> ../control/md5sums
#md5sum */*/*/*/* >> ../control/md5sums
#md5sum */*/*/*/*/* >> ../control/md5sums
#cd ../../turboprint-1.95-1

# create archive of control files
#tar -c -z -f $TEMPDIR/control.tar.gz -C $CONFDIR .

#echo "2.0" > $TEMPDIR/debian-binary

# finally create archive
#ar -r $TEMPDIR/${PACKAGENAME}.deb $TEMPDIR/debian-binary $TEMPDIR/control.tar.gz $TEMPDIR/data.tar.gz

cd $TEMPDIR
dpkg-deb --build $PACKAGENAME

exit 0

5 - and run it

Code: Select all

deb/maketpdeb
6-a - after just some seconds your package should be ready. Get it here:

Code: Select all

cd ../maketpdeb.tmp
6-b - or just download mine http://www.megaupload.com/it/?d=KXQ2WQJ8 :-D :-D
7 - and install it. Either
7-a - Double click it
OR

Code: Select all

gdebi-gtk turboprint_2.00-beta6_i386.deb
If you run an AMD64 system, however, you need to force the installation:

Code: Select all

sudo dpkg -i --force-architecture turboprint_2.00-beta6_i386.deb
that's it. You can now get rid of all downloaded, extracted and created files. When you first run Turboprint (you should find two new icons in your administration menu) you will be greeted by a configuration wizard.

To remove, use your package manager or

Code: Select all

sudo dpkg -P turboprint
zedonet
Site Admin
Posts: 2156
Joined: Fri Oct 06, 2006 8:02 am

Post by zedonet »

Great - thank you!
Post Reply