]> git.pld-linux.org Git - packages/libbpg.git/blame - libbpg.spec
- updated URLs
[packages/libbpg.git] / libbpg.spec
CommitLineData
ec3f4b65
JB
1#
2# Conditional build:
ff7e6713
JB
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)
ec3f4b65 6#
7b633ec9 7Summary: A library of functions for manipulating BPG image format files
74b94a75 8Summary(pl.UTF-8): Biblioteka funkcji do operacji na plikach obrazów w formacie BPG
7b633ec9 9Name: libbpg
7f5ea442 10Version: 0.9.8
ff7e6713 11Release: 1
c401b7f9
ER
12# The original BPG code is BSD-licensed, while the modified FFmpeg library is under LGPLv2.1.
13License: LGPL v2.1 and BSD
7b633ec9 14Group: Libraries
f1c1e83c 15Source0: https://bellard.org/bpg/%{name}-%{version}.tar.gz
7f5ea442 16# Source0-md5: 1c8258bc6de26bbae7c688944a2023ac
511242b5 17Patch0: %{name}-shared.patch
f1c1e83c 18URL: https://bellard.org/bpg/
ec3f4b65
JB
19%if %{with sdl}
20BuildRequires: SDL-devel
21BuildRequires: SDL_image-devel
22%endif
23BuildRequires: libjpeg-devel
7b633ec9
ER
24BuildRequires: libpng-devel
25BuildRequires: libstdc++-devel
511242b5 26BuildRequires: libtool >= 2:1.5
ec3f4b65 27%{?with_x265:BuildRequires: libx265-devel}
7b633ec9
ER
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31BPG (Better Portable Graphics) is a image format whose purpose is to
32replace the JPEG image format when quality or file size is an issue.
33
34Its main advantages are:
35- High compression ratio. Files are much smaller than JPEG for similar
36 quality.
74b94a75 37- Supported by most Web browsers with a small JavaScript decoder.
7b633ec9
ER
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
42 supported.
43- Native support of 8 to 14 bits per channel for a higher dynamic
44 range.
45- Lossless compression is supported.
46- Various metadata (such as EXIF, ICC profile, XMP) can be included.
47
74b94a75
JB
48%description -l pl.UTF-8
49BPG (Better Portable Graphics - lepsza przenośna grafika) to format
50obrazu, którego celem jest zastąpienie formatu JPEG tam, gdzie ma
51znaczenie jakość lub rozmiar pliku.
52
53Główne zalety to:
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
63 dynamiki
64- obsługiwana jest kompresja bezstratna
65- można dołączać różne metadane (jak EXIF, profil ICC, XMP).
66
7b633ec9 67%package devel
74b94a75
JB
68Summary: Development files for libbpg library
69Summary(pl.UTF-8): Pliki programistyczne biblioteki libbpg
7b633ec9
ER
70Group: Development/Libraries
71Requires: %{name} = %{version}-%{release}
72
73%description devel
511242b5
JB
74This package contains the header files for developing applications
75that use libbpg.
74b94a75
JB
76
77%description devel -l pl.UTF-8
511242b5
JB
78Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
79wykorzystujących libbpg.
80
81%package static
82Summary: Static libbpg library
83Summary(pl.UTF-8): Statyczna biblioteka libbpg
84Group: Development/Libraries
85Requires: %{name}-devel = %{version}-%{release}
86
87%description static
88Static libbpg library.
89
90%description static -l pl.UTF-8
91Statyczna biblioteka libbpg.
92
93%package tools
94Summary: Tools to encode and decode BPG files
95Summary(pl.UTF-8): Narzędzia do kodowania i dekodowania plików BPG
96Group: Applications/Graphics
97Requires: %{name} = %{version}-%{release}
98
99%description tools
100Tools to encode and decode BPG files.
101
102%description tools -l pl.UTF-8
103Narzędzia do kodowania i dekodowania plików BPG.
7b633ec9 104
ec3f4b65
JB
105%package view
106Summary: SDL based BPG images viewer
107Summary(pl.UTF-8): Oparta na SDL przeglądarka obrazów BPG
108Group: Applications/Graphics
109Requires: %{name} = %{version}-%{release}
110
111%description view
112SDL based BPG images viewer.
113
114%description view -l pl.UTF-8
115Oparta na SDL przeglądarka obrazów BPG.
116
7b633ec9
ER
117%prep
118%setup -q
511242b5 119%patch0 -p1
7b633ec9 120
7b633ec9
ER
121%build
122%{__make} \
123 CC="%{__cc}" \
124 CXX="%{__cxx}" \
125 OPTFLAGS="%{rpmcflags}" \
ec3f4b65 126 %{!?with_sdl:USE_BPGVIEW=} \
ff7e6713
JB
127 %{!?with_x265:USE_X265=} \
128 %{?with_system_x265:X265_LIBS= BPGENC_LIBS="-lx265 -lpng -ljpeg"} \
511242b5 129 libdir=%{_libdir}
7b633ec9
ER
130
131%install
132rm -rf $RPM_BUILD_ROOT
511242b5
JB
133
134%{__make} install install-lib \
135 DESTDIR=$RPM_BUILD_ROOT \
ff7e6713
JB
136 %{!?with_sdl:USE_BPGVIEW=} \
137 %{!?with_x265:USE_X265=} \
138 %{?with_system_x265:X265_LIBS=} \
511242b5
JB
139 prefix=%{_prefix} \
140 libdir=%{_libdir}
141
ec3f4b65
JB
142%if %{with sdl}
143install bpgview $RPM_BUILD_ROOT%{_bindir}
144%endif
145
511242b5
JB
146# no external dependencies
147%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbpg.la
7b633ec9
ER
148
149%clean
150rm -rf $RPM_BUILD_ROOT
151
511242b5
JB
152%post -p /sbin/ldconfig
153%postun -p /sbin/ldconfig
154
7b633ec9
ER
155%files
156%defattr(644,root,root,755)
ec3f4b65 157%doc ChangeLog README doc/bpg_spec.txt html post.js
511242b5
JB
158%attr(755,root,root) %{_libdir}/libbpg.so.*.*.*
159%attr(755,root,root) %ghost %{_libdir}/libbpg.so.0
7b633ec9
ER
160
161%files devel
162%defattr(644,root,root,755)
511242b5 163%attr(755,root,root) %{_libdir}/libbpg.so
7b633ec9
ER
164%{_includedir}/bpgenc.h
165%{_includedir}/libbpg.h
511242b5
JB
166
167%files static
168%defattr(644,root,root,755)
7b633ec9 169%{_libdir}/libbpg.a
511242b5
JB
170
171%files tools
172%defattr(644,root,root,755)
173%attr(755,root,root) %{_bindir}/bpgdec
174%attr(755,root,root) %{_bindir}/bpgenc
ec3f4b65
JB
175
176%if %{with sdl}
177%files view
178%defattr(644,root,root,755)
179%attr(755,root,root) %{_bindir}/bpgview
180%endif
This page took 0.11643 seconds and 4 git commands to generate.