3 Star 0 Fork 0

src-anolis-sig/lifsea-release

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lifsea-release.spec 3.70 KB
一键复制 编辑 原始数据 按行查看 历史
杨枝甘露瑞纳冰 提交于 2022-03-02 17:07 . compat with anolis
%define lifsea_release 2
%define debug_package %{nil}
%define product_family Lifsea OS
%define base_release_version 8
%define compat_release_version 8
#define beta Beta
%define dist .lifsea%{compat_release_version}
%define anolis_release_version 8
Name: lifsea-release
Version: %{base_release_version}
Release: %{lifsea_release}%{?dist}
Summary: %{product_family} %{base_release_version} release file
Group: System Environment/Base
License: GPLv2
Obsoletes: rawhide-release redhat-release-as redhat-release-es redhat-release-ws redhat-release-de comps rpmdb-redhat fedora-release redhat-release centos-release
Provides: redhat-release = %{compat_release_version}
Provides: system-release = %{base_release_version}
Provides: system-release(releasever) = %{base_release_version}
Source0: EULA
Source1: GPL
Source2: 90-default.preset
Source3: 90-default-user.preset
Source4: 99-default-disable.preset
%description
%{product_family} %{base_release_version} release files
%prep
echo OK
%build
echo OK
%install
rm -rf %{buildroot}
# create /etc
mkdir -p %{buildroot}/etc
# create /etc/system-release
echo "%{product_family} release %{base_release_version}" > %{buildroot}/etc/%{name}
ln -s %{name} %{buildroot}/etc/system-release
ln -s %{name} %{buildroot}/etc/redhat-release
# create /etc/os-release
cat << EOF >>%{buildroot}/etc/os-release
NAME="%{product_family}"
VERSION="%{base_release_version}"
ID="lifsea"
ID_LIKE="rhel fedora centos"
VERSION_ID="%{base_release_version}"
PLATFORM_ID="platform:lifsea%{base_release_version}"
PRETTY_NAME="%{product_family} %{base_release_version}"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
EOF
# write cpe to /etc/system/release-cpe
# create /etc/issue and /etc/issue.net
echo '\S' > %{buildroot}/etc/issue
echo 'Kernel \r on lifsea \m' >> %{buildroot}/etc/issue
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
echo >> %{buildroot}/etc/issue
# set up the dist tag macros
install -d -m 755 %{buildroot}/etc/rpm
cat >> %{buildroot}/etc/rpm/macros.dist << EOF
# dist macros.
%%lifsea_ver %{base_release_version}
%%lifsea %{base_release_version}
%%lifsea%{base_release_version} 1
%%dist %dist
# For compatibility
%%rhel %{compat_release_version}
%%el%{compat_release_version} 1
%%anolis %{anolis_release_version}
%%an%{anolis_release_version} 1
EOF
# use unbranded docdir
mkdir -p -m 755 %{buildroot}/%{_docdir}/%{name}
install -m 644 %{SOURCE0} %{buildroot}/%{_docdir}/%{name}
install -m 644 %{SOURCE1} %{buildroot}/%{_docdir}/%{name}
# Default system wide
install -Dm0644 %{SOURCE2} -t %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -Dm0644 %{SOURCE3} -t %{buildroot}%{_prefix}/lib/systemd/user-preset/
# The same file is installed in two places with identical contents
install -Dm0644 %{SOURCE4} -t %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -Dm0644 %{SOURCE4} -t %{buildroot}%{_prefix}/lib/systemd/user-preset/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root,0755)
/etc/system-release
/etc/redhat-release
/etc/%{name}
%config(noreplace) /etc/os-release
%config(noreplace) /etc/issue
%config(noreplace) /etc/issue.net
/etc/rpm/macros.dist
%{_docdir}/%{name}
%dir %{_prefix}/lib/systemd/user-preset/
%{_prefix}/lib/systemd/user-preset/90-default-user.preset
%{_prefix}/lib/systemd/user-preset/99-default-disable.preset
%dir %{_prefix}/lib/systemd/system-preset/
%{_prefix}/lib/systemd/system-preset/90-default.preset
%{_prefix}/lib/systemd/system-preset/99-default-disable.preset
%changelog
* Wed Mar 02 2022 Yuanhong Peng <[email protected]> - 8-2
- compat with anolis
* Mon Dec 27 2021 Yuanhong Peng <[email protected]> - 8-1
- Initial build for Lifsea OS
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-sig/lifsea-release.git
[email protected]:src-anolis-sig/lifsea-release.git
src-anolis-sig
lifsea-release
lifsea-release
lifsea

搜索帮助