]>
Commit | Line | Data |
---|---|---|
8e69f3e2 ER |
1 | # |
2 | # Conditional build: | |
66096f3b | 3 | %bcond_without tests # unit tests |
8e69f3e2 ER |
4 | |
5 | Summary: YUV conversion and scaling functionality library | |
b3a414c5 | 6 | Summary(pl.UTF-8): Biblioteka do konwersji i skalowania YUV |
8e69f3e2 | 7 | Name: libyuv |
66096f3b JB |
8 | # see include/libyuv/version.h |
9 | %define yuv_ver 1788 | |
10 | %define gitref d19f69d9df7a54eae9cfae0b650921f675d9f01a | |
11 | %define snap 20210611 | |
12 | %define rel 1 | |
13 | Version: 0.%{yuv_ver} | |
14 | Release: 0.%{snap}.%{rel} | |
8e69f3e2 ER |
15 | License: BSD |
16 | Group: Development/Libraries | |
fe52e957 JB |
17 | # tarball is recreated on each download, so use dropin |
18 | #Source0: https://chromium.googlesource.com/libyuv/libyuv/+archive/%{gitref}.tar.gz?/%{name}-%{snap}.tar.gz | |
19 | Source0: %{name}-%{snap}.tar.gz | |
66096f3b | 20 | # Source0-md5: 9783a72e05ef548dd6f6ff7c1775e744 |
55325603 JR |
21 | Source1: %{name}.pc |
22 | Patch0: shared-lib.patch | |
66096f3b JB |
23 | URL: https://chromium.googlesource.com/libyuv/libyuv |
24 | BuildRequires: cmake >= 2.8 | |
1be264c1 | 25 | %{?with_tests:BuildRequires: gtest-devel} |
8e69f3e2 | 26 | BuildRequires: libjpeg-devel |
b3a414c5 | 27 | BuildRequires: libstdc++-devel |
8e69f3e2 ER |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | This is an open source project that includes YUV conversion and | |
32 | scaling functionality. Converts all webcam formats to YUV (I420). | |
33 | Convert YUV to formats for rendering/effects. Rotate by 90 degrees to | |
34 | adjust for mobile devices in portrait mode. Scale YUV to prepare | |
35 | content for compression, with point, bilinear or box filter. | |
36 | ||
b3a414c5 JB |
37 | %description -l pl.UTF-8 |
38 | Ten projekt o otwartych źródłach funkcjonalnością obejmuje konwersję | |
39 | oraz skalowanie YUV. Potrafi: | |
40 | - tłumaczyć formaty kamer internetowych na YUV (I420) | |
41 | - przekształcać YUV na formaty zdatne do renderowania i efektów | |
1be264c1 ER |
42 | - obracać obraz o 90 stopni, aby dostosowaćdo urządzeń przenośnych w |
43 | trybie portretowym | |
b3a414c5 JB |
44 | - skalować YUV w celu przygotowania do kompresji z filtrem punktowym, |
45 | dwuliniowym lub prostokątnym. | |
46 | ||
8e69f3e2 | 47 | %package devel |
b3a414c5 JB |
48 | Summary: The development files for libyuv |
49 | Summary(pl.UTF-8): Pliki programistyczne libyuv | |
8e69f3e2 ER |
50 | Group: Development/Libraries |
51 | Requires: %{name} = %{version}-%{release} | |
52 | ||
53 | %description devel | |
b3a414c5 JB |
54 | Header files for development with libyuv. |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe do tworzenia programów z użyciem libyuv. | |
58 | ||
66096f3b JB |
59 | %package static |
60 | Summary: Static libyuv library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka libyuv | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static libyuv library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka libyuv. | |
70 | ||
8e69f3e2 | 71 | %prep |
66096f3b | 72 | %setup -q -c |
55325603 | 73 | %patch0 -p1 |
8e69f3e2 ER |
74 | |
75 | %build | |
55325603 JR |
76 | mkdir -p build |
77 | cd build | |
ae738b72 JB |
78 | %cmake .. \ |
79 | %{?with_tests:-DTEST=ON} | |
8e69f3e2 ER |
80 | |
81 | %{__make} | |
66096f3b | 82 | |
55325603 | 83 | %{?with_tests:./libyuv_unittest} |
8e69f3e2 ER |
84 | |
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
55325603 JR |
87 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
88 | ||
89 | cd build | |
8e69f3e2 ER |
90 | %{__make} install \ |
91 | DESTDIR=$RPM_BUILD_ROOT | |
55325603 | 92 | |
66096f3b | 93 | %{__sed} -e 's|@PACKAGE_VERSION@|%{yuv_ver}|' \ |
55325603 JR |
94 | -e 's|@prefix@|%{_prefix}|' \ |
95 | -e 's|@exec_prefix@|%{_prefix}|' \ | |
96 | -e 's|@libdir@|%{_libdir}|' \ | |
97 | -e 's|@includedir@|%{_includedir}|' %{SOURCE1} >$RPM_BUILD_ROOT%{_pkgconfigdir}/libyuv.pc | |
8e69f3e2 ER |
98 | |
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %post -p /sbin/ldconfig | |
103 | %postun -p /sbin/ldconfig | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %doc AUTHORS LICENSE PATENTS | |
66096f3b JB |
108 | %attr(755,root,root) %{_bindir}/yuvconvert |
109 | %attr(755,root,root) %{_libdir}/libyuv.so.*.* | |
110 | %attr(755,root,root) %ghost %{_libdir}/libyuv.so.2 | |
8e69f3e2 ER |
111 | |
112 | %files devel | |
113 | %defattr(644,root,root,755) | |
b3a414c5 | 114 | %attr(755,root,root) %{_libdir}/libyuv.so |
ae738b72 JB |
115 | %{_includedir}/libyuv.h |
116 | %{_includedir}/libyuv | |
117 | %{_pkgconfigdir}/libyuv.pc | |
66096f3b JB |
118 | |
119 | %files static | |
120 | %defattr(644,root,root,755) | |
121 | %{_libdir}/libyuv.a |