3 %bcond_without sdl # SDL based viewer
4 %bcond_with x265 # x265 support in BPG encoder
5 %bcond_with system_x265 # system x265 in BPG encoder (internal x265 is built as 8/10/12-bit)
7 Summary: A library of functions for manipulating BPG image format files
8 Summary(pl.UTF-8): Biblioteka funkcji do operacji na plikach obrazów w formacie BPG
12 # The original BPG code is BSD-licensed, while the modified FFmpeg library is under LGPLv2.1.
13 License: LGPL v2.1 and BSD
15 Source0: https://bellard.org/bpg/%{name}-%{version}.tar.gz
16 # Source0-md5: 1c8258bc6de26bbae7c688944a2023ac
17 Patch0: %{name}-shared.patch
18 URL: https://bellard.org/bpg/
20 BuildRequires: SDL-devel
21 BuildRequires: SDL_image-devel
23 BuildRequires: libjpeg-devel
24 BuildRequires: libpng-devel
25 BuildRequires: libstdc++-devel
26 BuildRequires: libtool >= 2:1.5
27 %{?with_x265:BuildRequires: libx265-devel}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 BPG (Better Portable Graphics) is a image format whose purpose is to
32 replace the JPEG image format when quality or file size is an issue.
34 Its main advantages are:
35 - High compression ratio. Files are much smaller than JPEG for similar
37 - Supported by most Web browsers with a small JavaScript decoder.
38 - Based on a subset of the HEVC open video compression standard.
39 - Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0,
40 4:2:2, 4:4:4) to reduce the losses during the conversion. An alpha
41 channel is supported. The RGB, YCgCo and CMYK color spaces are also
43 - Native support of 8 to 14 bits per channel for a higher dynamic
45 - Lossless compression is supported.
46 - Various metadata (such as EXIF, ICC profile, XMP) can be included.
48 %description -l pl.UTF-8
49 BPG (Better Portable Graphics - lepsza przenośna grafika) to format
50 obrazu, którego celem jest zastąpienie formatu JPEG tam, gdzie ma
51 znaczenie jakość lub rozmiar pliku.
54 - ma wysoki współczynnik kompresji; pliki są znacznie mniejsze niż
55 JPEG o podobnej jakości
56 - jest obsługiwany przez większość przeglądarek WWW przy użyciu małego
57 dekodera w JavaScripcie
58 - jest oparty na podzbiorze otwartego standardu kompresji obrazu HEVC
59 - obsługuje te same schematy barw, co JPEG (odcienie szarości, YCbCr
60 4:2:0, 4:2:2, 4:4:4) w celu ograniczenia strat przy konwersji;
61 obsługiwany jest kanał alfa oraz przestrzenie barw RGB, YCgCo i CMYK
62 - ma natywną obsługę 8 i 14 bitów na kanał w celu zapewnienia większej
64 - obsługiwana jest kompresja bezstratna
65 - można dołączać różne metadane (jak EXIF, profil ICC, XMP).
68 Summary: Development files for libbpg library
69 Summary(pl.UTF-8): Pliki programistyczne biblioteki libbpg
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
74 This package contains the header files for developing applications
77 %description devel -l pl.UTF-8
78 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
79 wykorzystujących libbpg.
82 Summary: Static libbpg library
83 Summary(pl.UTF-8): Statyczna biblioteka libbpg
84 Group: Development/Libraries
85 Requires: %{name}-devel = %{version}-%{release}
88 Static libbpg library.
90 %description static -l pl.UTF-8
91 Statyczna biblioteka libbpg.
94 Summary: Tools to encode and decode BPG files
95 Summary(pl.UTF-8): Narzędzia do kodowania i dekodowania plików BPG
96 Group: Applications/Graphics
97 Requires: %{name} = %{version}-%{release}
100 Tools to encode and decode BPG files.
102 %description tools -l pl.UTF-8
103 Narzędzia do kodowania i dekodowania plików BPG.
106 Summary: SDL based BPG images viewer
107 Summary(pl.UTF-8): Oparta na SDL przeglądarka obrazów BPG
108 Group: Applications/Graphics
109 Requires: %{name} = %{version}-%{release}
112 SDL based BPG images viewer.
114 %description view -l pl.UTF-8
115 Oparta na SDL przeglądarka obrazów BPG.
125 OPTFLAGS="%{rpmcflags}" \
126 %{!?with_sdl:USE_BPGVIEW=} \
127 %{!?with_x265:USE_X265=} \
128 %{?with_system_x265:X265_LIBS= BPGENC_LIBS="-lx265 -lpng -ljpeg"} \
132 rm -rf $RPM_BUILD_ROOT
134 %{__make} install install-lib \
135 DESTDIR=$RPM_BUILD_ROOT \
136 %{!?with_sdl:USE_BPGVIEW=} \
137 %{!?with_x265:USE_X265=} \
138 %{?with_system_x265:X265_LIBS=} \
143 install bpgview $RPM_BUILD_ROOT%{_bindir}
146 # no external dependencies
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbpg.la
150 rm -rf $RPM_BUILD_ROOT
152 %post -p /sbin/ldconfig
153 %postun -p /sbin/ldconfig
156 %defattr(644,root,root,755)
157 %doc ChangeLog README doc/bpg_spec.txt html post.js
158 %attr(755,root,root) %{_libdir}/libbpg.so.*.*.*
159 %attr(755,root,root) %ghost %{_libdir}/libbpg.so.0
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libbpg.so
164 %{_includedir}/bpgenc.h
165 %{_includedir}/libbpg.h
168 %defattr(644,root,root,755)
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_bindir}/bpgdec
174 %attr(755,root,root) %{_bindir}/bpgenc
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/bpgview