Blob Blame Raw
%global fontname julietaula-montserrat
%global fontconf 61-%{fontname}.conf

Name:		julietaula-montserrat-fonts
Version:	6.002
Release:	2%{?dist}
# Override versioning to sync with upstream
Epoch:		1
Summary:	Sans-serif typeface created by Julieta Ulanovsky

License:	OFL
URL:		https://github.com/JulietaUla/Montserrat
Source0:	%{url}/archive/Montserrat/v%{version}.tar.gz#/Montserrat-%{version}.tar.gz
Source1:	%{name}-fontconfig.conf
Source2:	%{fontname}.metainfo.xml

BuildArch:	noarch
BuildRequires:	fontpackages-devel
%if 0%{?fedora} >= 21
BuildRequires:	libappstream-glib
%endif
Requires:	fontpackages-filesystem

# Reset the old date based versioning
Obsoletes:	%{name} < 1:%{version}-%{release}


%description
A typeface created by Julieta Ulanovsky inspired by signs around
the Montserrat area of Buenos Aires, Argentina

%prep
%autosetup -c

%build


%install
install -Dpm 0644 Montserrat-%{version}/fonts/ttf/*.ttf -t %{buildroot}%{_fontdir}
install -Dpm 0644 Montserrat-%{version}/fonts/otf/*.otf -t %{buildroot}%{_fontdir}

install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
		%{buildroot}%{_fontconfig_confdir}

install -m 0644 -p %{SOURCE1} \
		%{buildroot}%{_fontconfig_templatedir}/%{fontconf}
ln -s %{_fontconfig_templatedir}/%{fontconf} \
      %{buildroot}%{_fontconfig_confdir}/%{fontconf}

%if 0%{?fedora} >= 21
install -Dm 0644 -p %{SOURCE2} \
		%{buildroot}%{_datadir}/metainfo/%{fontname}.metainfo.xml

%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{fontname}.metainfo.xml
%endif
%_font_pkg -f %{fontconf} *.ttf *.otf
%if 0%{?fedora} >= 21
%{_datadir}/metainfo/%{fontname}.metainfo.xml
%endif
%license Montserrat-%{version}/OFL.txt
%doc Montserrat-%{version}/README.md 

%changelog
* Sun May 21 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 1:6.002-2
- Fix obsolete tag

* Mon May 15 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 1:6.002-1
- Use Epoch to sync version with upstream
- Latest stable upstream release


* Wed Apr 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0:20151221-5
- Improved appstream file with fonts list

* Sun Mar 27 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0:20151221-4
- Fixed compatibility issue with Fedora 22 and EPEL7 less

* Fri Mar 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0:20151221-3
- Switched doc section to license
- Deleted oft and ttf subdirectories

* Fri Mar 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0:20151221-2
- Moved appstream-util to check section

* Thu Mar 24 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0:20151221-1
- Initial build