%define owner alif-type
%define fontname aref-ruqaa
%define fontdir %{_datadir}/fonts/%{fontname}
%define title "Aref Ruqaa"

Name: %{fontname}-fonts
Summary: %{title} Arabic Fonts
Summary(ar): خط رقعة عارف
URL: https://github.com/alif-type/aref-ruqaa
Version: 0.7
Release: 1%{?dist}
License: OFL
Source: https://github.com/%{owner}/%{fontname}/archive/v%{version}/%{fontname}-%{version}.tar.gz
BuildArch: noarch

%description
%{title} Arabic Fonts.

%description -l ar
خط رقعة عارف.

%prep
%autosetup -n %{fontname}-%{version}

%install
install -m 0755 -d %{buildroot}%{fontdir}
cp -p *.ttf %{buildroot}%{fontdir}

%post
if [ -x %{_bindir}/fc-cache ]; then
  %{_bindir}/fc-cache %{fontdir}
fi

%postun
if [ "$1" = "0" ]; then
  if [ -x %{_bindir}/fc-cache ]; then
    %{_bindir}/fc-cache %{fontdir}
  fi
fi

%files
%license OFL.txt
%{fontdir}/*

%changelog
* Mon Jan 9 2017 Mosaab Alzoubi <moceap@hotmail.com> - 0.7-1
- Initial