]> git.pld-linux.org Git - packages/fail.git/blobdiff - fail.spec
- release 6 (by relup.sh)
[packages/fail.git] / fail.spec
index eefdc54f6851653757c112f3d0ee1a322bc978fd..97cab12d3ff8dadda03d5c6999cb10c3213754f1 100644 (file)
--- a/fail.spec
+++ b/fail.spec
@@ -1,22 +1,37 @@
-# TODO: register gnome thumbnailer in more package-friendly way (not multiple gconftool runs)
+# TODO:
+# - register gnome thumbnailer in more package-friendly way (not multiple gconftool runs)
+# - webapp config for -html5? (optional, may be used also locally)
+#
+# Conditional build:
+%bcond_without html5   # HTML5 viewer
+%bcond_without magick  # ImageMagick coder
+#
+# html5 requires cito that requires mono that is not available yet on x32
+%ifarch x32
+%undefine      with_html5
+%endif
+
 Summary:       FAIL - First Atari Image Library
 Summary(pl.UTF-8):     FAIL (First Atari Image Library) - biblioteka do obrazów w formatach Atari
 Name:          fail
-Version:       2.0.0
-Release:       1
+Version:       2.0.1
+Release:       6
 License:       GPL v2+
 Group:         Applications/Graphics
 Source0:       http://downloads.sourceforge.net/fail/%{name}-%{version}.tar.gz
-# Source0-md5: de3592b78144ef3c6b2e98377522df69
+# Source0-md5: b9362106f9a23a1f99ff7bece94d9aa7
 URL:           http://fail.sourceforge.net/
-BuildRequires: ImageMagick-devel > 6.7.9.10-1
+%{?with_magick:BuildRequires:  ImageMagick-devel >= 1:6.8}
+%{?with_html5:BuildRequires:   asciidoc}
+%{?with_html5:BuildRequires:   cito}
 BuildRequires: libpng-devel
 BuildRequires: libxslt-progs
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                magick_ver      %(MagickCore-config --version)
-%define                im_coders_dir   %{_libdir}/%(MagickCore-config --version | sed -e 's,^\\([.0-9]\\+\\) \\+\\(Q[0-9]\\+\\).*,ImageMagick-\\1/modules-\\2,')/coders
+%if %{with magick}
+%define                im_coders_dir   %{_libdir}/%(MagickCore-config --version | sed -e 's,^\\([.0-9]\\+\\) \\+\\(Q[0-9]\\+\\)\\( \\+\\(HDRI\\)\\)\\?.*,ImageMagick-\\1/modules-\\2\\4,')/coders
+%endif
 
 %description
 FAIL is a viewer of pictures in native formats of Atari 8-bit, Atari
@@ -39,11 +54,22 @@ FAIL support for viewing Atari files in GNOME.
 %description gnome -l pl.UTF-8
 Wsparcie FAIL do oglądania plików z Atari w GNOME.
 
+%package html5
+Summary:       HTML5 FAIL viewer for Atari files
+Summary(pl.UTF-8):     Przeglądarka FAIL do plików z Atari w HTML5
+Group:         Applications/WWW
+
+%description html5
+HTML5 FAIL viewer for Atari files.
+
+%description html5 -l pl.UTF-8
+Przeglądarka FAIL do plików z Atari w HTML5.
+
 %package -n ImageMagick-coder-fail
 Summary:       FAIL coder for ImageMagick
 Summary(pl.UTF-8):     Koder FAIL dla ImageMagicka
 Group:         Libraries
-Requires:      ImageMagick >= %{magick_ver}
+%requires_ge_to        ImageMagick ImageMagick-devel
 
 %description -n ImageMagick-coder-fail
 FAIL coder for ImageMagick to read Atari formats.
@@ -58,8 +84,14 @@ Koder FAIL dla ImageMagicka, czytający formaty Atari.
 %{__make} all fail-mime.xml \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags} -Wall" \
-       MAGICK_INCLUDE_PATH=/usr/include/ImageMagick/private \
+%if %{with magick}
+       MAGICK_INCLUDE_PATH=/usr/include/ImageMagick-6/private \
        CAN_INSTALL_MAGICK=1
+%endif
+
+%if %{with html5}
+%{__make} -C html5
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -70,8 +102,15 @@ rm -rf $RPM_BUILD_ROOT
 # install-thumbnailer is ugly; for now, install only this one
 install -D fail-mime.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/fail-mime.xml
 
+%if %{with magick}
 install -D fail.so $RPM_BUILD_ROOT%{im_coders_dir}/fail.so
 echo "dlname='fail.so'" >$RPM_BUILD_ROOT%{im_coders_dir}/fail.la
+%endif
+
+%if %{with html5}
+install -d $RPM_BUILD_ROOT%{_datadir}/fail-html5
+cp -p html5/*.{js,html} $RPM_BUILD_ROOT%{_datadir}/fail-html5
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -86,7 +125,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/mime/packages/fail-mime.xml
 # TODO: gconf files?
 
+%if %{with html5}
+%files html5
+%defattr(644,root,root,755)
+%{_datadir}/fail-html5
+%endif
+
+%if %{with magick}
 %files -n ImageMagick-coder-fail
 %defattr(644,root,root,755)
 %attr(755,root,root) %{im_coders_dir}/fail.so
 %{im_coders_dir}/fail.la
+%endif
This page took 0.216612 seconds and 4 git commands to generate.