@ -1,113 +1,149 @@
%global fontname linux-libertine
# Packaging template: multi-family fonts packaging.
%global prio_libertine 60
#
%global prio_biolinum 61
# SPDX-License-Identifier: MIT
%global fontconf_libertine %{prio_libertine}-%{fontname}-libertine.conf
#
%global fontconf_biolinum %{prio_biolinum}-%{fontname}-biolinum.conf
# This template documents spec declarations, used when packaging multiple font
%global fontconf_metrics 29-%{fontname}-metrics-alias.conf
# families, from a single dedicated source archive. The source rpm is named
%global archivename LinLibertine
# after the first (main) font family). Look up “fonts-3-sub” when the source
%global posttag 2012_07_02
# rpm needs to be named some other way.
#
%define common_desc \
# It is part of the following set of packaging templates:
The Linux Libertine Open Fonts are a TrueType font family for practical \
# “fonts-0-simple”: basic single-family fonts packaging
use in documents. They were created to provide a free alternative to \
# “fonts-1-full”: less common patterns for single-family fonts packaging
proprietary standard fonts.
# “fonts-2-multi”: multi-family fonts packaging
# “fonts-3-sub”: packaging fonts, released as part of something else
Name: %{fontname}-fonts
#
Version: 5.3.0
%global posttag 2012_07_02
Release: 24.%{posttag}%{?dist}
Summary: Linux Libertine Open Fonts
Version: 5.3.0
Release: 25.%{posttag}%{?dist}
License: GPL-2.0-or-later WITH Font-exception-2.0 OR OFL-1.1
URL: http://linuxlibertine.sf.net
URL: http://linuxlibertine.sf.net
BuildRequires: fonts-rpm-macros >= 1:2.0.5-9
Source0: http://download.sourceforge.net/sourceforge/linuxlibertine/LinLibertineOTF_%{version}_%{posttag}.tgz
Source1: %{name}-libertine-fontconfig.conf
Source2: %{name}-biolinum-fontconfig.conf
# The following declarations will be aliased to [variable]0 and reused for all
Source3: %{name}-libertine-metrics-alias-fontconfig.conf
# generated *-fonts packages unless overriden by a specific [variable][number]
Source4: libertine.metainfo.xml
# declaration.
Source5: biolinum.metainfo.xml
%global foundry linux-libertine
%global fontlicense GPL-2.0-or-later WITH Font-exception-2.0 OR OFL-1.1
BuildArch: noarch
%global fontlicenses OFL-1.1.txt GPL.txt LICENCE.txt
BuildRequires: fontpackages-devel libappstream-glib
%global fontdocs ToDo.txt Readme-TEX.txt README ChangeLog.txt Bugs.txt
#BuildRequires: fontforge
%global fontdocsex %{fontlicenses}
Requires: %{name}-common = %{version}-%{release}
# A text block that can be reused as part of the description of each generated
%description
# subpackage.
%common_desc
%global common_description %{expand:
The Linux Libertine Open Fonts are a TrueType font family for practical use in documents. They were created to provide a free alternative to proprietary standard fonts.
}
# Declaration for the subpackage containing the first font family. Also used as
# source rpm info. All the [variable]0 declarations are equivalent and aliased
# to [variable].
%global fontfamily0 Linux Libertine
%global fontsummary0 Linux Libertine Open Fonts
%global fontpkgheader0 %{expand:
Obsoletes: linux-libertine-fonts-common < 5.3.0-24
Provides: linux-libertine-fonts-common = %{version}-%{release}
}
%global fonts0 LinLibertine_RZ.otf LinLibertine_RZI.otf LinLibertine_R.otf LinLibertine_RI.otf LinLibertine_RB.otf LinLibertine_RBI.otf LinLibertine_DR.otf LinLibertine_I.otf
%global fontsex0 %{nil}
%global fontconfs0 %{SOURCE10} %{SOURCE13}
%global fontconfsex0 %{nil}
%global fontdescription0 %{expand:
%{common_description}
This package contains Serif fonts.
This package contains Serif fonts.
}
%package -n %{fontname}-biolinum-fonts
Summary: Sans-serif fonts from Linux Libertine Open Fonts
%global fontfamily1 Linux Biolinum
Requires: %{name}-common = %{version}-%{release}
%global fontsummary1 Sans-serif fonts from Linux Libertine Open Fonts
%global fontpkgheader1 %{expand:
%description -n %{fontname}-biolinum-fonts
Obsoletes: linux-libertine-fonts-common < 5.3.0-24
%common_desc
Provides: linux-libertine-fonts-common = %{version}-%{release}
}
%global fonts1 LinBiolinum_R.otf LinBiolinum_RI.otf LinBiolinum_RB.otf LinBiolinum_K.otf
%global fontsex1 %{nil}
%global fontconfs1 %{SOURCE11}
%global fontconfsex1 %{nil}
%global fontdescription1 %{expand:
%{common_description}
This package contains Sans fonts.
This package contains Sans fonts.
}
%package common
Summary: Common files for Linux Libertine Open Fonts
%global fontfamily2 Linux Libertine Mono
Requires: fontpackages-filesystem
%global fontsummary2 Monospace font from Linux Libertine Open Fonts
%global fontpkgheader2 %{expand:
%description common
Obsoletes: linux-libertine-fonts < 5.3.0-24
%common_desc
Obsoletes: linux-libertine-fonts-common < 5.3.0-24
Provides: linux-libertine-fonts-common = %{version}-%{release}
This package consists of files used by other %{name} packages.
}
%global fonts2 LinLibertine_M.otf
%global fontsex2 %{nil}
%global fontconfs2 %{SOURCE12}
%global fontconfsex2 %{nil}
%global fontdescription2 %{expand:
%{common_description}
This package contains Monospace font.
}
Source0: http://download.sourceforge.net/sourceforge/linuxlibertine/LinLibertineOTF_%{version}_%{posttag}.tgz
Source10: 60-linux-libertine-fonts.conf
Source11: 61-linux-libertine-biolinum-fonts.conf
Source12: 61-linux-libertine-mono-fonts.conf
Source13: 29-linux-libertine-fonts-metrics-alias.conf
# “fontpkg” will generate the font subpackage headers corresponding to the
# elements declared above.
# “fontpkg” accepts the following selection arguments:
# – “-a” process everything
# – “-z [number]” process a specific declaration block
# If no flag is specified it will only process the zero/nosuffix block.
%fontpkg -a
# “fontmetapkg” will generate a font meta(sub)package header for all the font
# subpackages generated in this spec. Optional arguments:
# – “-n [name]” use [name] as metapackage name
# – “-s [variable]” use the content of [variable] as metapackage summary
# – “-d [variable]” use the content of [variable] as metapackage description
# – “-z [numbers]” restrict metapackaging to [numbers] comma-separated list
# of font package suffixes
%fontmetapkg
%prep
%prep
%setup -q -c
%setup -q -c
sed -i -e 's/\r//' OFL-1.1.txt
%build
%build
#for i in $(find -name '*.sfd'); do
# “fontbuild” accepts the usual selection arguments:
# (cd scripts;
# – “-a” process everything
# ./bailly-2.sh "../$i" ttf
# – “-z [number]” process a specific declaration block
# )
# If no flag is specified it will only process the zero/nosuffix block.
#done
%fontbuild -a
#mv scripts/*.ttf .
%install
%install
install -m 0755 -d %{buildroot}%{_fontdir}
# “fontinstall” accepts the usual selection arguments:
install -m 0644 -p *.otf %{buildroot}%{_fontdir}
# – “-a” process everything
# – “-z [number]” process a specific declaration block
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
# If no flag is specified it will only process the zero/nosuffix block.
%{buildroot}%{_fontconfig_confdir}
%fontinstall -a
install -m 0644 -p %{SOURCE1} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf_libertine}
install -m 0644 -p %{SOURCE2} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf_biolinum}
install -m 0644 -p %{SOURCE3} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf_metrics}
for fconf in %{fontconf_libertine} %{fontconf_metrics} %{fontconf_biolinum}; do
ln -s %{_fontconfig_templatedir}/$fconf \
%{buildroot}%{_fontconfig_confdir}/$fconf
done
# Add AppStream metadata
install -Dm 0644 -p %{SOURCE4} \
%{buildroot}%{_metainfodir}/libertine.metainfo.xml
install -Dm 0644 -p %{SOURCE5} \
%{buildroot}%{_metainfodir}/biolinum.metainfo.xml
%check
%check
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
# “fontcheck” accepts the usual selection arguments:
# – “-a” process everything
%files common
# – “-z [number]” process a specific declaration block
%license GPL.txt LICENCE.txt OFL-1.1.txt
# If no flag is specified it will only process the zero/nosuffix block.
%doc Bugs.txt ChangeLog.txt Readme-TEX.txt README
%fontcheck -a
%_font_pkg -f %{fontconf_libertine} LinLibertine*.otf
# “fontfiles” accepts the usual selection arguments:
%{_metainfodir}/libertine.metainfo.xml
# – “-a” process everything
# – “-z [number]” process a specific declaration block
%{_fontconfig_templatedir}/%{fontconf_metrics}
# If no flag is specified it will only process the zero/nosuffix block
%{_fontconfig_confdir}/%{fontconf_metrics}
%fontfiles -a
%_font_pkg -n biolinum -f %{fontconf_biolinum} LinBiolinum*.otf
%{_metainfodir}/biolinum.metainfo.xml
%changelog
%changelog
* Mon Feb 13 2023 Akira TAGOH <tagoh@redhat.com> - 5.3.0-24.2012_07_02
- Revise the spec file for new packaging guidelines.
- Add linux-libertine-mono-fonts sub-package.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-24.2012_07_02
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-24.2012_07_02
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild