Bug#131252: apt: When built from source, apt always says there is a newer version.
Thank you for the insight. It is probably best for user-support to have
this.
I've tried some bash/perl/sed/whatever scripting.
I'm attaching this horrible script to this email. It will probably only
work with english locale, but it works for me.
Thanks,
Vincent
PS. Just for the record. This script is not a very good solution, but
for everyone who wants something to download-build-install source
debs...
HINT: Install pentium-builder for optimized building.
-------script--------
#!/bin/sh
case "$1" in
install)
if [ -x /tmp/debian-cast ]; then
echo "Werkmap bestaat nog! Aborted."
echo "Verwijder met 'script clean'"
exit 0
fi
echo "Werkmap wordt gemaakt."
mkdir /tmp/debian-cast
cd /tmp/debian-cast
echo "Broncode wordt opgehaald."
echo "Let op eventuele foutmeldingen en rapporteer die"
echo "bij bugs.debian.org (build-dep en sourcebuild problemen)"
apt-get build-dep $2
compilefolder=`apt-get source $2 | grep dpkg-source | awk
'{print $5}'`
cd $compilefolder
mv debian/changelog debian/changelog.old
cat debian/changelog.old | sed s/\)/.owncompile\)/ >
debian/changelog
rm debian/changelog.old
echo "Broncode wordt gebouwd..."
debian/rules binary
if dpkg -i /tmp/debian-cast/*.deb; then
echo "Installatie voltooid. Werkmap wordt verwijderd."
rm -rf /tmp/debian-cast
else
echo "Fout opgetreden bij installatie."
echo "Ik verwijder de werkmap nog niet."
fi
echo "klaar."
;;
clean)
rm -rf /tmp/debian-cast
;;
*)
echo "gebruik: script install pakketnaam, script clean."
exit 1
;;
esac
---------end script----------
Reply to: