From fc8d1709077ee29a16c055753e0b90de0e75bc211d27a6e161db7bc6e095c0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 28 Apr 2015 09:26:22 +0000 Subject: [PATCH] Accepting request 304215 from home:pluskalm:branches:graphics - Cleanup spec file with spec-cleaner - Update dependencies - Use url for source - Remove _DATE_ and _TIME_ OBS-URL: https://build.opensuse.org/request/show/304215 OBS-URL: https://build.opensuse.org/package/show/graphics/zimg?expand=0&rev=9 --- zimg-5.0.0.tar.bz2 | 3 -- zimg-5.0.0.tar.gz | 3 ++ zimg.changes | 8 ++++++ zimg.spec | 72 ++++++++++++++++++++++------------------------ 4 files changed, 45 insertions(+), 41 deletions(-) delete mode 100644 zimg-5.0.0.tar.bz2 create mode 100644 zimg-5.0.0.tar.gz diff --git a/zimg-5.0.0.tar.bz2 b/zimg-5.0.0.tar.bz2 deleted file mode 100644 index ffe5c5d..0000000 --- a/zimg-5.0.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f2128e64d1a3e2b1222c0255b041150ddd4884827474dd3cfbbd7b78551ed5c -size 264616 diff --git a/zimg-5.0.0.tar.gz b/zimg-5.0.0.tar.gz new file mode 100644 index 0000000..d26b33a --- /dev/null +++ b/zimg-5.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d992bbb7f24d4c4ad7f6fec2f4efa7dee77222ad086881a2082426e9bfb3e099 +size 384858 diff --git a/zimg.changes b/zimg.changes index dc4db50..6846e8d 100644 --- a/zimg.changes +++ b/zimg.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Apr 27 16:20:47 UTC 2015 - mpluskal@suse.com + +- Cleanup spec file with spec-cleaner +- Update dependencies +- Use url for source +- Remove _DATE_ and _TIME_ + ------------------------------------------------------------------- Wed Mar 13 12:16:01 CET 2013 - pgajdos@suse.cz diff --git a/zimg.spec b/zimg.spec index 50a5cf0..5cb07e0 100644 --- a/zimg.spec +++ b/zimg.spec @@ -1,7 +1,7 @@ # # spec file for package zimg # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,6 +17,18 @@ Name: zimg +Version: 5.0.0 +Release: 0 +Summary: Display 2-D data of arbitrary format +License: BSD-3-Clause +Group: Productivity/Graphics/Visualization/Graph +Url: http://sourceforge.net/projects/zimg/ +Source0: http://sourceforge.net/projects/zimg/files/zimg/zimg-%{version}/%{name}-%{version}.tar.gz +Source1: %{name}.changes +Patch0: %{name}-%{version}.patch +Patch1: zimg-automake-1.13.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: freetype2-devel BuildRequires: gd-devel BuildRequires: libpng-devel @@ -24,18 +36,9 @@ BuildRequires: libtiff-devel BuildRequires: libtool BuildRequires: xorg-x11 BuildRequires: xorg-x11-devel -Requires: gd >= 1.8.3 -Version: 5.0.0 -Release: 0 -Source: %{name}-%{version}.tar.bz2 -Patch: %{name}-%{version}.patch -Patch1: zimg-automake-1.13.patch -Url: http://sourceforge.net/projects/zimg/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Summary: Display 2-D data of arbitrary format -License: BSD-3-Clause -Group: Productivity/Graphics/Visualization/Graph Requires: ImageMagick +Requires: gd >= 1.8.3 +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description zimg generates png images from arbitrary formatted f(x,y) data. Both @@ -44,41 +47,34 @@ supported. Output options include variable logarithmic color mapping VLCM and contour graphics and lots of color maps. zimg is a fast converter. - - -Authors: --------- - Johannes Zellner - %prep -%setup -%patch +%setup -q +%patch0 %patch1 -p1 +# Do not include build time +modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE1}")" +DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" +TIME="\"$(date -d "${modified}" "+%%R")\"" +find . -name '*.[ch]' |\ + xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" %build -%define prefix /usr/ autoreconf -fi -CFLAGS="$RPM_OPT_FLAGS" \ -CXXFLAGS="$RPM_OPT_FLAGS" \ -./configure --mandir=%{_mandir} \ - --prefix=%{prefix} \ - --with-gd-includes=/usr/include/ \ - --with-x-viewer=display \ - --with-gd-lib=%{_libdir} \ - --with-jpeg-lib=%{_libdir} -make xpm_libs="-L/usr/X11R6/%{_lib} -lXpm -lX11" +%configure \ + --with-gd-includes=%{_includedir}/ \ + --with-x-viewer=display \ + --with-gd-lib=%{_libdir} \ + --with-jpeg-lib=%{_libdir} +make xpm_libs="-L/usr/X11R6/%{_lib} -lXpm -lX11" %{?_smp_mflags} %install -make DESTDIR=$RPM_BUILD_ROOT install -rm -f $RPM_BUILD_ROOT/usr/include/zimg.h - -%clean -rm -rf $RPM_BUILD_ROOT +make DESTDIR=%{buildroot} install %{?_smp_mflags} +rm -f %{buildroot}%{_includedir}/zimg.h %files %defattr(-,root,root) -%doc README ChangeLog AUTHORS COPYING NEWS TODO -/usr/bin/zimg -/usr/share/man/man1/zimg* +%doc README ChangeLog AUTHORS COPYING NEWS TODO +%{_bindir}/zimg +%{_mandir}/man1/zimg* %changelog