]> git.pld-linux.org Git - packages/fail.git/blob - fail.spec
- release 3
[packages/fail.git] / fail.spec
1 # TODO:
2 # - register gnome thumbnailer in more package-friendly way (not multiple gconftool runs)
3 # - webapp config for -html5? (optional, may be used also locally)
4 #
5 # Conditional build:
6 %bcond_without  html5   # HTML5 viewer
7 %bcond_without  magick  # ImageMagick coder
8 #
9 # html5 requires cito that requires mono that is not available yet on x32
10 %ifarch x32
11 %undefine       with_html5
12 %endif
13
14 Summary:        FAIL - First Atari Image Library
15 Summary(pl.UTF-8):      FAIL (First Atari Image Library) - biblioteka do obrazów w formatach Atari
16 Name:           fail
17 Version:        2.0.1
18 Release:        18
19 License:        GPL v2+
20 Group:          Applications/Graphics
21 Source0:        http://downloads.sourceforge.net/fail/%{name}-%{version}.tar.gz
22 # Source0-md5:  b9362106f9a23a1f99ff7bece94d9aa7
23 Patch0:         imagemagick7.patch
24 URL:            http://fail.sourceforge.net/
25 %{?with_magick:BuildRequires:   ImageMagick-devel >= 1:6.8}
26 %{?with_html5:BuildRequires:    asciidoc}
27 %{?with_html5:BuildRequires:    cito}
28 BuildRequires:  libpng-devel
29 BuildRequires:  libxslt-progs
30 BuildRequires:  zlib-devel
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %if %{with magick}
34 %define         im_coders_dir   %{_libdir}/%(MagickCore-config --version | sed -e 's,^\\([.0-9]\\+\\) \\+\\(Q[0-9]\\+\\)\\( \\+\\(HDRI\\)\\)\\?.*,ImageMagick-\\1/modules-\\2\\4,')/coders
35 %endif
36
37 %description
38 FAIL is a viewer of pictures in native formats of Atari 8-bit, Atari
39 ST, Atari Falcon and Atari Portfolio computers.
40
41 %description -l pl.UTF-8
42 FAIL to narzędzia do przeglądania obrazów w natywnych formatach
43 komputerów Atari 8-bitowych, Atari ST, Atari Falcon oraz Atari
44 Portfolio.
45
46 %package gnome
47 Summary:        FAIL support for viewing Atari files in GNOME
48 Summary(pl.UTF-8):      Wsparcie FAIL do oglądania plików z Atari w GNOME
49 Group:          X11/Applications/Graphics
50 Requires:       %{name} = %{version}-%{release}
51
52 %description gnome
53 FAIL support for viewing Atari files in GNOME.
54
55 %description gnome -l pl.UTF-8
56 Wsparcie FAIL do oglądania plików z Atari w GNOME.
57
58 %package html5
59 Summary:        HTML5 FAIL viewer for Atari files
60 Summary(pl.UTF-8):      Przeglądarka FAIL do plików z Atari w HTML5
61 Group:          Applications/WWW
62
63 %description html5
64 HTML5 FAIL viewer for Atari files.
65
66 %description html5 -l pl.UTF-8
67 Przeglądarka FAIL do plików z Atari w HTML5.
68
69 %package -n ImageMagick-coder-fail
70 Summary:        FAIL coder for ImageMagick
71 Summary(pl.UTF-8):      Koder FAIL dla ImageMagicka
72 Group:          Libraries
73 %requires_ge_to ImageMagick ImageMagick-devel
74
75 %description -n ImageMagick-coder-fail
76 FAIL coder for ImageMagick to read Atari formats.
77
78 %description -n ImageMagick-coder-fail -l pl.UTF-8
79 Koder FAIL dla ImageMagicka, czytający formaty Atari.
80
81 %prep
82 %setup -q
83 %patch0 -p1
84
85 %build
86 %{__make} all fail-mime.xml \
87         CC="%{__cc}" \
88         CFLAGS="%{rpmcflags} -Wall" \
89 %if %{with magick}
90         MAGICK_INCLUDE_PATH=/usr/include/ImageMagick-7/private \
91         CAN_INSTALL_MAGICK=1
92 %endif
93
94 %if %{with html5}
95 %{__make} -C html5
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} install-fail2png \
102         PREFIX=$RPM_BUILD_ROOT%{_prefix}
103
104 # install-thumbnailer is ugly; for now, install only this one
105 install -D fail-mime.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/fail-mime.xml
106
107 %if %{with magick}
108 install -D fail.so $RPM_BUILD_ROOT%{im_coders_dir}/fail.so
109 echo "dlname='fail.so'" >$RPM_BUILD_ROOT%{im_coders_dir}/fail.la
110 %endif
111
112 %if %{with html5}
113 install -d $RPM_BUILD_ROOT%{_datadir}/fail-html5
114 cp -p html5/*.{js,html} $RPM_BUILD_ROOT%{_datadir}/fail-html5
115 %endif
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %doc README.html
123 %attr(755,root,root) %{_bindir}/fail2png
124
125 %files gnome
126 %defattr(644,root,root,755)
127 %{_datadir}/mime/packages/fail-mime.xml
128 # TODO: gconf files?
129
130 %if %{with html5}
131 %files html5
132 %defattr(644,root,root,755)
133 %{_datadir}/fail-html5
134 %endif
135
136 %if %{with magick}
137 %files -n ImageMagick-coder-fail
138 %defattr(644,root,root,755)
139 %attr(755,root,root) %{im_coders_dir}/fail.so
140 %{im_coders_dir}/fail.la
141 %endif
This page took 0.163591 seconds and 3 git commands to generate.