dcraw/update_dcraw
Fridrich Strba a0d762e298 Accepting request 827153 from home:elimat:branches:graphics
- Update to version 9.28.0:
  dcraw - revision 1.478
  * Caught up on two years' worth of new cameras.
- Update upstream URL to new address
- Add patches for CVEs:
  * dcraw-CVE-2017-13735.patch (CVE-2017-13735)
  * dcraw-CVE-2017-14608.patch (CVE-2017-14608)
  * dcraw-CVE-2018-19655.patch (CVE-2018-19655)
  * dcraw-CVE-2018-5801.patch (CVE-2018-5801)
- Run spec-cleaner
  * Remove package groups

OBS-URL: https://build.opensuse.org/request/show/827153
OBS-URL: https://build.opensuse.org/package/show/graphics/dcraw?expand=0&rev=50
2020-08-24 14:05:29 +00:00

34 lines
1.6 KiB
Bash

#! /bin/sh
# Call this script to update dcraw files to latest version.
# "wget", "rcs" and "lynx" packages are required for the update
wget -N https://www.dechifro.org/dcraw/parse.c
wget -N https://www.dechifro.org/dcraw/fujiturn.c
wget -N https://www.dechifro.org/dcraw/rawphoto.c
wget -N https://www.dechifro.org/dcraw/clean_crw.c
wget -N https://www.dechifro.org/dcraw/fuji_green.c
mv badpixels .badpixels
wget -N https://www.dechifro.org/dcraw/.badpixels
mv .badpixels badpixels
( URL="https://www.dechifro.org/dcraw/" ; echo -e "$URL:\n" ; LC_ALL=C lynx -display_charset=utf-8 -dump "$URL" | sed '1d;3,4d' ) >README
OLDVERSION=`sed -ne 's/^Version:[[:space:]]*\([0-9.]\+\)[[:space:]]*$/\1/p' dcraw.spec`
NEWVERSION=`lynx -dump https://www.dechifro.org/dcraw/archive/ | sed -n -e 's/^.*dcraw-\([0-9.]\+\)\.tar\.gz.*$/\1/p' |sort -nr |head -1`
wget -N https://www.dechifro.org/dcraw/archive/dcraw-${NEWVERSION}.tar.gz
sed -i -e "s/^\(Version:[[:space:]]*\)[0-9.]\+[[:space:]]*$/\1${NEWVERSION}/" dcraw.spec
tar --strip-components=1 -xf dcraw-${OLDVERSION}.tar.gz dcraw/dcraw.c
rm dcraw-${OLDVERSION}.tar.gz
wget -N https://www.dechifro.org/dcraw/RCS/dcraw.c,v
rlog dcraw.c >dcraw.log
rm -f dcraw.c dcraw.c,v
wget -N https://www.dechifro.org/dcraw/RCS/parse.c,v
rlog parse.c >parse.log
rm parse.c,v
echo
echo "********************************************************************"
echo "********************************************************************"
echo "Please check, whether packaged file list is up to date."
echo "You can look at dcraw.log and parse.log for the complete change log."
echo "Before submit, please call:"
echo "rm dcraw.log parse.log"