]> git.pld-linux.org Git - packages/libbpg.git/blob - libbpg.spec
- updated URLs
[packages/libbpg.git] / libbpg.spec
1 #
2 # Conditional build:
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)
6 #
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
9 Name:           libbpg
10 Version:        0.9.8
11 Release:        1
12 # The original BPG code is BSD-licensed, while the modified FFmpeg library is under LGPLv2.1.
13 License:        LGPL v2.1 and BSD
14 Group:          Libraries
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/
19 %if %{with sdl}
20 BuildRequires:  SDL-devel
21 BuildRequires:  SDL_image-devel
22 %endif
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)
29
30 %description
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.
33
34 Its main advantages are:
35 - High compression ratio. Files are much smaller than JPEG for similar
36   quality.
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
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
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.
52
53 Głó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
67 %package devel
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}
72
73 %description devel
74 This package contains the header files for developing applications
75 that use libbpg.
76
77 %description devel -l pl.UTF-8
78 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
79 wykorzystujących libbpg.
80
81 %package static
82 Summary:        Static libbpg library
83 Summary(pl.UTF-8):      Statyczna biblioteka libbpg
84 Group:          Development/Libraries
85 Requires:       %{name}-devel = %{version}-%{release}
86
87 %description static
88 Static libbpg library.
89
90 %description static -l pl.UTF-8
91 Statyczna biblioteka libbpg.
92
93 %package tools
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}
98
99 %description tools
100 Tools to encode and decode BPG files.
101
102 %description tools -l pl.UTF-8
103 Narzędzia do kodowania i dekodowania plików BPG.
104
105 %package view
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}
110
111 %description view
112 SDL based BPG images viewer.
113
114 %description view -l pl.UTF-8
115 Oparta na SDL przeglądarka obrazów BPG.
116
117 %prep
118 %setup -q
119 %patch0 -p1
120
121 %build
122 %{__make} \
123         CC="%{__cc}" \
124         CXX="%{__cxx}" \
125         OPTFLAGS="%{rpmcflags}" \
126         %{!?with_sdl:USE_BPGVIEW=} \
127         %{!?with_x265:USE_X265=} \
128         %{?with_system_x265:X265_LIBS= BPGENC_LIBS="-lx265 -lpng -ljpeg"} \
129         libdir=%{_libdir}
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133
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=} \
139         prefix=%{_prefix} \
140         libdir=%{_libdir}
141
142 %if %{with sdl}
143 install bpgview $RPM_BUILD_ROOT%{_bindir}
144 %endif
145
146 # no external dependencies
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbpg.la
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %post   -p /sbin/ldconfig
153 %postun -p /sbin/ldconfig
154
155 %files
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
160
161 %files devel
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libbpg.so
164 %{_includedir}/bpgenc.h
165 %{_includedir}/libbpg.h
166
167 %files static
168 %defattr(644,root,root,755)
169 %{_libdir}/libbpg.a
170
171 %files tools
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_bindir}/bpgdec
174 %attr(755,root,root) %{_bindir}/bpgenc
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.115248 seconds and 4 git commands to generate.