我的一个程序需要能够在中标麒麟系统mips64el环境上安装、 之前尝试把程序打成rpm包,但是在安装时提示:
file /usr/bin from install of testApp.mips64el conflicts with file from package filesystem-3.2-27.nd7.4.mips64el
这是我的spec文件:
Name: testApp
Version: 7.6.3
Release: 1
Summary: 即时通讯
License: GPL
Group: System
Source: testApp.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Packager: test
Prefix: %{_prefix}
Prefix: %{_sysconfdir}
%description
即时通讯
%prep
%setup -c
%install
rm -rf $RPM_BUILD_ROOT/opt
rm -rf $RPM_BUILD_ROOT/usr
mkdir -p $RPM_BUILD_ROOT/opt
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/icons
mkdir -p $RPM_BUILD_ROOT/usr/bin
tar -xvzf %{SOURCE0} -C $RPM_BUILD_ROOT/opt
cp $RPM_BUILD_ROOT/opt/mysoft/usr/share/applications/testApp.desktop -R $RPM_BUILD_ROOT/usr/share/applications/testApp.desktop
cp $RPM_BUILD_ROOT/opt/mysoft/usr/share/icons/deb.png -R $RPM_BUILD_ROOT/usr/share/icons/deb.png
cp $RPM_BUILD_ROOT/opt/mysoft/usr/bin/testApp -R $RPM_BUILD_ROOT/usr/bin/testApp
%clean
rm -rf $RPM_BUILD_ROOT/opt
%files
%defattr(-,root,root,-)
/opt
/usr