]> git.pld-linux.org Git - packages/flif.git/blob - flif.spec
- updated install patch to fix lib suffix
[packages/flif.git] / flif.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4
5 Summary:        Free Lossless Image Format library
6 Summary(pl.UTF-8):      Biblioteka do obsługi formatu FLIF (Free Lossless Image Format)
7 Name:           flif
8 Version:        0.4
9 Release:        1
10 License:        LGPL v3+ (libflif and programs), Apache v2.0 (libflif_dec)
11 Group:          Libraries
12 #Source0Download: https://github.com/FLIF-hub/FLIF/releases
13 Source0:        https://github.com/FLIF-hub/FLIF/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  c9615a4a525ecd39b27317ceb8365652
15 Patch0:         %{name}-install.patch
16 URL:            http://flif.info/
17 BuildRequires:  SDL2-devel >= 2
18 BuildRequires:  cmake >= 2.8.12
19 BuildRequires:  gdk-pixbuf2-devel >= 2.10
20 BuildRequires:  libpng-devel
21 BuildRequires:  libstdc++-devel >= 6:4.7
22 BuildRequires:  pkgconfig
23 BuildRequires:  rpmbuild(macros) >= 1.605
24 BuildRequires:  shared-mime-info
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %if "%{_lib}" != "lib"
28 %define         libext          %(lib="%{_lib}"; echo ${lib#lib})
29 %define         pqext           -%{libext}
30 %else
31 %define         pqext           %{nil}
32 %endif
33
34 %description
35 FLIF is a lossless image format based on MANIAC compression. MANIAC
36 (Meta-Adaptive Near-zero Integer Arithmetic Coding) is a variant of
37 CABAC (context-adaptive binary arithmetic coding), where the contexts
38 are nodes of decision trees which are dynamically learned at encode
39 time.
40
41 FLIF outperforms PNG, FFV1, lossless WebP, lossless BPG and lossless
42 JPEG2000 in terms of compression ratio.
43
44 Moreover, FLIF supports a form of progressive interlacing (essentially
45 a generalization/improvement of PNG's Adam7).
46
47 %description -l pl.UTF-8
48 FLIF (Free Lossless Image Format - wolnodostępny, bezstratny format
49 obrazu) to bezstratny format obrazów oparty na kompresji MANIAC.
50 MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding -
51 meta-adaptacyjne kodowanie arytmetyczne liczbami całkowitymi bliskimi
52 zeru) to wariant kompresji CABAC (kontekstowo-adaptacyjne binarne
53 kodowanie arytmetyczne), gdzie kontekstem są węzły drzew decyzyjnych,
54 dynamicznie wyuczanych w trakcie kodowania.
55
56 FLIF pod względem współczynnika kompresji jest wydajniejszy niż PNG,
57 FFV1, bezstratny WebP, bezstratny BPG i bezstratny JPEG2000.
58
59 Ponadto FLIF obsługuje rodzaj przeplotu progresywnego (zasadniczo
60 uogólnienie/rozwinięcie schematu Adam7 z PNG).
61
62 %package devel
63 Summary:        Header files for FLIF libraries
64 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek FLIF
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description devel
69 Header files for FLIF libraries.
70
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe bibliotek FLIF.
73
74 %package static
75 Summary:        Static FLIF library
76 Summary(pl.UTF-8):      Statyczna biblioteka FLIF
77 Group:          Development/Libraries
78 Requires:       %{name}-devel = %{version}-%{release}
79
80 %description static
81 Static FLIF library.
82
83 %description static -l pl.UTF-8
84 Statyczna biblioteka FLIF.
85
86 %package dec
87 Summary:        FLIF decoder library
88 Summary(pl.UTF-8):      Biblioteka dekodera FLIF
89 License:        Apache v2.0
90 Group:          Libraries
91
92 %description dec
93 FLIF decoder library.
94
95 %description dec -l pl.UTF-8
96 Biblioteka dekodera FLIF.
97
98 %package dec-devel
99 Summary:        Development files for FLIF decoder library
100 Summary(pl.UTF-8):      Pliki programistyczne biblioteki dekodera FLIF
101 License:        Apache v2.0
102 Group:          Development/Libraries
103 Requires:       %{name}-dec = %{version}-%{release}
104 # for headers
105 Requires:       %{name}-devel = %{version}-%{release}
106
107 %description dec-devel
108 Development files for FLIF decoder library.
109
110 %description dec-devel -l pl.UTF-8
111 Pliki programistyczne biblioteki dekodera FLIF.
112
113 %package dec-static
114 Summary:        Static FLIF decoder library
115 Summary(pl.UTF-8):      Statyczna biblioteka dekodera FLIF
116 Group:          Development/Libraries
117 Requires:       %{name}-devel = %{version}-%{release}
118
119 %description dec-static
120 Static FLIF decoder library.
121
122 %description dec-static -l pl.UTF-8
123 Statyczna biblioteka dekodera FLIF.
124
125 %package tools
126 Summary:        Tools to convert from/to FLIF image format
127 Summary(pl.UTF-8):      Narzędzia do konwersji do/z formatu obrazów FLIF
128 License:        LGPL v3+
129 Group:          Applications/Graphics
130 Suggests:       ImageMagick >= 1:6.8
131 Suggests:       apngdis >= 2.5
132
133 %description tools
134 Tools to convert from/to FLIF image format.
135
136 %description tools -l pl.UTF-8
137 Narzędzia do konwersji do/z formatu obrazów FLIF.
138
139 %package view
140 Summary:        SDL2 based FLIF viewer
141 Summary(pl.UTF-8):      Przeglądarka plików FLIF oparta na bibliotece SDL2
142 License:        LGPL v3+
143 Group:          Applications/Graphics
144 Requires:       %{name}-dec = %{version}-%{release}
145
146 %description view
147 SDL2 based FLIF viewer.
148
149 %description view -l pl.UTF-8
150 Przeglądarka plików FLIF oparta na bibliotece SDL2.
151
152 %package -n bash-completion-flif
153 Summary:        Bash completion for flif command
154 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów polecenia flif
155 Group:          Applications/Shells
156 Requires:       %{name}-tools = %{version}-%{release}
157 Requires:       bash-completion >= 2.0
158
159 %description -n bash-completion-flif
160 Bash completion for flif command.
161
162 %description -n bash-completion-flif -l pl.UTF-8
163 Bashowe dopełnianie parametrów polecenia flif.
164
165 %package -n gdk-pixbuf2-loader-flif
166 Summary:        FLIF loader module for gdk-pixbuf2 library
167 Summary(pl.UTF-8):      Moduł biblioteki gdk-pixbuf2 wczytujący pliki FLIF
168 Group:          Libraries
169 Requires:       %{name} = %{version}-%{release}
170 Requires:       gdk-pixbuf2 >= 2.10
171 Requires:       shared-mime-info
172
173 %description -n gdk-pixbuf2-loader-flif
174 FLIF loader module for gdk-pixbuf2 library.
175
176 %description -n gdk-pixbuf2-loader-flif -l pl.UTF-8
177 Moduł biblioteki gdk-pixbuf2 wczytujący pliki FLIF.
178
179 %prep
180 %setup -q -n FLIF-%{version}
181 %patch0 -p1
182
183 %build
184 install -d src/build
185 cd src/build
186 %cmake .. \
187         %{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF}
188 %{__make}
189
190 %install
191 rm -rf $RPM_BUILD_ROOT
192
193 %{__make} -C src/build install \
194         DESTDIR=$RPM_BUILD_ROOT
195
196 # already in file
197 %{__rm} $RPM_BUILD_ROOT%{_datadir}/FLIF/flif.magic
198
199 install -Dp doc/flif.bash-completion $RPM_BUILD_ROOT%{bash_compdir}/flif
200
201 %clean
202 rm -rf $RPM_BUILD_ROOT
203
204 %post   -p /sbin/ldconfig
205 %postun -p /sbin/ldconfig
206
207 %post   dec -p /sbin/ldconfig
208 %postun dec -p /sbin/ldconfig
209
210 %post   -n gdk-pixbuf2-loader-flif
211 umask 022
212 %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
213 %update_mime_database
214
215 %postun -n gdk-pixbuf2-loader-flif
216 %update_mime_database
217 if [ "$1" != "0" ]; then
218         umask 022
219         [ ! -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ] || \
220         %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || :
221 fi
222
223 %files
224 %defattr(644,root,root,755)
225 %doc LICENSE README.md
226 %attr(755,root,root) %{_libdir}/libflif.so.0
227
228 %files devel
229 %defattr(644,root,root,755)
230 %doc doc/metadata
231 %attr(755,root,root) %{_libdir}/libflif.so
232 %{_includedir}/flif*.h
233
234 %if %{with static_libs}
235 %files static
236 %defattr(644,root,root,755)
237 %{_libdir}/libflif.a
238 %endif
239
240 %files dec
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libflif_dec.so.0
243
244 %files dec-devel
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libflif_dec.so
247
248 %if %{with static_libs}
249 %files dec-static
250 %defattr(644,root,root,755)
251 %{_libdir}/libflif_dec.a
252 %endif
253
254 %files tools
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/apng2flif
257 %attr(755,root,root) %{_bindir}/dflif
258 %attr(755,root,root) %{_bindir}/flif
259 %attr(755,root,root) %{_bindir}/gif2flif
260 %{_mandir}/man1/flif.1*
261
262 %files view
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_bindir}/viewflif
265
266 %files -n bash-completion-flif
267 %defattr(644,root,root,755)
268 %{bash_compdir}/flif
269
270 %files -n gdk-pixbuf2-loader-flif
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-flif.so
273 %{_datadir}/mime/packages/flif-mime.xml
This page took 0.082591 seconds and 4 git commands to generate.