%define _version        0.0.1-20140707

Name:           unrar-free
Version:        0.0.1.20140707
Release:        1%{?_dist_release}
Summary:        Utility for extracting RAR archives (free version)
Summary(ja):    RARアーカイブを解凍するためのユーティリティ (free version)
Group:          Applications/Archiving

Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPLv2
URL:            http://home.gna.org/unrar/
Source0:        unrar-%{_version}.tar.gz

Patch0:         0001-CVE-2017-14120.patch
Patch1:         0002-CVE-2017-14122.patch
Patch2:         0003-CVE-2017-14121.patch
Patch3:         0004-unrar-nonfree-compat-ignored-options.patch

# Vine
Patch1000:      0001-fixed-warnings.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
Conflicts:      unrar

#BuildRequires:  

%description
The unrar-free is utility for extracting RAR archives.
But can't handle some archives in the RAR 3.0 format,
only the non-free "unrar" package can do that.

%description -l ja
unrar-free はRAR archivesを展開するためのユーティリティです。
しかしながら、 このパッケージではRAR 3.0 フォーマットのアーカイブの
一部を処理できません。non-free な "unrar" パッケージだけが
それらのアーカイブを処理できます。

%prep
%autosetup -p1 -n unrar-0.0.1

%build
autoreconf -ivf
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
%makeinstall


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS ChangeLog README
%{_bindir}/unrar


%changelog
* Fri Nov 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.0.1-20140707-1
- updated to 20140707.
- imported Patch0-4 from debian.
- added Patch1000 to fix warnings.

* Sun Jan 12 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.0.1.20071127-3
- rebuilt with current toolchain

* Thu Jan 27 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.0.1.20071127-2
- rebuilt with new toolchain

* Fri May 15 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.0.1.20071127-1
- initial build for VineSeed
