acpica-tools/acpica-tools.spec

125 lines
4.6 KiB
RPMSpec
Raw Normal View History

2019-12-31 17:55:31 +08:00
Name: acpica-tools
2021-12-01 15:46:14 +08:00
Version: 20210604
Release: 7
2019-12-31 17:55:31 +08:00
Summary: Tools for OS-independent reference implementation of ACPI
License: GPLv2
URL: https://www.acpica.org/
Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz
Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
2020-01-09 15:51:07 +08:00
Source2: COPYING
Patch0001: cve-2017-13693.patch
Patch0002: cve-2017-13694.patch
Patch0003: cve-2017-13695.patch
Patch0004: openEuler-harden.patch
2023-05-20 09:32:15 +08:00
Patch0005: 0001-add-loongarch64-support-for-acpica-tools.patch
Patch0006: 0001-Fix-GCC-12-dangling-pointer-warning.patch
2024-03-07 09:53:20 +08:00
Patch0007: 0001-fix-building-error-caused-by-variable-CurrentSp.patch
Patch0008: 9000-to-support-sw64-mips64el.patch
2024-03-07 09:53:20 +08:00
2019-12-31 17:55:31 +08:00
BuildRequires: bison patchutils flex gcc
Provides: acpixtract >= 20120913-7 iasl = %{version}-%{release} acpidump >= 20100513-5
Provides: pmtools = %{version}-%{release}
Obsoletes: iasl < 20120913-8 pmtools < 20100513-6
%description
The ACPI Component Architecture (ACPICA) project provides an operating system (OS)-independent
reference implementation of the Advanced Configuration and Power Interface Specification (ACPI).
It can be easily adapted to execute under any host OS. The ACPICA code is meant to be directly
integrated into the host OS as a kernel-resident subsystem. Hosting the ACPICA subsystem requires
no changes to the core ACPICA code. Instead, a small OS-specific interface layer is written
specifically for each host OS in order to interface the ACPICA code to the native OS services.
The complexity of the ACPI specification leads to a lengthy and difficult implementation in
operating system software. The primary purpose of the ACPI Component Architecture is to simplify
ACPI implementations for operating system vendors (OSVs) by providing major portions of an ACPI
implementation in OS-independent ACPI modules that can be easily integrated into any OS.
%prep
%autosetup -n acpica-unix2-%{version} -p1
gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
2020-01-09 15:51:07 +08:00
install -p %{SOURCE2} COPYING
2019-12-31 17:55:31 +08:00
chmod a-x changes.txt
chmod a-x source/compiler/new_table.txt
%build
CWARNINGFLAGS="\
-std=c99 -Wall -Wbad-function-cast -Wdeclaration-after-statement -Werror -Wformat=2\
-Wmissing-declarations -Wmissing-prototypes -Wstrict-aliasing=0 -Wstrict-prototypes\
-Wswitch-default -Wpointer-arith -Wundef -Waddress -Waggregate-return -Winit-self\
-Winline -Wmissing-declarations -Wmissing-field-initializers -Wnested-externs\
-Wold-style-definition -Wno-format-nonliteral -Wredundant-decls -Wempty-body\
-Woverride-init -Wlogical-op -Wmissing-parameter-type -Wold-style-declaration\
-Wtype-limits"
export OPT_CFLAGS="%{optflags} $CWARNINGFLAGS"
export OPT_LDFLAGS="%{__global_ldflags}"
2024-03-06 14:44:03 +08:00
%if "%{?toolchain}" == "clang"
CFLAGS="${CFLAGS:-%{?build_cflags}}"; export CFLAGS;
%endif
2019-12-31 17:55:31 +08:00
%make_build
%install
install -d %{buildroot}%{_bindir}
install -pD generate/unix/bin*/* %{buildroot}%{_bindir}/
install -d %{buildroot}%{_docdir}/acpica-tools/examples
install -pDm 0644 source/tools/examples/* %{buildroot}%{_docdir}/acpica-tools/examples/
%pre
if [ -e %{_bindir}/acpixtract-acpica ];then
alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
fi
if [ -e %{_bindir}/acpidump-acpica ];then
alternatives --remove acpidump %{_bindir}/acpidump-acpica
fi
%postun
if [ -e %{_bindir}/acpixtract-acpica ];then
alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
fi
if [ -e %{_bindir}/acpidump-acpica ];then
alternatives --remove acpidump %{_bindir}/acpidump-acpica
fi
%files
%doc changes.txt source/compiler/new_table.txt COPYING
%{_bindir}/*
%{_docdir}/*
%changelog
* Thu Feb 27 2025 zhaoshuang <zhaoshuang@uniontech.com> - 20210604-7
- arch: to support sw64 mips64 arch
2024-03-07 09:53:20 +08:00
* Thu Mar 7 2024 guojunding <guojunding@kylinos.cn> - 20210604-6
- fix building error caused by variable 'CurrentSp'
2024-03-06 14:44:03 +08:00
* Wed Mar 6 2024 guojunding <guojunding@kylinos.cn> - 20210604-5
- support clang build
2024-03-05 16:13:41 +08:00
* Tue Mar 5 2024 guojunding <guojunding@kylinos.cn> - 20210604-4
- fix invalid dates
* Tue Jul 18 2023 Ni Cunshu <nicunshu@huawei.com> - 20210604-3
- fix building error caused by gcc 12 dangling pointer warning
2023-05-20 09:32:15 +08:00
* Mon May 8 2023 Wenlong Zhang <zhangwenlong@loongson.cn> - 20210604-2
- add loongarch64 support
2024-03-05 16:13:41 +08:00
* Thu Dec 30 2021 zhouwenpei <zhouwenpei1@huawei.com> - 20210604-1
2021-12-01 15:46:14 +08:00
- Upgrade to version 20210604
2021-01-30 11:28:51 +08:00
* Sat Jan 30 2021 xinghe <xinghe1@huawei.com> - 20210105-1
- Upgrade to version 20210105
2020-07-23 07:18:25 +00:00
* Wed Jul 22 2020 jinzhimin <jinzhimin2@huawei.com> - 20200528-1
- update to 20200528
2019-12-31 17:55:31 +08:00
* Tue Dec 31 2019 daiqianwen <daiqianwen@huawei.com> - 20190509-4
- Package init