From 064fe0121313cfbdce2f3194fae0593548968d1c Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 1 Feb 2007 17:04:13 +0000 Subject: [PATCH] upstream finally has a tarball, use that and its version (#209016) use dist tag Resolves: #209016 --- .cvsignore | 3 +-- dcraw.spec | 52 +++++++++++++++++++++++++++++++++++++--------------- sources | 3 +-- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2106666..da109e1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -dcraw-20060521.c -dcraw-20060521.1 +dcraw-8.53.tar.gz diff --git a/dcraw.spec b/dcraw.spec index 19ae67f..0682588 100644 --- a/dcraw.spec +++ b/dcraw.spec @@ -1,37 +1,53 @@ -%define dcrawdate 20060521 -%define dcrawmandate 20060521 - Summary: A tool for decoding raw image data from digital cameras. Name: dcraw -Version: 0.0.%dcrawdate -Release: 1.1 +Version: 8.53 +Release: 1%{?dist} Group: Applications/Multimedia License: GPL -#The next file is actually http://www.cybercom.net/~dcoffin/dcraw/dcraw.c -#but as it doesn't contain any version info in the file name... -Source0: dcraw-%{dcrawdate}.c -#Actually http://www.cybercom.net/~dcoffin/dcraw/dcraw.1 -Source1: dcraw-%{dcrawmandate}.1 +URL: http://cybercom.net/~dcoffin/dcraw +Source0: http://cybercom.net/~dcoffin/dcraw/archive/dcraw-%{version}.tar.gz +BuildRequires: gettext BuildRequires: libjpeg-devel BuildRequires: lcms-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%__id_u -n) %description This package contains dcraw, a command line tool to decode raw image data downloaded from digital cameras. %prep -%setup -c -T -cp %{SOURCE0} dcraw.c +%setup -q -n dcraw %build -gcc %optflags -lm -ljpeg -llcms -o dcraw dcraw.c +gcc %optflags -lm -ljpeg -llcms -DLOCALEDIR="%{_datadir}/locale" -o dcraw dcraw.c +# build language catalogs +for catsrc in dcraw_*.po; do + lang="${catsrc%.po}" + lang="${lang#dcraw_}" + msgfmt -o "dcraw_${lang}.mo" "$catsrc" +done %install rm -rf %buildroot -install -d -m 0755 %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1 install -m 0755 dcraw %{buildroot}%{_bindir} + +# install language catalogs +for catalog in dcraw_*.mo; do + lang="${catalog%.mo}" + lang="${lang#dcraw_}" + install -d -m 0755 "%{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES" + install -m 0644 "$catalog" "%{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/dcraw.mo" +done + +install -d -m 0755 %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1 install -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/dcraw.1 +# localized manpages +for manpage in dcraw_*.1; do + lang="${manpage%.1}" + lang="${lang#dcraw_}" + install -d -m 0755 "%{buildroot}%{_mandir}/${lang}/man1" + install -m 0644 "${manpage}" "%{buildroot}%{_mandir}/${lang}/man1/dcraw.1" +done %clean rm -rf %buildroot @@ -39,9 +55,15 @@ rm -rf %buildroot %files %defattr(-, root, root) %{_bindir}/dcraw +%{_datadir}/locale/*/LC_MESSAGES/*.mo %{_mandir}/man1/* +%{_mandir}/*/man1/* %changelog +* Thu Feb 01 2007 Nils Philippsen - 8.53-1 +- upstream finally has a tarball, use that and its version (#209016) +- use dist tag + * Wed Jul 12 2006 Jesse Keating - 0.0.20060521-1.1 - rebuild diff --git a/sources b/sources index 9e8ad5a..8b48aa6 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -24085edf502b0eef02da1f9f72f3fdaf dcraw-20060521.c -bcd24b7c28092a6a4c5b9687987131b8 dcraw-20060521.1 +0b3e927af2c6ccbfbe5f9dc81fb0b866 dcraw-8.53.tar.gz