blob: 4380c9071b094e34753d58a3086502745a9e6468 (
plain)
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
|
%define module_name uwb
%define name hal-api-uwb
%define devel_name hal-api-uwb-devel
### main package #########
Name: %{name}
Summary: %{name} interface
Version: 0.1.0
Release: 1
Group: Development/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
Source2: %{devel_name}.manifest
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(hal-api-common)
%description
%{name} interface
### devel package #########
%package -n %{devel_name}
Summary: %{name} interface
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description -n %{devel_name}
%{name} Interface for product vendor developer
### build and install #########
%prep
%setup -q
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir}/
%build
cp %{SOURCE1} .
cp %{SOURCE2} .
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%make_install
%clean
rm -rf %{buildroot}
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
### contain files to package #########
%files -n %{name}
%manifest %{name}.manifest
%license LICENSE
%defattr(-,root,root,-)
%{_libdir}/hal/*.so*
%files -n %{devel_name}
%defattr(-,root,root,-)
%manifest %{devel_name}.manifest
%license LICENSE
%{_includedir}/hal/*.h
%{_libdir}/pkgconfig/%{name}.pc
|