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