Blob Blame Raw
%global fontname julietaula-montserrat
%global fontconf 61-%{fontname}.conf
%global commit b0153c845dc0835915d97facd61367d71710e99c
%global commitdate 20151221
#%%global shortcommit %%(c=%%{commit}; echo ${c:0:7})
#%%global gitversion .git%%{commitdate}.%%{shortcommit}

#global archivename %%{name}-%%{version}

Name:		julietaula-montserrat-fonts
Version:	%{commitdate}
Release:	3%{?dist}
Summary:	Sans-serif typeface created by Julieta Ulanovsky

License:	OFL
URL:		https://github.com/JulietaUla/Montserrat/
Source0:	%{url}/archive/%{commit}/Montserrat-%{commit}.zip
Source1:	%{name}-fontconfig.conf
Source2:	%{fontname}.metainfo.xml
Source3:	LICENSE.txt


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

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

%prep
%setup -q -c
cp -p %{SOURCE3} .

%build


%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p Montserrat-%{commit}/ttf/*.ttf %{buildroot}%{_fontdir}
install -m 0644 -p Montserrat-%{commit}/otf/*.otf %{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}/appdata/%{fontname}.metainfo.xml

%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{fontname}.metainfo.xml
%endif
%_font_pkg -f %{fontconf} {*.ttf,*.otf}
%if 0%{?fedora} >= 21
%{_datadir}/appdata/%{fontname}.metainfo.xml
%endif
%license LICENSE.txt

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

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

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