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