%global fontname gfs-pyrsos %global fontconf 61-%{fontname}.conf %define _fontdir %{_datadir}/fonts %define _fontconfig_confdir %{_sysconfdir}/fonts/conf.d %define _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail %global archivename GFS_PYRSOS Name: %{fontname}-fonts Version: 20090618 Release: 1 Summary: A 20th century italic Greek typeface Group: User Interface/X License: OFL URL: http://www.greekfontsociety.gr/pages/en_typefaces20th.html Source0: http://www.greekfontsociety.gr/%{archivename}.zip Source1: %{name}-fontconfig.conf BuildArch: noarch BuildRequires: coreutils, sed, unzip Requires: fontconfig %description This typeface first appeared in the late 20s and was used as an alternative italic type to the most commonly used Greek italics at the time, coming from Germany (Leipsig). The name commemorates the edition of the Greek encyclopædia Pyrsos (1927-1933) from which the types were taken. The font was digitally designed by George D. Matthiopoulos and is freely available by GFS. %prep %setup -q -c -T export PATH=/opt/freeware/bin:$PATH unzip -j -L -q %{SOURCE0} chmod 0644 *.txt for txt in *.txt ; do fold -s $txt > $txt.new sed -i 's/\r//' $txt.new touch -r $txt $txt.new mv $txt.new $txt done %build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname} chmod 0755 ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname} cp *.otf ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname}/ chmod 0644 ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname}/* mkdir -p ${RPM_BUILD_ROOT}%{_fontconfig_confdir} mkdir -p ${RPM_BUILD_ROOT}%{_fontconfig_templatedir} cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_fontconfig_templatedir}/%{fontconf}.conf ln -sf %{_fontconfig_templatedir}/%{fontconf}.conf ${RPM_BUILD_ROOT}%{_fontconfig_confdir}/%{fontconf}.conf %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc *.txt *.pdf %{_fontconfig_confdir}/%{fontconf}.conf %{_fontconfig_templatedir}/%{fontconf}.conf %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/*.otf %changelog * Mon Jun 25 2012 Michael Perzl - 20090618-1 - first version for AIX V5.1 and higher