blob: 4becef8bedd20cb0260c6572fcaab6be6a83a365 (
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
89
90
91
92
93
94
|
%define name hal-rootstrap
%define devel_name hal-rootstrap-devel
%define hal_rootstrap_install_path /opt/data/hal-rootstrap/common
%define headed_name hal-rootstrap-headed
%define headed_devel_name hal-rootstrap-headed-devel
%define hal_rootstrap_headed_install_path /opt/data/hal-rootstrap/headed
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
AutoReqProv: no
BuildRequires: cmake
BuildRequires: xmlstarlet
BuildRequires: python3
BuildRequires: hal-rootstrap-data-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-headed
%package -n %{headed_name}
Summary: Package for rootstrap of hal, for headed image
AutoReqProv: no
%description -n %{headed_name}
Package for rootstrap of hal, for headed image
### hal-rootstrap-headed-devel
%package -n %{headed_devel_name}
Summary: %{headed_name} interface
Group: Development/Libraries
Requires: %{headed_name} = %{version}-%{release}
%description -n %{headed_devel_name}
${headed_name} Interface for product vendor developer
%prep
%setup -q
%cmake . -DCMAKE_LIBDIR_PREFIX=%{_libdir}
%build
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
mkdir %{buildroot}
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
# hal-rootstrap
./generate_rootstrap.sh "%{_arch}" "common" "%{buildroot}%{hal_rootstrap_install_path}"
cp packaging/hal-rootstrap.pc %{buildroot}%{_libdir}/pkgconfig/
./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap.pc" "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig"
rm -f "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig/*.pc"
# hal-rootstrap-headed
./generate_rootstrap.sh "%{_arch}" "headed" "%{buildroot}%{hal_rootstrap_headed_install_path}"
cp packaging/hal-rootstrap-headed.pc %{buildroot}%{_libdir}/pkgconfig/
./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap-headed.pc" "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig"
rm -f "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig/*.pc"
%files
%{hal_rootstrap_install_path}
%exclude %dir %{hal_rootstrap_install_path}/%{_includedir}
%files -n %{devel_name}
%defattr(-,root,root,-)
%{hal_rootstrap_install_path}/%{_includedir}
%{_libdir}/pkgconfig/hal-rootstrap.pc
%files -n %{headed_name}
%{hal_rootstrap_headed_install_path}
%exclude %dir %{hal_rootstrap_headed_install_path}/%{_includedir}
%files -n %{headed_devel_name}
%defattr(-,root,root,-)
%{hal_rootstrap_headed_install_path}/%{_includedir}
%{_libdir}/pkgconfig/hal-rootstrap-headed.pc
|