]>
Commit | Line | Data |
---|---|---|
c069a100 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static libraries | |
4 | # | |
5 | Summary: Rockchip Media Process Platform libraries | |
6 | Summary(pl.UTF-8): Biblioteki Rockchip Media Process Platform | |
7 | Name: rockchip-mpp | |
8 | Version: 20171218 | |
9 | Release: 1 | |
10 | License: Apache v2.0 | |
11 | Group: Libraries | |
12 | #Source0Download: https://github.com/rockchip-linux/mpp/releases | |
13 | Source0: https://github.com/rockchip-linux/mpp/archive/release_%{version}/mpp-%{version}.tar.gz | |
14 | # Source0-md5: 6c2c941ebc506e6a3bd7d911dd8dc184 | |
64d5a4fc | 15 | Patch0: %{name}-no-march.patch |
c069a100 JB |
16 | URL: http://opensource.rock-chips.com/wiki_Mpp |
17 | BuildRequires: cmake >= 2.8.8 | |
18 | BuildRequires: libstdc++-devel | |
19 | BuildRequires: pkgconfig | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | Rockchip Media Process Platform libraries. | |
24 | ||
25 | %description -l pl.UTF-8 | |
26 | Biblioteki Rockchip Media Process Platform. | |
27 | ||
28 | %package devel | |
29 | Summary: Header files for Rockchip MPP libraries | |
30 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Rockchip MPP | |
31 | Group: Development/Libraries | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description devel | |
35 | Header files for Rockchip MPP libraries. | |
36 | ||
37 | %description devel -l pl.UTF-8 | |
38 | Pliki nagłówkowe bibliotek Rockchip MPP. | |
39 | ||
40 | %package static | |
41 | Summary: Static Rockchip MPP libraries | |
42 | Summary(pl.UTF-8): Statyczne biblioteki Rockchip MPP | |
43 | Group: Development/Libraries | |
44 | Requires: %{name}-devel = %{version}-%{release} | |
45 | ||
46 | %description static | |
47 | Static Rockchip MPP libraries. | |
48 | ||
49 | %description static -l pl.UTF-8 | |
50 | Statyczne biblioteki Rockchip MPP. | |
51 | ||
52 | %prep | |
53 | %setup -q -n mpp-release_%{version} | |
64d5a4fc | 54 | %patch0 -p1 |
c069a100 JB |
55 | |
56 | %build | |
57 | # "build" directory is already occupied, so use "builddir" | |
58 | install -d builddir | |
59 | cd builddir | |
60 | # .pc file creation expects relative include* and libdir | |
61 | # build fails without RKPLATFORM (whatever it is) | |
62 | %cmake .. \ | |
63 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
64 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
65 | -DENABLE_SHARED=ON \ | |
66 | %{!?with_static_libs:-DENABLE_STATIC=OFF} \ | |
67 | -DRKPLATFORM=ON | |
68 | ||
69 | %{__make} | |
70 | ||
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %{__make} -C builddir install \ | |
75 | DESTDIR=$RPM_BUILD_ROOT | |
76 | ||
77 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %post -p /sbin/ldconfig | |
83 | %postun -p /sbin/ldconfig | |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc readme.txt | |
88 | %attr(755,root,root) %{_libdir}/librockchip_mpp.so.0 | |
89 | %attr(755,root,root) %ghost %{_libdir}/librockchip_mpp.so.1 | |
90 | %attr(755,root,root) %{_libdir}/librockchip_vpu.so.0 | |
91 | %attr(755,root,root) %ghost %{_libdir}/librockchip_vpu.so.1 | |
92 | ||
93 | %files devel | |
94 | %defattr(644,root,root,755) | |
95 | %doc doc/readme.txt doc/design/*.txt | |
96 | %attr(755,root,root) %{_libdir}/librockchip_mpp.so | |
97 | %attr(755,root,root) %{_libdir}/librockchip_vpu.so | |
98 | %{_includedir}/rockchip | |
99 | %{_pkgconfigdir}/rockchip_mpp.pc | |
100 | %{_pkgconfigdir}/rockchip_vpu.pc | |
101 | ||
102 | %if %{with static_libs} | |
103 | %files static | |
104 | %defattr(644,root,root,755) | |
105 | %{_libdir}/librockchip_mpp_static.a | |
106 | %{_libdir}/librockchip_vpu_static.a | |
107 | %endif |