Author: mtasaka Update of /cvs/extras/rpms/monafont/devel In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28955 Modified Files: monafont.spec Log Message: * Thu Feb 19 2009 Mamoru Tasaka <mtasaka@xxxxxxxxxxxxxxxxxxx> - 2.90.6 - F-11: font naming scheme change Now mona-{bitmap,vlgothic,sazanami}-fonts binary rpms are created Index: monafont.spec =================================================================== RCS file: /cvs/extras/rpms/monafont/devel/monafont.spec,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- monafont.spec 5 Dec 2008 04:38:15 -0000 1.4 +++ monafont.spec 19 Feb 2009 05:33:40 -0000 1.5 @@ -1,31 +1,46 @@ -%define fontname mona-fonts %define archivename monafont -%define name_bitmap %{fontname}-bitmap -%define name_ttf_s %{fontname}-sazanami -%define name_ttf_v %{fontname}-VLGothic - -%define fontbasedir %{_datadir}/fonts -%define fontdir_bitmap %{fontbasedir}/%{name_bitmap} -%define fontdir_ttf_s %{fontbasedir}/%{name_ttf_s} -%define fontdir_ttf_v %{fontbasedir}/%{name_ttf_v} +%define projectname mona +%define fontname %{projectname} +%define family_ttf_s sazanami +%define family_ttf_v vlgothic +%define real_family_ttf_s sazanami +%define real_family_ttf_v VLGothic + +%define rpmname_suffix fonts + +%define fontdir_bitmap %{projectname}-bitmap +%define fontdir_ttf_s %{projectname}-%{family_ttf_s} +%define fontdir_ttf_v %{projectname}-%{family_ttf_v} + +%define name_bitmap %{fontdir_bitmap}-%{rpmname_suffix} +%define name_ttf_s %{fontdir_ttf_s}-%{rpmname_suffix} +%define name_ttf_v %{fontdir_ttf_v}-%{rpmname_suffix} + +%define old_name_bitmap mona-fonts-bitmap +%define old_name_ttf_s mona-fonts-sazanami +%define old_name_ttf_v mona-fonts-VLGothic + +%define fontdir_bitmap_full %{_fontbasedir}/%{fontdir_bitmap} +%define fontdir_ttf_s_full %{_fontbasedir}/%{fontdir_ttf_s} +%define fontdir_ttf_v_full %{_fontbasedir}/%{fontdir_ttf_v} +%define obsoletes_EVR 2.90-5.999 %define sazanami_ver 20040629 -%define vlgothic_ver 20081203 +%define vlgothic_ver 20090204 %define catalog_dir %{_sysconfdir}/X11/fontpath.d # misc %define show_progress 0 -%if 0%{?fedora} <= 8 -%define use_f_option 1 -%else -%undefine use_f_option -%endif + +%define common_description \ +Mona Font is a Japanese proportional font which allows you to view \ +Japanese text arts correctly. Name: %{archivename} Version: 2.90 -Release: 5%{?dist}.2 +Release: 6%{?dist} Summary: Japanese font for text arts # monafont itself is under public domain @@ -36,39 +51,39 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -# Write BuildRequires seperately +BuildRequires: fontpackages-devel %description -Mona Font is a Japanese proportional font which allows you to view -Japanese text arts correctly. - +%{common_description} %package -n %{name_bitmap} Summary: Bitmap Japanese font for text arts Group: User Interface/X License: Public Domain - # Write BuildRequires a bit verbosely BuildRequires: perl BuildRequires: xorg-x11-font-utils +Obsoletes: %{old_name_bitmap} <= %{obsoletes_EVR} +Provides: %{old_name_bitmap} = %{version}-%{release} %description -n %{name_bitmap} -Mona Font is a Japanese proportional font which allows you to view -Japanese text arts correctly. - +%{common_description} %package -n %{name_ttf_s} Summary: True Type Japanese font for text arts based on Sazanami Group: User Interface/X # monafont itself is Public Domain and this package borrows -# Sazanami +# sazanami +# And the outline otf uses Kochi-substitute (later renamed to sazanami), +# which is under BSD License: BSD - -BuildRequires: sazanami-fonts-gothic = 0.%{sazanami_ver} +BuildRequires: %{family_ttf_s}-gothic-fonts = 0.%{sazanami_ver} +Requires: fontpackages-filesystem +Obsoletes: %{old_name_ttf_s} <= %{obsoletes_EVR} +Provides: %{old_name_ttf_s} = %{version}-%{release} %description -n %{name_ttf_s} -Mona Font is a Japanese proportional font which allows you to view -Japanese text arts correctly. +%{common_description} This package contains True Type fonts generated generated from %{name} source package which are based on Sazanami fonts. @@ -81,12 +96,13 @@ # And the outline otf uses Kochi-substitute (later renamed to sazanami), # which is under BSD License: mplus and BSD - -BuildRequires: VLGothic-fonts = %{vlgothic_ver} +BuildRequires: %{family_ttf_v}-p-fonts = %{vlgothic_ver} +Requires: fontpackages-filesystem +Obsoletes: %{old_name_ttf_v} <= %{obsoletes_EVR} +Provides: %{old_name_ttf_v} = %{version}-%{release} %description -n %{name_ttf_v} -Mona Font is a Japanese proportional font which allows you to view -Japanese text arts correctly. +%{common_description} This package contains True Type fonts generated generated from %{name} source package which are based on VLGothic fonts. @@ -116,20 +132,20 @@ cp -p name.src name.src.orig ## 2.1 ttf based on sazanami -sed -e 's|^Mona$|Mona-sazanami|' name.src.orig > name.src +sed -e 's|^Mona$|Mona-%{real_family_ttf_s}|' name.src.orig > name.src make clean make \ - BASE_OUTLINE_TTF=%{fontbasedir}/sazanami-fonts-gothic/sazanami-gothic.ttf \ - BASE_OUTLINE_VERSION=sazanami-%{sazanami_ver} -mv mona.ttf mona-sazanami.ttf + BASE_OUTLINE_TTF=$(find %{_fontbasedir}/%{family_ttf_s} -name sazanami-gothic.ttf) \ + BASE_OUTLINE_VERSION=%{real_family_ttf_s}-%{sazanami_ver} +mv mona.ttf mona-%{real_family_ttf_s}.ttf ## 2.2 ttf based on VLGothic -sed -e 's|^Mona$|Mona-VLGothic|' name.src.orig > name.src +sed -e 's|^Mona$|Mona-%{real_family_ttf_v}|' name.src.orig > name.src make clean make \ - BASE_OUTLINE_TTF=%{fontbasedir}/VLGothic/VL-Gothic-Regular.ttf \ - BASE_OUTLINE_VERSION=VLGothic-%{vlgothic_ver} -mv mona.ttf mona-VLGothic.ttf + BASE_OUTLINE_TTF=$(find %{_fontbasedir}/%{family_ttf_v} -name VL-PGothic-Regular.ttf) \ + BASE_OUTLINE_VERSION=%{real_family_ttf_v}-%{vlgothic_ver} +mv mona.ttf mona-%{real_family_ttf_v}.ttf cd .. @@ -137,23 +153,23 @@ rm -rf $RPM_BUILD_ROOT # 1. bitmap fonts -mkdir -p -m 0755 $RPM_BUILD_ROOT%{fontdir_bitmap} +mkdir -p -m 0755 $RPM_BUILD_ROOT%{fontdir_bitmap_full} make install \ X11BINDIR=%{_bindir} \ MKDIRHIER="mkdir -p" \ - X11FONTDIR=$RPM_BUILD_ROOT%{fontdir_bitmap} \ + X11FONTDIR=$RPM_BUILD_ROOT%{fontdir_bitmap_full} \ GZIP_CMD="gzip -9" \ install install -cpm 644 fonts.alias.mona \ - $RPM_BUILD_ROOT%{fontdir_bitmap}/fonts.alias + $RPM_BUILD_ROOT%{fontdir_bitmap_full}/fonts.alias ## catalog symlink mkdir -p $RPM_BUILD_ROOT%{catalog_dir} pushd $RPM_BUILD_ROOT%{catalog_dir} UPWARDDIR="../../.." -ln -sf ${UPWARDDIR}%{fontdir_bitmap} %{name_bitmap} -if [ ! -f $UPWARDDIR%{fontdir_bitmap}/fonts.dir ] ; then +ln -sf ${UPWARDDIR}%{fontdir_bitmap_full} %{fontdir_bitmap} +if [ ! -f $UPWARDDIR%{fontdir_bitmap_full}/fonts.dir ] ; then echo "Perhaps symlink target is wrong" exit 1 fi @@ -162,11 +178,13 @@ # 2. ttf cd ttfsrc -mkdir -p -m 0755 \ - $RPM_BUILD_ROOT%{fontdir_ttf_s} \ - $RPM_BUILD_ROOT%{fontdir_ttf_v} -install -cpm 644 mona-sazanami.ttf $RPM_BUILD_ROOT%{fontdir_ttf_s}/ -install -cpm 644 mona-VLGothic.ttf $RPM_BUILD_ROOT%{fontdir_ttf_v}/ + +mkdir -p -m 0755 $RPM_BUILD_ROOT%{fontdir_ttf_s_full} +install -cpm 0644 mona-%{real_family_ttf_s}.ttf $RPM_BUILD_ROOT%{fontdir_ttf_s_full}/ + +mkdir -p -m 0755 $RPM_BUILD_ROOT%{fontdir_ttf_v_full} +install -cpm 0644 mona-%{real_family_ttf_v}.ttf $RPM_BUILD_ROOT%{fontdir_ttf_v_full}/ + cd .. %clean @@ -175,62 +193,40 @@ %post -n %{name_bitmap} if [ -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_bitmap}} || : -fi - -%post -n %{name_ttf_s} -if [ -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_ttf_s}} || : -fi - -%post -n %{name_ttf_v} -if [ -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_ttf_v}} || : + %{_bindir}/fc-cache %{fontdir_bitmap_full} || : fi %postun -n %{name_bitmap} if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_bitmap}} || : -fi - -%postun -n %{name_ttf_s} -if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_ttf_s}} || : -fi - -%postun -n %{name_ttf_v} -if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then - %{_bindir}/fc-cache %{?use_f_option:-f %{fontdir_ttf_v}} || : + %{_bindir}/fc-cache %{fontdir_bitmap_full} || : fi - %files -n %{name_bitmap} %defattr(0644,root,root,0755) %doc README %doc README.ascii -%{catalog_dir}/%{name_bitmap} -%dir %{fontdir_bitmap} -%verify(not md5 size mtime) %{fontdir_bitmap}/fonts.alias -%verify(not md5 size mtime) %{fontdir_bitmap}/fonts.dir -%{fontdir_bitmap}/*.pcf.gz - - -%files -n %{name_ttf_s} -%defattr(0644,root,root,0755) +%{catalog_dir}/%{fontdir_bitmap} +%dir %{fontdir_bitmap_full} +%verify(not md5 size mtime) %{fontdir_bitmap_full}/fonts.alias +%verify(not md5 size mtime) %{fontdir_bitmap_full}/fonts.dir +%{fontdir_bitmap_full}/*.pcf.gz + +%define _space %(echo " ") +%define _fontdir %{fontdir_ttf_s_full} +%_font_pkg -n -n%{_space}%{fontdir_ttf_s} mona-%{real_family_ttf_s}.ttf %doc ttfsrc/README-ttf.txt -%dir %{fontdir_ttf_s} -%{fontdir_ttf_s}/mona-sazanami.ttf - -%files -n %{name_ttf_v} -%defattr(0644,root,root,0755) +%define _fontdir %{fontdir_ttf_v_full} +%_font_pkg -n -n%{_space}%{fontdir_ttf_v} mona-%{real_family_ttf_v}.ttf %doc ttfsrc/README-ttf.txt -%dir %{fontdir_ttf_v} -%{fontdir_ttf_v}/mona-VLGothic.ttf - %changelog +* Thu Feb 19 2009 Mamoru Tasaka <mtasaka@xxxxxxxxxxxxxxxxxxx> - 2.90.6 +- F-11: font naming scheme change + Now mona-{bitmap,vlgothic,sazanami}-fonts binary rpms are + created + * Fri Dec 5 2008 Mamoru Tasaka <mtasaka@xxxxxxxxxxxxxxxxxxx> - rebuild for new VLGothic -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list