Package fonts-otf-ht-alegreya: Specfile

Group: System/Fonts/True type
# BEGIN SourceDeps(oneline):
BuildRequires: unzip
# END SourceDeps(oneline)
%define oldname ht-alegreya-fonts
%global fontname alegreya
%global fontconf 60-%{fontname}.conf
%global common_desc \
Alegreya was chosen as one of 53 "Fonts of the Decade" at the ATypI Letter2 \
competition in September 2011, and one of the top 14 text type systems. It \
was also selected in the 2nd Bienal Iberoamericana de DiseA.o, competition \
held in Madrid in 2010. Alegreya is a typeface originally intended for \
literature. Among its crowning characteristics, it conveys a dynamic and \
varied rhythm which facilitates the reading of long texts. Also, it \
provides freshness to the page while referring to the calligraphic letter, \
not as a literal interpretation, but rather in a contemporary typographic \
language. The italic has just as much care and attention to detail in the \
design as the roman. The bold weights are strong, and the Black weights are \
really experimental for the genre. Not only does Alegreya provide great \
performance, but also achieves a strong and harmonious text by means of \
elements designed in an atmosphere of diversity.

Name:		fonts-otf-ht-alegreya
Version:	1.004
Release:	alt1_5
Summary:	A Serif typeface originally intended for literature
License:	OFL
Source1:	%{oldname}-fontconfig.conf
Source2:	ht-%{fontname}SC-fonts-fontconfig.conf
Source3:	%{fontname}.metainfo.xml
Source4:	%{fontname}SC.metainfo.xml
BuildArch:	noarch
BuildRequires:	fontpackages-devel


%package -n fonts-otf-ht-alegreya-smallcaps
Group: System/Fonts/True type
Summary:	SmallCaps variant of the Alegreya font family

%description -n fonts-otf-ht-alegreya-smallcaps

This is the SmallCaps variant, in which the Capital letters are smaller.

%setup -n %{oldname}-%{version} -q -c
sed -i 's/\r//' OFL.txt

# Nothing to do here.

install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.otf %{buildroot}%{_fontdir}

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

install -m 0644 -p %{SOURCE1} \

install -m 0644 -p %{SOURCE2} \

ln -s %{_fontconfig_templatedir}/%{fontconf} \

ln -s %{_fontconfig_templatedir}/60-%{fontname}SC.conf \

# Add AppStream metadata
install -Dm 0644 -p %{SOURCE3} \
install -Dm 0644 -p %{SOURCE4} \
# generic fedora font import transformations
# move fonts to corresponding subdirs if any
for fontpatt in OTF TTF TTC otf ttf ttc pcf pcf.gz bdf afm pfa pfb; do
    case "$fontpatt" in 
	pcf*|bdf*) type=bitmap;;
	tt*|TT*) type=ttf;;
	otf|OTF) type=otf;;
	afm*|pf*) type=type1;;
    find $RPM_BUILD_ROOT/usr/share/fonts -type f -name '*.'$fontpatt | while read i; do
	j=`echo "$i" | sed -e s,/usr/share/fonts/,/usr/share/fonts/$type/,`;
	install -Dm644 "$i" "$j";
	rm -f "$i";
	olddir=`dirname "$i"`;
	mv -f "$olddir"/{encodings.dir,fonts.{dir,scale,alias}} `dirname "$j"`/ 2>/dev/null ||:
	rmdir -p "$olddir" 2>/dev/null ||:
# kill invalid catalogue links
if [ -d $RPM_BUILD_ROOT/etc/X11/fontpath.d ]; then
    find -L $RPM_BUILD_ROOT/etc/X11/fontpath.d -type l -print -delete ||:
    # relink catalogue
    find $RPM_BUILD_ROOT/usr/share/fonts -name fonts.dir | while read i; do
	j=`echo $i | sed -e s,$RPM_BUILD_ROOT/usr/share/fonts/,,`; type=${j%%%%/*}; 
	pre_stem=${j##$type/}; stem=`dirname $pre_stem|sed -e s,/,-,g`;
	case "$type" in 
	    bitmap) pri=10;;
	    ttf|ttf) pri=50;;
	    type1) pri=40;;
	ln -s /usr/share/fonts/$j $RPM_BUILD_ROOT/etc/X11/fontpath.d/"$stem:pri=$pri"
    done ||:

%config(noreplace) %{_fontconfig_confdir}/%{fontconf}
%doc OFL.txt

%files -n fonts-otf-ht-alegreya-smallcaps
%config(noreplace) %{_fontconfig_confdir}/60-%{fontname}SC.conf
%doc OFL.txt

* Mon Oct 27 2014 Igor Vlasenko <> 1.004-alt1_5
- update to new release by fcimport

* Thu Jun 26 2014 Igor Vlasenko <> 1.004-alt1_4
- update to new release by fcimport

* Wed Apr 17 2013 Igor Vlasenko <> 1.004-alt1_2
- converted for ALT Linux by srpmconvert tools

* Mon Nov 05 2012 Igor Vlasenko <> 1.004-alt1_1
- fc import