Package fonts-bitmap-mona: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | Group: Graphical desktop/Other %define oldname monafont # see https://bugzilla.altlinux.org/show_bug.cgi?id=10382 %define _localstatedir %{_var} %{!?_fontbasedir: %global _fontbasedir %{_datadir}/fonts} %define archivename monafont %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} %define fontdir_ttf_s %{projectname}-%{family_ttf_s} %define fontdir_ttf_v %{projectname}-%{family_ttf_v} %define name_bitmap fonts-bitmap-%{projectname} %define name_ttf_s fonts-ttf-%{projectname}-%{family_ttf_s} %define name_ttf_v fonts-ttf-%{projectname}-%{family_ttf_v} %define old_name_bitmap fonts-bitmap-mona-bitmap %define old_name_ttf_s mona-fonts-sazanami %define old_name_ttf_v mona-fonts-VLGothic %define fontdir_bitmap_full %{_fontsdir}/bitmap/%{fontdir_bitmap} %define fontdir_ttf_s_full %{_fontsdir}/ttf/%{fontdir_ttf_s} %define fontdir_ttf_v_full %{_fontsdir}/ttf/%{fontdir_ttf_v} %define obsoletes_EVR 2.90-alt1_20 %define sazanami_ver 20040629 %define vlgothic_ver 20141206 %define catalog_dir %{_sysconfdir}/X11/fontpath.d # misc %define show_progress 0 %define common_description \ Mona Font is a Japanese proportional font which allows you to view \ Japanese text arts correctly. Name: fonts-bitmap-mona Version: 2.90 Release: alt1_23 Summary: Japanese font for text arts # monafont itself is under public domain License: Public Domain URL: http://monafont.sourceforge.net/ Source0: http://downloads.sourceforge.net/monafont/%{archivename}-%{version}.tar.bz2 # Appstream metainfo files # https://bugzilla.redhat.com/show_bug.cgi?id=1165507 Source1: %{fontname}.metainfo.xml Source2: %{fontname}-sazanami.metainfo.xml Source3: %{fontname}-vlgothic.metainfo.xml # Need investigating, however # it seems that the behavior of "split" changed between 5.10 -> 5.12 Patch0: monafont-2.90-perl512-split.patch BuildArch: noarch BuildRequires: fontpackages-devel # Write BuildRequires a bit verbosely BuildRequires: perl-devel BuildRequires: bdftopcf mkfontdir mkfontscale xorg-font-utils BuildRequires: %{_bindir}/perl Obsoletes: %{old_name_bitmap} <= %{obsoletes_EVR} Provides: %{old_name_bitmap} = %{version}-%{release} Source44: import.info %description %{common_description} %package -n fonts-ttf-mona-sazanami Group: Graphical desktop/Other Summary: True Type Japanese font for text arts based on Sazanami # monafont itself is Public Domain and this package borrows # sazanami # And the outline otf uses Kochi-substitute (later renamed to sazanami), # which is under BSD License: BSD BuildRequires: fonts-ttf-sazanami-gothic = 0.%{sazanami_ver} #Obsoletes: %{old_name_ttf_s} <= %{obsoletes_EVR} #Provides: %{old_name_ttf_s} = %{version}-%{release} %description -n fonts-ttf-mona-sazanami %{common_description} This package contains True Type fonts generated generated from %{oldname} source package which are based on Sazanami fonts. %package -n fonts-ttf-mona-vlgothic Group: Graphical desktop/Other Summary: True Type Japanese font for text arts based on VLGothic # monafont itself is Public Domain and this package borrows # VLGothic (mplus and BSD) # And the outline otf uses Kochi-substitute (later renamed to sazanami), # which is under BSD License: mplus and BSD BuildRequires: fonts-ttf-vlgothic-p = %{vlgothic_ver} #Obsoletes: %{old_name_ttf_v} <= %{obsoletes_EVR} #Provides: %{old_name_ttf_v} = %{version}-%{release} %description -n fonts-ttf-mona-vlgothic %{common_description} This package contains True Type fonts generated generated from %{oldname} source package which are based on VLGothic fonts. %prep %setup -n %{oldname}-%{version} -q %patch0 -p1 -b .perl512 iconv -f EUC-JP -t UTF-8 README.euc > README touch -r README.euc README iconv -f SHIFT-JIS -t UTF-8 ttfsrc/README-ttf.txt > ttfsrc/README-ttf.txt.tmp touch -r ttfsrc/README-ttf.txt ttfsrc/README-ttf.txt.tmp mv -f ttfsrc/README-ttf.txt.tmp ttfsrc/README-ttf.txt %if ! %{show_progress} # In the build on koji, showing progress bar is rather dirty grep -rl '\\rprogress' . | xargs sed -i.bar -e '/\\rprogress/s|print|# print|' %endif %build ## Not using parallel make # 1. bitmap fonts make bdf # 2. ttf cd ttfsrc cp -p name.src name.src.orig ## 2.1 ttf based on sazanami sed -e 's|^Mona$|Mona-%{real_family_ttf_s}|' name.src.orig > name.src make clean make \ BASE_OUTLINE_TTF=$(find %{_fontbasedir}/ttf/%{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-%{real_family_ttf_v}|' name.src.orig > name.src make clean make \ BASE_OUTLINE_TTF=$(find %{_fontbasedir}/ttf/%{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 .. %install # 1. bitmap fonts mkdir -p -m 0755 $RPM_BUILD_ROOT%{fontdir_bitmap_full} make install \ X11BINDIR=%{_bindir} \ MKDIRHIER="mkdir -p" \ X11FONTDIR=$RPM_BUILD_ROOT%{fontdir_bitmap_full} \ GZIP_CMD="gzip -9" \ install install -cpm 644 fonts.alias.mona \ $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_full} %{fontdir_bitmap} if [ ! -f $UPWARDDIR%{fontdir_bitmap_full}/fonts.dir ] ; then echo "Perhaps symlink target is wrong" exit 1 fi popd # 2. ttf cd ttfsrc 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 .. # Add AppStream metadata # https://bugzilla.redhat.com/show_bug.cgi?id=1165507 install -Dm 0644 -p %{SOURCE1} \ %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml install -Dm 0644 -p %{SOURCE2} \ %{buildroot}%{_datadir}/appdata/%{fontname}-sazanami.metainfo.xml install -Dm 0644 -p %{SOURCE3} \ %{buildroot}%{_datadir}/appdata/%{fontname}-vlgothic.metainfo.xml %files -n fonts-bitmap-mona %doc README %doc README.ascii %{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 _font_pkg_name %{name_ttf_s} %define _fontdir %{fontdir_ttf_s_full} %files -n %{name_ttf_s} %dir %{fontdir_ttf_s_full}/ %{fontdir_ttf_s_full}/mona-%{real_family_ttf_s}.ttf %doc ttfsrc/README-ttf.txt %{_datadir}/appdata/%{projectname}.metainfo.xml %{_datadir}/appdata/%{projectname}-sazanami.metainfo.xml %define _font_pkg_name %{name_ttf_v} %define _fontdir %{fontdir_ttf_v_full} %files -n %{name_ttf_v} %dir %{fontdir_ttf_v_full}/ %{fontdir_ttf_v_full}/mona-%{real_family_ttf_v}.ttf %doc ttfsrc/README-ttf.txt %{_datadir}/appdata/%{projectname}.metainfo.xml %{_datadir}/appdata/%{projectname}-vlgothic.metainfo.xml %changelog * Sun Feb 17 2019 Igor Vlasenko <viy@altlinux.ru> 2.90-alt1_23 - added appinfo - obsoleted fonts-bitmap-mona-bitmap - manually cleared spec * Mon Sep 24 2012 Igor Vlasenko <viy@altlinux.ru> 2.90-alt1_16 - new fc release * Wed Jun 20 2012 Igor Vlasenko <viy@altlinux.ru> 2.90-alt1_15 - fc import |