Apply next HAL architecture
[platform/hal/backend/vim3/bluetooth-vim3.git] / packaging / hal-backend-bluetooth-vim3.spec
1 Name:       hal-backend-bluetooth-vim3
2 Summary:    firmware and tools for bluetooth
3 Version:    0.1.0
4 Release:    1
5 Group:      TO_BE_FILLED
6 License:    Apache-2.0
7 Source0:    hal-backend-bluetooth-vim3-%{version}.tar.gz
8
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(hal-api-common)
12 BuildRequires:  pkgconfig(hal-api-bluetooth)
13
14 %description
15 VIM3 firmware and tools for bluetooth
16
17 %prep
18 %setup -q -n hal-backend-bluetooth-vim3-%{version}
19
20 %build
21 export CFLAGS+=" -fpie -fvisibility=hidden"
22 export CXXFLAGS+=" -fpie -fvisibility=hidden"
23 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
24
25 cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
26         -DPLUGIN_INSTALL_PREFIX=%{_prefix} \
27         -DHAL_LIB_DIR=%{_hal_libdir} \
28         -DHAL_LICENSE_DIR=%{_hal_licensedir} \
29         -DHAL_SYSCONF_DIR=%{_hal_sysconfdir}
30 make %{?jobs:-j%jobs}
31
32 %install
33 rm -rf %{buildroot}
34 %make_install
35
36 %post
37 ln -s %{_hal_sysconfdir}/bluetooth/BCM4359C0.hcd /usr/etc/bluetooth/BCM4359C0.hcd
38
39 %files
40 %manifest %{name}.manifest
41 %{_hal_licensedir}/%{name}/LICENSE.APLv2
42 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
43 %{_hal_sysconfdir}/bluetooth/BCM4359C0.hcd
44 %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
45 %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
46 %{_hal_libdir}/*.so*