1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
Name: uwb-manager
Summary: This is the daemon managing UWB related functionalities
Version: 0.0.1
Release: 1
Group: Network & Connectivity/Wireless
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(json-glib-1.0)
Source1: dbus-uwb-manager.conf
Source2: org.tizen.uwb.service
Source3: uwb-manager.service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%if 0%{?gtests:1}
BuildRequires: pkgconfig(gmock)
%endif
%description
Manager for handling UWB functionalities
%prep
%setup -q
chmod 644 %{SOURCE0}
chmod 644 %{SOURCE1}
chmod 644 %{SOURCE2}
chmod 644 %{SOURCE3}
cp -a %{SOURCE1} ./uwb-manager.conf
cp -a %{SOURCE2} .
cp -a %{SOURCE3} .
%build
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
%if 0%{?gcov:1}
export CFLAGS+=" -fprofile-arcs -ftest-coverage"
export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
export FFLAGS+=" -fprofile-arcs -ftest-coverage"
export LDFLAGS+=" -lgcov"
%endif
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{?_lib}" == "lib64"
-DTIZEN_ARCH_64=1 \
%endif
-DLIB_DIR=%{_libdir} \
-DBIN_DIR=%{_bindir} \
-DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
-DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
-DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
-DBUILD_TEST_APP=%{?test_app:1}%{!?test_app:0}
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%make_install
mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
cp org.tizen.uwb.service %{buildroot}%{_datadir}/dbus-1/system-services/
mkdir -p %{buildroot}%{_libdir}/systemd/system/
cp uwb-manager.service %{buildroot}%{_libdir}/systemd/system/uwb-manager.service
%if "%{?_lib}" == "lib64"
mkdir -p %{buildroot}%{_unitdir}
cp uwb-manager.service %{buildroot}%{_unitdir}/uwb-manager.service
%endif
mkdir -p %{buildroot}%{_sysconfdir}/uwb/
#DBus DAC
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp uwb-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/uwb-manager.conf
%post
%files
%manifest %{name}.manifest
%license LICENSE
%defattr(-,root,root,-)
%attr(500,root,root) %{_bindir}/*
%attr(644,root,root) %{_datadir}/dbus-1/system-services/org.tizen.uwb.service
%attr(644,root,root) %{_libdir}/systemd/system/*
%if "%{?_lib}" == "lib64"
%attr(644,root,root) %{_unitdir}/uwb-manager.service
%endif
#DBus DAC
%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/uwb-manager.conf
|