2019-11-04 15:32:18 +08:00
|
|
|
Name: openEuler-latest-release
|
2020-03-13 15:45:47 +08:00
|
|
|
Summary: System information like kernelversion, openeulerversion, gccversion, openjdkversion and compile time
|
2022-07-28 02:20:12 +00:00
|
|
|
License: GPL-1.0-or-later
|
2019-11-04 15:32:18 +08:00
|
|
|
Group: System/Config
|
|
|
|
|
Version: 1.0
|
2022-08-08 07:54:06 +00:00
|
|
|
Release: 1
|
2021-03-04 14:32:30 +08:00
|
|
|
Source1: isopackage.sdf
|
|
|
|
|
Source2: isopackage_arm64.sdf
|
2019-11-04 15:32:18 +08:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}
|
2023-06-13 11:29:50 +08:00
|
|
|
BuildRequires: gcc kernel-devel java-1.8.0-openjdk
|
2019-11-04 15:32:18 +08:00
|
|
|
|
|
|
|
|
%description
|
2020-03-19 17:57:43 +08:00
|
|
|
The rpm contains system information, like kernelversion, eulerversion and compile time so on.
|
2019-11-04 15:32:18 +08:00
|
|
|
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}/etc
|
|
|
|
|
%ifarch aarch64
|
2020-03-17 20:31:16 +08:00
|
|
|
install %{_sourcedir}/isopackage_arm64.sdf %{buildroot}/etc/openEuler-latest
|
2019-11-04 15:32:18 +08:00
|
|
|
%else
|
2020-03-17 20:31:16 +08:00
|
|
|
install %{_sourcedir}/isopackage.sdf %{buildroot}/etc/openEuler-latest
|
2019-11-04 15:32:18 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
%post
|
2020-03-17 20:31:16 +08:00
|
|
|
if [[ `grep "openeulerversion" /etc/openEuler-latest | cut -d '_' -f2` =~ 2\.2\.RC.* ]]; then
|
2019-11-04 15:32:18 +08:00
|
|
|
if [ $1 = 1 ]; then
|
2020-03-13 15:45:47 +08:00
|
|
|
if [ -e /etc/openEulerLinux.conf ];then
|
|
|
|
|
mv /etc/openEulerLinux.conf /etc/.openEulerLinux.conf
|
2019-11-04 15:32:18 +08:00
|
|
|
fi
|
|
|
|
|
else
|
2020-03-13 15:45:47 +08:00
|
|
|
rm -f /etc/.openEulerLinux.conf
|
2019-11-04 15:32:18 +08:00
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
|
|
%postun
|
2020-03-13 15:45:47 +08:00
|
|
|
if [ -e /etc/.openEulerLinux.conf ]; then
|
|
|
|
|
mv /etc/.openEulerLinux.conf /etc/openEulerLinux.conf
|
2019-11-04 15:32:18 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%files
|
2020-03-17 20:31:16 +08:00
|
|
|
%config /etc/openEuler-latest
|
|
|
|
|
%attr(0444, root, root) /etc/openEuler-latest
|
2019-11-04 15:32:18 +08:00
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/*
|
|
|
|
|
rm -rf %{_tmppath}/%{name}-%{version}
|
|
|
|
|
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-08-08 07:54:06 +00:00
|
|
|
* Thu Jul 28 2022 Chenyx <chenyixiong3@huawei.com> - 1.0-1
|
2022-07-28 02:20:12 +00:00
|
|
|
- License compliance rectification
|