# 2022 07 03 Mouse # Make sure LOCALROOT is set. : ${LOCALROOT:=/local} cd sane-backends-1.0.11 VER=`git log -1 --abbrev=10 --pretty=%h` # The damn thing has drunk the ./configure koolaid. :-( MAKE=gnumake CFLAGS="-g -O0 -Wall" ./configure --disable-shared --prefix=/SHOULD/NOT/APPEAR --datadir=$LOCALROOT/.lib/sane-$VER --sysconfdir=$LOCALROOT/.etc/sane-$VER --libdir=$LOCALROOT/.lib/sane-$VER --includedir=$LOCALROOT/.include/sane-$VER --bindir=$LOCALROOT/.bin/sane-$VER --sbindir=$LOCALROOT/.bin/sane-$VER --mandir=$LOCALROOT/.man/sane-$VER # Dammit. docdir here is not frobbable with a configure option; out of the # box, it depends on prefix whether you like it or not. ( echo '/^docdir/s\$.prefix./doc/sane-'$VER\$LOCALROOT'/.lib/sane-'$VER/doc\ ; echo w ; echo q ) | ed - doc/Makefile # Two of the ./configure-generated Makefiles need fixing. (Yet another # example of why ./configure is broken: there's no other apparent way # to do this.) for f in lib/Makefile backend/Makefile; do ( echo '/^CFLAGS/s/$/ -Wno-sign-compare -Wno-missing-init/'; echo w echo q ) | ed - $f done gnumake gnumake install git clean -d -x -f . # Create updated WHERE_I_CAME_FROM for the sake of publish. sed -e "/^version/s@:.*@: $VER@"\ -e "/^date/s@:.*@: "`date +%Y/%m/%d`@\ < ../WHERE_I_CAME_FROM.master > ../WHERE_I_CAME_FROM