I have created a generalized bash script that rebuilds .deb packages, changing the dependency from libsane (whatever version) to libsane1 (>= 1.0.27). Here for your enjoyment is "fixlibsane1.sh":
[code]
#!/bin/bash
# A simple script to make packages that are uninstallable due to change from
# libsane to libsane1 installable, by changing the dependency in the .deb package.
# First parameter is path to .deb file to modify, like so:
# ./fixlibsane1.sh iscan_2.30.3-1_amd64.deb
# The "Depends: field will have libsane (version)" changed to "libsane1 (>= 1.0.27)"
# A new deb package will be created alongside the original, ending in "-mod.deb"
# --Warren Severin
if [ ! "$indebext" = "deb" ]; then
echo "Did you enter the path to the .deb file as the first parameter? Exiting."; exit 1; fi
if [ ! -e "$indebfull" ]; then
echo "Not finding $indebfull. Exiting."; exit 1; fi
if [ -z $(which perl) ]; then
echo "This script requires perl. Do you need to install it? Exiting."; exit 1; fi
I have created a generalized bash script that rebuilds .deb packages, changing the dependency from libsane (whatever version) to libsane1 (>= 1.0.27). Here for your enjoyment is "fixlibsane1.sh":
[code]
#!/bin/bash
# A simple script to make packages that are uninstallable due to change from 30.3-1_ amd64.deb
# libsane to libsane1 installable, by changing the dependency in the .deb package.
# First parameter is path to .deb file to modify, like so:
# ./fixlibsane1.sh iscan_2.
# The "Depends: field will have libsane (version)" changed to "libsane1 (>= 1.0.27)"
# A new deb package will be created alongside the original, ending in "-mod.deb"
# --Warren Severin
indebfull=$1 $(basename "$indebfull") "${indebbase# #*.}" "${indebbase% .*}"
indebbase=
indebdir=$(dirname "$indebfull")
indebext=
indebroot=
tmpdir=$(mktemp -d)
if [ ! "$indebext" = "deb" ]; then
echo "Did you enter the path to the .deb file as the first parameter? Exiting."; exit 1; fi
if [ ! -e "$indebfull" ]; then
echo "Not finding $indebfull. Exiting."; exit 1; fi
if [ -z $(which perl) ]; then
echo "This script requires perl. Do you need to install it? Exiting."; exit 1; fi
dpkg-deb -x "$indebfull" "$tmpdir" .*?)libsane( +\(.*?\ ))?/\1libsane1 (>= 1.0.27)/' "$tmpdir/ DEBIAN/ control" /${indebroot} -mod.deb"
dpkg-deb --control "$indebfull" "$tmpdir/DEBIAN"
perl -i -pe 's/^(Depends:
dpkg -b "$tmpdir" "${indebdir}
rmdir --ignore- fail-on- non-empty "$tmpdir"
echo "Done!"
[/code]