File rar.spec of Package rar
%global pkg_version 7.12
%global dotless_pkg_version 712
Name: rar
Version: %{pkg_version}
Release: 0%{?dist}
Summary: RAR command-line utility
License: NonFree
URL: http://www.rarlab.com
ExclusiveArch: x86_64
Source0: http://www.rarlab.com/rar/rarlinux-x64-%{dotless_pkg_version}.tar.gz
Source1: rar.1
Source2: unrar.1
Conflicts: unrar
%description
Console RAR allows you to manage and control rar files.
The binaries in this package only support RAR format.
%prep
tar -xf "%{SOURCE0}" -C %{_builddir}
%build
%install
cd %{name}
mv license.txt LICENSE
mv acknow.txt ACKNOWLEDGMENTS
install -m 0755 rar unrar -Dt %{buildroot}%{_bindir}
install -Dm 0644 rarfiles.lst %{buildroot}%{_sysconfdir}/rarfiles.lst
install -Dm 0755 default.sfx %{buildroot}%{_libdir}/default.sfx
install -m 0644 %{SOURCE1} %{SOURCE2} -Dt %{buildroot}%{_mandir}/man1
%check
%files
%license rar/LICENSE rar/ACKNOWLEDGMENTS
%doc rar/*.txt
%{_bindir}/rar
%{_bindir}/unrar
%{_libdir}/default.sfx
%config %{_sysconfdir}/rarfiles.lst
%{_mandir}/man1/rar.1%{?ext_man}
%{_mandir}/man1/unrar.1%{?ext_man}