Commit 530041fa58144273ae1a57c6a9dfc84d17a4c288

Authored by Ben Finney
2 parents 9ed24d1a 8f2c83b4

Merge Debian packaging for release “0.6.1-2”.

debian/changelog
  1 +comixcursors (0.6.1-2) unstable; urgency=low
  2 +
  3 + * The “Clochettes” release.
  4 + * debian/control:
  5 + + “Build-Depends: librsvg2-bin” instead of inkscape.
  6 + * debian/patches/03-convert-using-rsvg.patch:
  7 + + Use ‘rsvg’ for conversion from SVG to PNG.
  8 +
  9 + -- Ben Finney <ben+debian@benfinney.id.au> Sun, 09 May 2010 13:01:22 +1000
  10 +
1 11 comixcursors (0.6.1-1) unstable; urgency=low
2 12  
3 13 * The “Baladin” release.
... ...
debian/control
... ... @@ -5,7 +5,7 @@ Maintainer: Ben Finney &lt;ben+debian@benfinney.id.au&gt;
5 5 VCS-bzr: http://bzr.debian.org/collab-maint/comixcursors/comixcursors.debian/
6 6 Build-Depends:
7 7 bc,
8   - inkscape,
  8 + librsvg2-bin,
9 9 imagemagick,
10 10 x11-apps,
11 11 debhelper (>= 7.0.50)
... ...
debian/patches/03-convert-using-rsvg.patch 0 → 100644
... ... @@ -0,0 +1,158 @@
  1 +Description: Use ‘rsvg’ for conversion from SVG to PNG.
  2 +Origin: Created to improve package build speed.
  3 +Author: Ben Finney <ben+debian@benfinney.id.au>
  4 +Last-Update: 2010-05-07
  5 +
  6 +=== modified file 'INSTALL'
  7 +--- old/INSTALL 2010-04-23 05:50:33 +0000
  8 ++++ new/INSTALL 2010-05-07 07:28:51 +0000
  9 +@@ -5,8 +5,8 @@
  10 + ==================
  11 +
  12 + Requirements:
  13 +-- ImageMagick (www.imagemagick.org)
  14 +-- inkscape (www.inkscape.org)
  15 ++- ImageMagick <http://www.imagemagick.org/>
  16 ++- librsvg <http://librsvg.sourceforge.net/>
  17 +
  18 + Download the ComixCursors sources from:
  19 +
  20 +@@ -17,15 +17,15 @@
  21 + # tar -xjvf ComixCursours-0.5.0.tar.bz2
  22 + # cd ComixCursors-0.5.0
  23 +
  24 +-With ImageMagick and inkscape installed
  25 ++With the programs from ImageMagick and librsvg installed,
  26 + build and install the custom ComixCursors:
  27 +
  28 + # ./install.bash
  29 +
  30 + This will parse the CONFIG and HOTSPOTS files, export the
  31 + cursor source files in the svn directory to PNGs in the
  32 +-build directory (using inkscape), assemble and apply some
  33 +-effects using ImageMagick tools convert and mogrify, create
  34 ++build directory (using ‘rsvg’), assemble and apply some
  35 ++effects using ImageMagick tools ‘convert’ and ‘mogrify’, create
  36 + the xcursors in the cursors directory, and install the files
  37 + in your ~/.icons directory.
  38 + Not that the shadow images will be cached to reduce building
  39 +
  40 +=== modified file 'README'
  41 +--- old/README 2010-04-23 05:50:33 +0000
  42 ++++ new/README 2010-05-07 07:30:06 +0000
  43 +@@ -4,11 +4,10 @@
  44 +
  45 + INSTALLATION
  46 +
  47 +-You need to have the ImageMagick (www.imagemagick.org)
  48 +-tools and Inkscape (www.inkscape.org) installed, to run
  49 +-the installation script!
  50 ++Refer to the ‘INSTALL’ file for requirements and detailed instructions
  51 ++to build and install.
  52 +
  53 +-If you have, issue
  54 ++If you have the required programs, issue
  55 +
  56 + # ./install.bash
  57 +
  58 +
  59 +=== modified file 'svg2png.bash'
  60 +--- old/svg2png.bash 2010-04-23 05:50:33 +0000
  61 ++++ new/svg2png.bash 2010-05-07 11:52:49 +0000
  62 +@@ -1,18 +1,19 @@
  63 + #!/bin/bash
  64 + ##########################################################
  65 +-# svg2png.bash #
  66 +-# 2006 Jens Luetkens <j.luetkens@limitland.de> #
  67 +-# version: ComixCursors 0.5.0 #
  68 +-# flatbedcursors 0.1 (compatible) #
  69 +-# #
  70 +-# take a simple svg file, export it to an image, #
  71 +-# do some image magig, generate a shadow, scale #
  72 +-# and merge it to a single image #
  73 +-# #
  74 +-# Required tools: #
  75 +-# ImageMagick : http://www.imagemagick.org #
  76 +-# Inkscape : http://www.inkscape.org #
  77 +-# #
  78 ++# svg2png.bash
  79 ++# Copyright © 2010 Ben Finney <ben+debian@benfinney.id.au>
  80 ++# Copyright © 2006 Jens Luetkens <j.luetkens@limitland.de>
  81 ++# version: ComixCursors 0.5.0
  82 ++# flatbedcursors 0.1 (compatible)
  83 ++#
  84 ++# Take a simple svg file, export it to an image,
  85 ++# do some image magig, generate a shadow, scale
  86 ++# and merge it to a single image.
  87 ++#
  88 ++# Required tools:
  89 ++# ImageMagick: http://www.imagemagick.org
  90 ++# librsvg: http://librsvg.sourceforge.net/
  91 ++#
  92 + ##########################################################
  93 +
  94 + if [ $# -lt 1 ]; then
  95 +@@ -69,11 +70,11 @@
  96 +
  97 + SCALEBLUR=`echo "$BLUR * $TMPSCALE" | bc`
  98 + SCALESIZE=`echo "$SIZE * $TMPSCALE" | bc`
  99 +-CROP=`echo "($SCALESIZE - $TMPSIZE) / 2" | bc`
  100 +
  101 +-# scaling the shadow from a 500x500 px image
  102 +-RIGHT=`echo "500 / $SHADOWSCALE" | bc`
  103 +-LEFT=`echo "500 - $RIGHT" | bc`
  104 ++# Scaling the shadow from the cursor image.
  105 ++SHADOWSIZE=$(echo "$TMPSIZE * $SHADOWSCALE" | bc)
  106 ++RIGHT=$(echo "$TMPSIZE / $SHADOWSCALE" | bc)
  107 ++LEFT=$(echo "$TMPSIZE - $RIGHT" | bc)
  108 +
  109 + if [ ! -d tmp ]; then mkdir tmp ; fi
  110 + if [ ! -d shadows ]; then mkdir shadows ; fi
  111 +@@ -113,27 +114,28 @@
  112 + CURSORIMAGE=tmp/cursor.png
  113 + SCALEDIMAGE=tmp/scaledcursor.png
  114 +
  115 ++function svg2png {
  116 ++ # Convert a single SVG image to PNG.
  117 ++ local infile=$1
  118 ++ local outfile=$2
  119 ++ local size=$3
  120 ++
  121 ++ rsvg --format png \
  122 ++ --dpi-x 72 --dpi-y 72 \
  123 ++ --width $size --height $size \
  124 ++ $infile $outfile
  125 ++}
  126 ++
  127 + # compose the image
  128 +-inkscape -e $CURSORIMAGE \
  129 +- -w $TMPSIZE \
  130 +- -h $TMPSIZE \
  131 +- -b $OUTLINECOLOR \
  132 +- -y 0 \
  133 +- -d 72 \
  134 +- $INFILE >> /dev/null
  135 ++svg2png $INFILE $CURSORIMAGE $TMPSIZE
  136 +
  137 + if [ ! -f $SHADOWIMAGE ]; then
  138 +- # echo "creating shadow image $SHADOWIMAGE..."
  139 +- # scaling the shadow must be done with exporting a different area from inkscape...
  140 +- inkscape -e $SCALEDIMAGE \
  141 +- -a $LEFT:$LEFT:$RIGHT:$RIGHT \
  142 +- -w $TMPSIZE \
  143 +- -h $TMPSIZE \
  144 +- -b $OUTLINECOLOR \
  145 +- -y 0 \
  146 +- -d 72 \
  147 +- $INFILE >> /dev/null
  148 +-
  149 ++ # Make the shadow image from an extract of the cursor.
  150 ++ convert \
  151 ++ -extract ${SHADOWSIZE}x${SHADOWSIZE}+${LEFT}+${LEFT} \
  152 ++ -resize ${TMPSIZE}x${TMPSIZE} \
  153 ++ $CURSORIMAGE $SCALEDIMAGE
  154 ++
  155 + convert -modulate 0 \
  156 + -fill "$SHADOWCOLOR" \
  157 + -colorize 100 \
  158 +
... ...
debian/patches/series
1 1 01-declare-bash-programs.patch
2 2 02-custom-destination.patch
  3 +03-convert-using-rsvg.patch
... ...