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