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