Building a Package
NOTE: Debian already has inkscape packages; these instructions are just for installing the most up-to-date version, that may not have reached Debian's official archives yet.
Downloading the sourcefile and building it on Debian Unstable/Sid
You can download the source for Inkscape from The Inkscape download page on Sourceforge.net. Just look for the latest version, and choose the file for that version that ends with ".tar.bz2". For the sake of this example, I'll pretend you've downloaded "inkscape-0.42.tar.bz2", and that you're keeping it in your home directory (~/).
Make a temporary directory, somewhere that has enough space to build software:
mkdir -p ~/tmp/inkscape cd ~/tmp/inkscape tar xvjf ~/inkscape-0.42.tar.bz2 cd inkscape-0.42
Preparing debian for the software
Since Debian is already aware of older inkscape versions, you can take advantage of this, and have Debian help you install the correct packages that you'll need to build the new version.
apt-get build-dep inkscape (do this as the root user)
There may still be a few packages missing, but we'll handle those later. You'll also need some other software:
apt-get install build-essential dpkg-dev fakeroot (do this as the root user)
Building the package
To build the package, just do:
dpkg-buildpackage -uc -us -rfakeroot
If this complains about any missing dependancies, it may be because the newer version of inkscape requires something that isn't in the older, official Debian package. Just use the apt-get install command to add whatever it complains about. For instance, if it said you needed libfoo, you would just do: apt-get install libfoo. Then, try the above dpkg-buildpackage command again.
Building will take a while, so be prepared, and don't panic if it seems like nothing is happening for a while.
Assuming the build process was successful, a debian package will have been created in the parent directory. To install it, just do:
dpkg -i inkscape*.deb (do this as the root user)
All of these build files can waste space on your computer, if you're happy that the install was successful, and you want to clean up those temporary files, you can just do:
cd .. rm -rf inkscape (again, do this as root)
The /debian/control file asserts the following build dependencies
Build-Depends: automake1.7, debhelper (>= 4.0.0), intltool, libart-2.0-dev (>= 2.3.10), libgc-dev, libgtk2.0-dev (>= 2.0.6-1), libgtkmm-2.4-dev, libpango1.0-dev, libpng12-dev, libpopt-dev, libsigc++-2.0-dev, libtool, libxml-parser-perl, libxml2-dev (>= 2-2.4.24), pkg-config, zlib1g-dev
The makefile below also requires the dpkg-dev package.
TrentBuck used the following makefile to construct a Debian package:
- !/usr/bin/make -f
package = inkscape version = 0.40pre2 directory = $(package)-$(version) tarball = $(package)-$(version).tar.gz url = http://dl.sf.net/sourceforge/$(package)/$(tarball)
default all: clean WORKING $(tarball) tar -C WORKING -zxf $(tarball) $(MAKE) -C WORKING/$(directory) -f $(PWD)[[/Makefile]] build $(tarball):
- Most users will want to replace this with simply `wget $(url)'.
if test -s /alt/wget/$(url); then cp /alt/wget/$(url) .; else wget $(url); fi WORKING: test -d $@ || mkdir $@ clean: WORKING -cd WORKING && rm -rf $(package) -cd WORKING && rm -f *.asc *.build *.changes *.dsc *.tar.gz distclean: -rm -f $(tarball) -rm -rf WORKING && mkdir WORKING
- Never call make this target directly!
build: # COPY MISSING /debian FILES FROM CVS! # PREPEND AN ENTRY TO /debian/changelog TO SET PACKAGE VERSION! dpkg-buildpackage -rfakeroot
.PHONY: default all clean distclean build
The following additional changes are required to build a correct package:
- prepend an entry to /debian/changelog so that the debian package has the correct version.
- copy from CVS any of the following files missing from /debian: changelog compat control copyright dirs docs inkscape.applications inkscape.menu inkscape.xpm mime rules
Updating the Changelog
The debian package should have the name inkscape_VERSION_ARCHITECTURE.deb.
The version number should be
- STABLE-DEBVER for official releases
- For example, 0.39-1.
STABLE is the current stable version of Inkscape, DEBVER is the debian minor version (usually 1).
- STABLE+VERSION-DEBVER for prereleases, releases candidates, etc
- For example, 0.39+0.40pre2-1.
VERSION is the prerelease version.
- STABLE+cvsDATE-DEBVER for CVS releases
- For example, 0.39+cvs20041111-1.
DATE is the date when the repository was checked out, in YYYYMMDD format.
Thus your changelog entry should be something like
inkscape (0.39+0.40pre2-1) unstable; urgency=low
* Non-maintainer build.
-- Trent Buck <email@example.com> Thu, 11 Nov 2004 03:09:18 +1100
Note that spacing is significant in debian changelog entryies (e.g. must be two spaces after email address).