Installing ImageMagick from sources and using xstow to handle the installation.
I really hate installing software outside of the package manager, because that is not the way of a stable system. Xstow helps the agony those times that sourceball installations are necessary (e.g for new features). Here’s how to install imagemagick with xstow. If you haven’t installed xstow yet, then follow the relevant instructions in this snippet
1 sudo apt-get install libmagick9-dev # needed for sane image support 2 cd /tmp 3 wget ftp://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/ImageMagick-6.4.2-7.tar.bz2 4 tar xjvf ImageMagick-6.4.2-7.tar.bz2 5 sudo mv ImageMagick-6.4.2 /usr/src 6 cd /usr/src 7 sudo ln -s ImageMagick-6.4.2 imagemagick 8 cd imagemagick 9 ./configure --prefix=/usr/local/stow/imagemagick 10 make 11 sudo make install 12 cd /usr/local/stow 13 sudo xstow imagemagick
Compiling xvidcap for making screencasts in wmii
I was unable to make screencasts in wmii using Istanbul. So here’s how I installed xvidcap. Unfortunately I cannot come up with a way for wget retrieval of the sourceball, so some manual labour is needed. Retrieve the sourceball and put it in /tmp. Then follow the instructions below. Also see the snippet for an alias for the make command first.
Note that I put the binaries in /usr/local/stow/xvidcap because the package comes from outside package management. I then use xstow to manage the symlinks in /usr/local/bin.
1 sudo apt-get install libxml-parser-perl libxmu-dev libglade2-dev libgtk2.0-dev 2 cd /tmp 3 tar zxvf xvidcap*.tar.gz 4 cd xvidcap* 5 ./configure --prefix /usr/local/stow/xvidcap 6 make 7 sudo make install 8 cd /usr/local/stow 9 sudo xstow xvidcap
To remove xvidcap follow these steps
1 cd /usr/local/xstow 2 xstow -D xvidcap 3 sudo rm -rf /usr/local/stow/xvidcap
Installing git without getting screwed over when it's time to uninstall, upgrade or install package maintainer's version
Although Git is one of the better source code managers it has a major drawback if you need to install it from the sources – it’s makefile doesn’t have an uninstall target as defined in the GNU coding standards. Therefore you might find your system screwed over when you want to uninstall or upgrade after installing from sources. This is a workaround that is sufficient enough to make me break my rule of not installing software outside of package management.
Also see the snippet for an alias for the make command first.
Prequisities
1 sudo apt-get install asciidoc xsltproc xmlto xstow bzip2 build-essential zlib1g-dev tcl8.4
Installation
1 cd /tmp 2 wget http://kernel.org/pub/software/scm/git/git-1.5.5.1.tar.bz2 3 tar xjvf git-1.5.5.1.tar.bz2 4 sudo mv git-1.5.5.1 /usr/src 5 sudo ln -s /usr/src/git-1.5.5.1 /usr/src/git 6 cd /usr/src/git 7 ./configure --prefix=/usr/local/stow/git 8 make all doc 9 sudo make install install-doc 10 cd /usr/local/stow 11 cat << EOF > /tmp/xstow.ini 12 # this is the xtow configuration file 13 # see xstow.ini(5) for details 14 15 # list of links that will be handled as normal directories 16 [traverse-links] 17 keep-targets = true # add targets of the links to the keep-dirs section 18 link = /usr/local/tmp 19 link = /usr/local/var 20 link = /usr/local/man 21 link = /usr/local/share 22 link = /usr/local/share/man 23 link = /usr/local/doc 24 link = /usr/local/info 25 add-if-target = /* # automatic add all absolute links 26 27 # directories that never should be removed 28 [keep-dirs] 29 dir = /usr/local/bin 30 dir = /usr/local/sbin 31 dir = /usr/local/lib 32 dir = /usr/local/include 33 dir = /usr/local/share 34 35 [matches] 36 ignore = *~ # emacs 37 ignore = core # core file 38 ignore = core.* # new style 39 ignore = CVS # CVS directories 40 ignore-regex = [0]+README.* 41 42 # make other stow dirs public 43 [stow-dirs] 44 dir = /usr/local/local/stow 45 dir = /usr/local/local/stow2 46 47 [debug] 48 module = ALL 49 level = 0 50 51 [config-files] 52 in-home = yes 53 in-stow-dir = yes 54 in-other-stow-dirs = yes 55 file = /etc/xstow.ini 56 file = /usr/local/local/etc/xstow.ini 57 58 [links] 59 absolute-paths = false 60 EOF 61 sudo mv -i /tmp/xstow.ini . 62 sudo xstow git
Uninstallation
1 cd /usr/local/xstow 2 xstow -D git 3 sudo rm -rf /usr/local/stow/git
Kind of makes one appreciate the work done by package maintainers, doesn’t it?