Calibre is a great piece of software for managing e-books. Not only is it great, it's open source. What's not to like?
OK, there is one thing not to like about Calibre: packaging and installation. The project download page actually advises against using OS-provided packages on the grounds that they are "often buggy/outdated". And instead of providing a normal download-and-install process, Calibre expects you to download an unknown Python script which you then run as root.
Sorry, Calibre, but no. I'm not going to give you complete access to my computer to do anything you want with it. You are free to copy files into a directory of my choosing, but beyond that, I'm in charge. It's my computer, not yours.
So here's how I got calibre's installation script to behave according to my wishes.
Download the installation script:$ wget -nv https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py
Run the installation script such that it installs to /tmp/calibre:$ python -c 'execfile("linux-installer.py"); main(install_dir="/tmp")'
Move the installation to its permanent home:$ sudo mv calibre /usr/local/calibre-$VERSION
Make sure the shell can find "calibre" (first time only):$ cd /usr/local $ sudo ln -s calibre-$VERSION calibre $ sudo ln -s ../calibre/calibre bin/.
For future upgrades, repeat steps 1-3. Then you just have to replace the /usr/local/calibre symlink:
$ cd /usr/local $ sudo rm calibre $ sudo ln -s calibre-$VERSION calibre
and the existing /usr/local/bin/calibre symlink will now point to the new version. If the upgrade is a failure, rolling back to the previous version is trivial.