%global forgename steinberg %global fontname bravura %global fontconf 65-%{fontname} # Upstream has not made a tarball since version 1.271, so pull from git %global commit ccc90dd25a28354a9915930d937d959fdfe94c33 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global gitdate 20190423 %global common_desc %{expand: Bravura is an OpenType music font developed for Steinberg's Dorico music notation and composition software. It is also the reference font for Standard Music Font Layout (SMuFL), which provides a standard way of mapping the thousands of musical symbols required by conventional music notation into the Private Use Area in Unicode's Basic Multilingual Plane for a single (format-independent) font.} Name: %{forgename}-%{fontname}-fonts Version: 1.277 Release: 1.%{gitdate}.%{shortcommit}%{?dist} Summary: Bravura music font License: OFL URL: https://www.smufl.org/fonts/ Source0: https://github.com/steinbergmedia/%{fontname}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: %{forgename}-%{fontname}-fontconfig.conf Source2: %{forgename}-%{fontname}-text-fontconfig.conf Source3: %{forgename}-%{fontname}.metainfo.xml Source4: %{forgename}-%{fontname}-text.metainfo.xml BuildArch: noarch BuildRequires: fontpackages-devel BuildRequires: libappstream-glib Requires: %{name}-common = %{version}-%{release} %description %common_desc This package contains the Bravura font family. It is a Unicode typeface designed by Steinberg for its music notation and scoring application. %package common Summary: Common files of the Bravura fonts Requires: fontpackages-filesystem %description common %common_desc This package consists of files used by other %{name} packages. %package -n %{forgename}-%{fontname}-text-fonts Summary: Bravura music text font Requires: %{name}-common = %{version}-%{release} %description -n %{forgename}-%{fontname}-text-fonts %common_desc This package contains the Bravura Text font family. It is a Unicode typeface designed by Steinberg for its music notation and scoring application. %prep %autosetup -n %{fontname}-%{commit} %build # Nothing to do %install cd redist # Install the SMuFL metadata install -m 0755 -d %{buildroot}%{_datadir}/SMuFL/Fonts/%{fontname} install -m 0644 -p bravura_metadata.json %{buildroot}%{_datadir}/SMuFL/Fonts/%{fontname} # Install the font files install -m 0755 -d %{buildroot}%{_fontdir} install -m 0644 -p otf/*.otf %{buildroot}%{_fontdir} cd - # Install the fontconfig files install -m 0755 -d %{buildroot}%{_fontconfig_confdir} install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf install -m 0644 -p %{SOURCE2} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-text.conf ln -s %{_fontconfig_templatedir}/%{fontconf}.conf \ %{buildroot}%{_fontconfig_confdir}/%{fontconf}.conf ln -s %{_fontconfig_templatedir}/%{fontconf}-text.conf \ %{buildroot}%{_fontconfig_confdir}/%{fontconf}-text.conf # Install the Appstream metadata files install -m 0755 -d %{buildroot}%{_datadir}/metainfo install -m 0644 -p %{SOURCE3} \ %{buildroot}%{_datadir}/metainfo/%{fontname}.metainfo.xml install -m 0644 -p %{SOURCE4} \ %{buildroot}%{_datadir}/metainfo/%{fontname}-text.metainfo.xml %check appstream-util validate-relax --nonet \ %{buildroot}%{_datadir}/metainfo/%{fontname}.metainfo.xml appstream-util validate-relax --nonet \ %{buildroot}%{_datadir}/metainfo/%{fontname}-text.metainfo.xml %files common %doc README.md redist/bravura-text.md redist/FONTLOG.txt %license LICENSE.txt %{_datadir}/SMuFL/ %_font_pkg -f %{fontconf}.conf Bravura.otf %{_datadir}/metainfo/%{fontname}.metainfo.xml %_font_pkg -n %{forgename}-%{fontname}-text-fonts -f %{fontconf}-text.conf BravuraText.otf %{_datadir}/metainfo/%{fontname}-text.metainfo.xml %changelog * Thu Sep 19 2019 Jerry James - 1.277-1.20190423.ccc90dd - Initial RPM