]> git.pld-linux.org Git - packages/libyuv.git/blob - libyuv.spec
- use dropin
[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 # 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
20 # Source0-md5:  9783a72e05ef548dd6f6ff7c1775e744
21 Source1:        %{name}.pc
22 Patch0:         shared-lib.patch
23 URL:            https://chromium.googlesource.com/libyuv/libyuv
24 BuildRequires:  cmake >= 2.8
25 %{?with_tests:BuildRequires:    gtest-devel}
26 BuildRequires:  libjpeg-devel
27 BuildRequires:  libstdc++-devel
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
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
42 - obracać obraz o 90 stopni, aby dostosowaćdo urządzeń przenośnych w
43   trybie portretowym
44 - skalować YUV w celu przygotowania do kompresji z filtrem punktowym,
45   dwuliniowym lub prostokątnym.
46
47 %package devel
48 Summary:        The development files for libyuv
49 Summary(pl.UTF-8):      Pliki programistyczne libyuv
50 Group:          Development/Libraries
51 Requires:       %{name} = %{version}-%{release}
52
53 %description devel
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
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
71 %prep
72 %setup -q -c
73 %patch0 -p1
74
75 %build
76 mkdir -p build
77 cd build
78 %cmake .. \
79         %{?with_tests:-DTEST=ON}
80
81 %{__make}
82
83 %{?with_tests:./libyuv_unittest}
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
88
89 cd build
90 %{__make} install \
91         DESTDIR=$RPM_BUILD_ROOT
92
93 %{__sed} -e 's|@PACKAGE_VERSION@|%{yuv_ver}|' \
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
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
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
111
112 %files devel
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/libyuv.so
115 %{_includedir}/libyuv.h
116 %{_includedir}/libyuv
117 %{_pkgconfigdir}/libyuv.pc
118
119 %files static
120 %defattr(644,root,root,755)
121 %{_libdir}/libyuv.a
This page took 0.083376 seconds and 3 git commands to generate.