3 %bcond_without sdl # SDL based viewer
4 %bcond_with x265 # x265 support in BPG encoder
6 Summary: A library of functions for manipulating BPG image format files
7 Summary(pl.UTF-8): Biblioteka funkcji do operacji na plikach obrazów w formacie BPG
11 # The original BPG code is BSD-licensed, while the modified FFmpeg library is under LGPLv2.1.
12 License: LGPL v2.1 and BSD
14 Source0: http://bellard.org/bpg/%{name}-%{version}.tar.gz
15 # Source0-md5: 30d1619656955fb3fbba5fe9f9f27f67
16 Patch0: %{name}-shared.patch
17 URL: http://bellard.org/bpg/
19 BuildRequires: SDL-devel
20 BuildRequires: SDL_image-devel
22 BuildRequires: libjpeg-devel
23 BuildRequires: libpng-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: libtool >= 2:1.5
26 %{?with_x265:BuildRequires: libx265-devel}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 BPG (Better Portable Graphics) is a image format whose purpose is to
31 replace the JPEG image format when quality or file size is an issue.
33 Its main advantages are:
34 - High compression ratio. Files are much smaller than JPEG for similar
36 - Supported by most Web browsers with a small JavaScript decoder.
37 - Based on a subset of the HEVC open video compression standard.
38 - Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0,
39 4:2:2, 4:4:4) to reduce the losses during the conversion. An alpha
40 channel is supported. The RGB, YCgCo and CMYK color spaces are also
42 - Native support of 8 to 14 bits per channel for a higher dynamic
44 - Lossless compression is supported.
45 - Various metadata (such as EXIF, ICC profile, XMP) can be included.
47 %description -l pl.UTF-8
48 BPG (Better Portable Graphics - lepsza przenośna grafika) to format
49 obrazu, którego celem jest zastąpienie formatu JPEG tam, gdzie ma
50 znaczenie jakość lub rozmiar pliku.
53 - ma wysoki współczynnik kompresji; pliki są znacznie mniejsze niż
54 JPEG o podobnej jakości
55 - jest obsługiwany przez większość przeglądarek WWW przy użyciu małego
56 dekodera w JavaScripcie
57 - jest oparty na podzbiorze otwartego standardu kompresji obrazu HEVC
58 - obsługuje te same schematy barw, co JPEG (odcienie szarości, YCbCr
59 4:2:0, 4:2:2, 4:4:4) w celu ograniczenia strat przy konwersji;
60 obsługiwany jest kanał alfa oraz przestrzenie barw RGB, YCgCo i CMYK
61 - ma natywną obsługę 8 i 14 bitów na kanał w celu zapewnienia większej
63 - obsługiwana jest kompresja bezstratna
64 - można dołączać różne metadane (jak EXIF, profil ICC, XMP).
67 Summary: Development files for libbpg library
68 Summary(pl.UTF-8): Pliki programistyczne biblioteki libbpg
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 This package contains the header files for developing applications
76 %description devel -l pl.UTF-8
77 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
78 wykorzystujących libbpg.
81 Summary: Static libbpg library
82 Summary(pl.UTF-8): Statyczna biblioteka libbpg
83 Group: Development/Libraries
84 Requires: %{name}-devel = %{version}-%{release}
87 Static libbpg library.
89 %description static -l pl.UTF-8
90 Statyczna biblioteka libbpg.
93 Summary: Tools to encode and decode BPG files
94 Summary(pl.UTF-8): Narzędzia do kodowania i dekodowania plików BPG
95 Group: Applications/Graphics
96 Requires: %{name} = %{version}-%{release}
99 Tools to encode and decode BPG files.
101 %description tools -l pl.UTF-8
102 Narzędzia do kodowania i dekodowania plików BPG.
105 Summary: SDL based BPG images viewer
106 Summary(pl.UTF-8): Oparta na SDL przeglądarka obrazów BPG
107 Group: Applications/Graphics
108 Requires: %{name} = %{version}-%{release}
111 SDL based BPG images viewer.
113 %description view -l pl.UTF-8
114 Oparta na SDL przeglądarka obrazów BPG.
120 %{__sed} -i -e 's,-Os,$(OPTFLAGS),' Makefile
121 %{__sed} -i -e 's#LDFLAGS=-g#LDFLAGS=%{rpmldflags}#' Makefile
127 OPTFLAGS="%{rpmcflags}" \
128 %{!?with_sdl:USE_BPGVIEW=} \
129 %{?with_x265:USE_X265=y} \
133 rm -rf $RPM_BUILD_ROOT
135 %{__make} install install-lib \
136 DESTDIR=$RPM_BUILD_ROOT \
141 install bpgview $RPM_BUILD_ROOT%{_bindir}
144 # no external dependencies
145 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbpg.la
148 rm -rf $RPM_BUILD_ROOT
150 %post -p /sbin/ldconfig
151 %postun -p /sbin/ldconfig
154 %defattr(644,root,root,755)
155 %doc ChangeLog README doc/bpg_spec.txt html post.js
156 %attr(755,root,root) %{_libdir}/libbpg.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libbpg.so.0
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libbpg.so
162 %{_includedir}/bpgenc.h
163 %{_includedir}/libbpg.h
166 %defattr(644,root,root,755)
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/bpgdec
172 %attr(755,root,root) %{_bindir}/bpgenc
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/bpgview