From 63214f0a07954006da25cc73fe6e4fe1fba96701 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Aug 24 2022 07:50:11 +0000 Subject: Revise the spec file for new packaging guidelines. --- diff --git a/68-ipa-pmincho-fonts.conf b/68-ipa-pmincho-fonts.conf new file mode 100644 index 0000000..9aa7fef --- /dev/null +++ b/68-ipa-pmincho-fonts.conf @@ -0,0 +1,38 @@ + + + + + + IPAPMincho + + serif + + + + + + + ja + + + serif + + + IPAPMincho + + + + + + + IPAPMincho + + + false + + + true + + + + diff --git a/ipa-pmincho-fonts-fontconfig.conf b/ipa-pmincho-fonts-fontconfig.conf deleted file mode 100644 index defd2e5..0000000 --- a/ipa-pmincho-fonts-fontconfig.conf +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - IPAPMincho - - serif - - - - - - - ja - - - serif - - - IPAPMincho - - - - - - - IPAPMincho - - - false - - - true - - - - diff --git a/ipa-pmincho-fonts.spec b/ipa-pmincho-fonts.spec index 338486f..42767dd 100644 --- a/ipa-pmincho-fonts.spec +++ b/ipa-pmincho-fonts.spec @@ -1,55 +1,103 @@ -%global priority 68 -%global fontname ipa-pmincho -%global fontconf %{priority}-%{fontname}.conf -%global archiveversion 00303 -%global archivename ipamp%{archiveversion} - -Name: %{fontname}-fonts -Version: 003.03 -Release: 22%{?dist} -Summary: Japanese Proportional Mincho-typeface OpenType font by IPA - -License: IPA -URL: http://ossipedia.ipa.go.jp/ipafont/ -Source0: http://info.openlab.ipa.go.jp/ipafont/fontdata/%{archivename}.zip -Source1: %{name}-fontconfig.conf - -BuildArch: noarch -BuildRequires: fontpackages-devel -Requires: fontpackages-filesystem - -%description +# Packaging template: basic single-family fonts packaging. +# +# SPDX-License-Identifier: MIT +# +# This template documents the minimal set of spec declarations, necessary to +# package a single font family, from a single dedicated source archive. +# +# It is part of the following set of packaging templates: +# “fonts-0-simple”: basic single-family fonts packaging +# “fonts-1-full”: less common patterns for single-family fonts packaging +# “fonts-2-multi”: multi-family fonts packaging +# “fonts-3-sub”: packaging fonts, released as part of something else +# +# A font family is composed of font files, that share a single design, and +# differ ONLY in: +# — Weight Bold, Black… +# – Width∕Stretch Narrow, Condensed, Expanded… +# — Slope/Slant Italic, Oblique +# Optical sizing Caption… +# +# Those parameters correspond to the default axes of OpenType variable fonts: +# https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags +# The variable fonts model is an extension of the WWS model described in the +# WPF Font Selection Model whitepaper (2007): +# https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/02/24/90/36/WPF%20Font%20Selection%20Model.pdf +# +# Do not rely on the naming upstream chose, to define family boundaries, it +# will often be wrong. +# +# Declaration order is chosen to limit divergence between those templates, and +# simplify cut and pasting. +# +Version: 003.03 +Release: 23%{?dist} +URL: http://ossipedia.ipa.go.jp/ipafont/ +BuildRequires: fonts-rpm-macros >= 1:2.0.5-9 + +# The identifier of the entity, that released the font family. +%global foundry IPA +# The font family license identifier. Adjust as necessary. The OFL is our +# recommended font license. +%global fontlicense IPA +# +# The following directives are lists of space-separated shell globs +# – matching files associated with the font family, +# – as they exist in the build root, +# — at the end of the %build stage: +# – legal files (licensing…) +%global fontlicenses IPA_Font_License_Agreement_v1.0.txt +# – documentation files +%global fontdocs Readme_ipamp00303.txt +# – exclusions from the ”fontdocs” list +%global fontdocsex %{fontlicenses} + +# The human-friendly font family name, whitespace included, restricted to the +# the Basic Latin Unicode block. +%global fontfamily IPAPMincho +%global fontsummary Japanese Proportional Mincho-typeface OpenType font by IPA +# +# More shell glob lists: +# – font family files +%global fonts ipamp.ttf +# – fontconfig files +%global fontconfs %{SOURCE10} +# +# A multi-line description block for the generated package. +%global fontdescription %{expand: IPA Font is a Japanese OpenType fonts that is JIS X 0213:2004 compliant, provided by Information-technology Promotion Agency, Japan. This package contains Proportional Mincho style font. +} -%prep -%setup -q -n %{archivename} +# http://info.openlab.ipa.go.jp/ipafont/fontdata/%{archivename}.zip +Source0: http://info.openlab.ipa.go.jp/ipafont/fontdata/ipamp00303.zip +# Adjust as necessary. Keeping the filename in sync with the package name is a good idea. +# See the fontconfig templates in fonts-rpm-templates for information on how to +# write good fontconfig files and choose the correct priority [number]. +Source10: 68-ipa-pmincho-fonts.conf + +%fontpkg +%prep +%setup -q -n ipamp00303 %build +%fontbuild %install -install -m 0755 -d $RPM_BUILD_ROOT%{_fontdir} -install -m 0644 -p *.ttf $RPM_BUILD_ROOT%{_fontdir} - -install -m 0755 -d $RPM_BUILD_ROOT%{_fontconfig_templatedir} \ - $RPM_BUILD_ROOT%{_fontconfig_confdir} -install -m 0644 -p %{SOURCE1} \ - $RPM_BUILD_ROOT%{_fontconfig_templatedir}/%{fontconf} - -ln -s %{_fontconfig_templatedir}/%{fontconf} \ - $RPM_BUILD_ROOT%{_fontconfig_confdir}/%{fontconf} +%fontinstall +%check +%fontcheck -%_font_pkg -f %{fontconf} *.ttf - -%doc Readme_%{archivename}.txt -%license IPA_Font_License_Agreement_v1.0.txt - +%fontfiles %changelog +* Wed Aug 24 2022 Akira TAGOH - 003.03-23 +- Revise the spec file for new packaging guidelines. + * Thu Jul 21 2022 Fedora Release Engineering - 003.03-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild @@ -148,4 +196,3 @@ ln -s %{_fontconfig_templatedir}/%{fontconf} \ * Tue Apr 21 2009 Akira TAGOH - 003.01-1 - Initial package. -