06d23845ebf795a320b4de3e04b14019fbb1ce01
[platform/adaptation/broadcom/libomxil-vc4.git] / packaging / libomxil-vc4.spec
1 Name:          libomxil-vc4
2 Version:       0.0.1
3 Release:       4
4 Summary:       Libraries for interfacing to Raspberry Pi GPU
5 Group:         System/Libraries
6 URL:           https://github.com/raspberrypi/userland
7 Source:         %{name}-%{version}.tar.gz
8 License:       BSD-3-Clause
9 BuildRequires: cmake
10 BuildRequires: gcc-c++
11 BuildRequires: pkgconfig(libtbm)
12 ExclusiveArch: %{arm}
13
14 %description
15 Libraries for interfacing to Raspberry Pi GPU.
16
17 %package       utils
18 Group:         System/Tools
19 Summary:       System tools for the Raspberry Pi
20
21 %description   utils
22 This package contains some system tools for the Raspberry Pi.
23 Source: https://github.com/libomxil-vc4/userland.git
24
25 %package       devel
26 Group:         Development/Libraries
27 Summary:       Development files for the Raspberry Pi GPU
28 Requires:      %{name} = %{version}
29
30 %description   devel
31 This package contains libraries and header files for developing applications that use Raspberry Pi GPU.
32
33 %prep
34 %setup -q
35
36 %build
37 BUILDTYPE=Release
38 BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
39 mkdir -p build/armv7l-linux/$BUILDSUBDIR
40 pushd build/armv7l-linux/$BUILDSUBDIR
41 cmake -DCMAKE_BUILD_TYPE=Release ../../../
42 make
43 popd
44
45 %post
46 /sbin/ldconfig
47
48 %postun
49 /sbin/ldconfig
50
51 %install
52 mkdir -p %{buildroot}/etc/ld.so.conf.d/
53 cp %{_builddir}/%{name}-%{version}/packaging/libomxil-vc4.conf %{buildroot}/etc/ld.so.conf.d
54 mkdir -p %{buildroot}/opt/vc/lib/plugins
55 mkdir %{buildroot}/opt/vc/lib/pkgconfig
56 mkdir %{buildroot}/opt/vc/bin
57 mkdir -p %{buildroot}/opt/vc/include/interface
58 pushd %{buildroot}/opt/vc/lib
59 cp %{_builddir}/%{name}-%{version}/build/lib/lib*.so ./
60 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/bcm_host.pc ./pkgconfig
61 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/brcmegl.pc ./pkgconfig
62 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/brcmglesv2.pc ./pkgconfig
63 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/brcmvg.pc ./pkgconfig
64 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/mmal.pc ./pkgconfig
65 cp %{_builddir}/%{name}-%{version}/build/armv7l-linux/release/vcsm.pc ./pkgconfig
66 cd ./plugins
67 cp %{_builddir}/%{name}-%{version}/build/lib/reader_*.so ./
68 cp %{_builddir}/%{name}-%{version}/build/lib/writer_*.so ./
69 cd ../../bin
70 cp %{_builddir}/%{name}-%{version}/build/bin/* ./
71
72 cd ../lib
73 cp %{_builddir}/%{name}-%{version}/build/lib/lib*.a ./
74 cd ../include
75 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/EGL ./
76 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/GLES ./
77 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/GLES2 ./
78 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/KHR ./
79 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/VG ./
80 cp -a %{_builddir}/%{name}-%{version}/interface/khronos/include/WF ./
81 cp -a %{_builddir}/%{name}-%{version}/interface/vmcs_host/khronos/IL ./
82 cp -a %{_builddir}/%{name}-%{version}/interface/mmal ./interface/
83 cp -a %{_builddir}/%{name}-%{version}/interface/vchi ./interface/
84 cp -a %{_builddir}/%{name}-%{version}/interface/vchiq_arm ./interface/
85 cp -a %{_builddir}/%{name}-%{version}/interface/vcos ./interface/
86 cp -a %{_builddir}/%{name}-%{version}/interface/vctypes ./interface/
87 cp -a %{_builddir}/%{name}-%{version}/interface/vmcs_host ./interface/
88 cp -a %{_builddir}/%{name}-%{version}/vcinclude ./
89 cp %{_builddir}/%{name}-%{version}/host_applications/linux/libs/bcm_host/include/bcm_host.h ./
90 popd
91
92 %clean
93 [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
94
95 %files
96 %manifest packaging/%{name}.manifest
97 %defattr(-,root,root)
98 %license LICENSE
99 /opt/vc/lib/lib*.so
100 /opt/vc/lib/plugins/*.so
101 /etc/ld.so.conf.d/libomxil-vc4.conf
102
103 %files utils
104 /opt/vc/bin/*
105 %doc LICENSE
106
107 %files devel
108 /opt/vc/lib/lib*.a
109 /opt/vc/include/EGL
110 /opt/vc/include/GLES
111 /opt/vc/include/GLES2
112 /opt/vc/include/IL
113 /opt/vc/include/KHR
114 /opt/vc/include/VG
115 /opt/vc/include/WF
116 /opt/vc/include/interface
117 /opt/vc/include/vcinclude
118 /opt/vc/include/*.h
119 /opt/vc/lib/pkgconfig/*.pc
120