1 Star 0 Fork 26

huangcong/ancert

forked from anolis/ancert 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ancert.spec 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
smj01095381 提交于 2022-08-01 15:25 . Add clang dependencies
%define name ancert
%define version 1.1
%define release 0
%define __lib lib
%define __bin bin
%define __usr usr
%define __opt opt
%undefine __brp_mangle_shebangs
#define installdir
%if 0%{?rhel} && 0%{?rhel} <= 7
%{!?__installdir: %global __installdir %{__opt}/%{name}}
%else
%global __installdir opt/%{name}
%endif
Summary: Anolis Hardware Compatibility Test Suite
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}-%{version}-%{release}.tar.gz
License: GPL
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
ExclusiveArch: %(arch)
Vendor: Alibaba
BuildRequires: make, gcc, gcc-c++
Requires: make, gcc, gcc-c++, clang
Requires: fio, nvme-cli, glx-utils, python3, rpm-build, bc, lvm2
Requires: alsa-lib, alsa-utils, virt-what, smartmontools, hdparm
Requires: xorg-x11-utils, xorg-x11-server-utils, xorg-x11-apps
%description
Ancert is used to test your system or component to verify the compatibility with Anolis OS.
%prep
%setup -qn %{name}-%{version}-%{release}
%install
make DESTDIR=%{buildroot}/%{__installdir} post_install
%files
%defattr(-,root,root)
/%{__installdir}/%{name}
/%{__installdir}/etc
/%{__installdir}/%{__lib}
/%{__installdir}/tests
/%{__installdir}/utils
/%{__installdir}/README.md
%exclude /%{__installdir}/%{name}.spec
%post
if [ "$1" = "1" ]; then
[ -f /%{__usr}/%{__bin}/%{name} ] || [ -L /%{__usr}/%{__bin}/%{name} ] \
&& rm -rf /%{__usr}/%{__bin}/%{name}
ln -s /%{__installdir}/%{name} /%{__usr}/%{__bin}/%{name}
fi
%postun
if [ "$1" = "0" ]; then
[ -d /%{__installdir} ] && rm -rf /%{__installdir}
[ -L /%{__usr}/%{__bin}/%{name} ] && rm -rf /%{__usr}/%{__bin}/%{name}
fi
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
%changelog
* Thu Aug 12 2021 ancert 1.0
- ......
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huang-congcong/ancert.git
[email protected]:huang-congcong/ancert.git
huang-congcong
ancert
ancert
master

搜索帮助