blob: 56ab38d49e1d19e2537d648e5f752a27bb868df7 (
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
%define name hal-rootstrap
%define devel_name hal-rootstrap-devel
%define hal_rootstrap_install_path /opt/data/hal-rootstrap
Name: hal-rootstrap
Summary: Package for rootstrap of hal
Version: 0.1.0
Release: 1
#Group:
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: hal-rootstrap-checker.sh
Source2: hal-rootstrap-checker.yaml
Source3: hal-rootstrap-checker-rpmmacros
AutoReqProv: no
BuildRequires: cmake
BuildRequires: xmlstarlet
BuildRequires: python3
BuildRequires: hal-rootstrap-common
### hal-rootstrap
%description
Package for rootstrap of hal
### hal-rootstrap-devel
%package -n %{devel_name}
Summary: %{name} interface
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description -n %{devel_name}
%{name} Interface for product vendor developer
### hal-rootstrap-checker
%package checker
Summary: %{name} checker
Group: System/Base
#Requires: hal-rootstrap-checker-plugin-conf
%description checker
Checker for the hal rootstrap
%prep
%setup -q
%cmake . -DCMAKE_LIBDIR_PREFIX=%{_libdir}
%build
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
mkdir %{buildroot}
./generate_rootstrap.sh "%{_arch}" "%{buildroot}%{hal_rootstrap_install_path}"
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
cp packaging/hal-rootstrap.pc %{buildroot}%{_libdir}/pkgconfig/
./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap.pc" "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig"
mkdir -p %{buildroot}%{_sysconfdir}/hal/rootstrap
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/hal/rootstrap
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/hal/rootstrap
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/hal/rootstrap
%post checker
ln -sf %{_sysconfdir}/hal/rootstrap/hal-rootstrap-checker-rpmmacros %{_sysconfdir}/rpm/macros.hal-rootstrap-checker
%postun checker
rm -f %{_sysconfdir}/rpm/macros.hal-rootstrap-checker
%files
%{hal_rootstrap_install_path}/etc/*
%{hal_rootstrap_install_path}/lib*/*
%{hal_rootstrap_install_path}/usr/share/*
%{hal_rootstrap_install_path}/usr/lib*/*
%files -n %{devel_name}
%defattr(-,root,root,-)
%{hal_rootstrap_install_path}/%{_includedir}/*
%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig/*.pc
%{_libdir}/pkgconfig/*.pc
%files checker
%defattr(-,root,root,-)
%{_sysconfdir}/hal/rootstrap/hal-rootstrap-checker.sh
%{_sysconfdir}/hal/rootstrap/hal-rootstrap-checker.yaml
%{_sysconfdir}/hal/rootstrap/hal-rootstrap-checker-rpmmacros
|