Converting montserrat spec to new version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello team,

I started converting the current julietaula-montserrat-fonts spec to the new version [1] using ibm-plex-fonts as template [2], but struggled to understand the functionality.

Here is an example below:

--

BuildArch:      noarch
%global         fontpkgname     julietaula-montserrat
%global         fontconf 61-%{fontpkgname}

# Override versioning to sync with upstream
Epoch:        1
Version:    7.222
Release:    %autorelease
URL:        https://github.com/JulietaUla/Montserrat

%global         foundry         julietaula
%global         fontlicense     OFL
%global         fontlicenses    OFL.txt
%global         fontdocsex      %{fontlicenses}

%global         fontfamily1      Montserrat
%global         fontsummary1     Sans-serif typeface inspired from Montserrat area
%global         fonts1           *.otf
%global         fontdescription1 %{expand:
A typeface inspired by signs around the Montserrat area \
of Buenos Aires, Argentina.}

%global         fontfamily2      MontserratAlternates
%global         fontsummary2     Sans-serif typeface inspired from Montserrat area
%global         fonts2           *.otf
%global         fontdescription1 %{expand:
A typeface inspired by signs around the Montserrat area \
of Buenos Aires, Argentina.}



Source0: %{url}/archive/v%{version}.tar.gz#/Montserrat-%{version}.tar.gz
Source1:    %{name}-fontconfig.conf
Source2:    %{name}-alternates-fontconfig.conf
Source3:    %{fontpkgname}.metainfo.xml
Source4:    %{fontpkgname}-alternates.metainfo.xml

BuildArch:    noarch
BuildRequires:    fontpackages-devel
BuildRequires:    libappstream-glib
Requires:    fontpackages-filesystem

# Reset the old date based versioning
Obsoletes:    %{name} < 1:%{version}-%{release}


%description
%{common_description}

%package common
Summary:  Common files for %{name}
Requires: fontpackages-filesystem

%description common
%{common_description}
This package consists of files used by other %{name} packages.

%package    -n %{fontpkgname}
Summary:    Base version of the Montserrat area inspired typeface
Requires:    %{name}-common = %{epoch}:%{version}-%{release}

%description    -n %{fo

As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. I

ntpkgname}
%{common_description}
This package provide the base fonts.

%package     -n %{fontpkgname}-alternates-fonts
Summary:    A Montserrat area inspired typeface family alternate version
Requires:    %{name}-common = %{epoch}:%{version}-%{release}

%description    -n %{fontpkgname}-alternates-fonts
%{common_description}
This package provide an alternate version of the fonts.

%package    -n %{fontpkgname}-base-web-fonts
Summary:    Web fonts version of the Montserrat area inspired typeface
Requires:    %{name}-common = %{epoch}:%{version}-%{release}

%description    -n %{fontpkgname}-base-web-fonts
%{common_description}
This package include essential web fonts.

%package    -n %{fontpkgname}-extra-web-fonts
Summary:    Extra web fonts version of the Montserrat area inspired typeface
Requires:    %{name}-common = %{epoch}:%{version}-%{release}

%description    -n %{fontpkgname}-extra-web-fonts
%{common_description}
This package includes extra web fonts.

%prep
%autosetup -c

%build
%fontbuild

%install
%fontinstall
install -m 0644 -p Montserrat-%{version}/fonts/webfonts/*.woff %{buildroot}%{_fontdir} install -m 0644 -p Montserrat-%{version}/fonts/webfonts/*.woff2 %{buildroot}%{_fontdir}

install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
        %{buildroot}%{_fontconfig_confdir}

# Install Montserrat fonts
install -m 0644 -p %{SOURCE1} \
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf

# Install MontserratAlternates fonts
install -m 0644 -p %{SOURCE2} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf}-alternates.conf

for fconf in %{fontconf}.conf \
         %{fontconf}-alternates.conf ; do
    ln -s %{_fontconfig_templatedir}/$fconf \
        %{buildroot}%{_fontconfig_confdir}/$fconf
done

# Add AppStream metadata file, Repeat for every font family
install -Dm 0644 -p %{SOURCE3} \
%{buildroot}%{_datadir}/metainfo/%{fontpkgname}.metainfo.xml
install -Dm 0644 -p %{SOURCE4} \
%{buildroot}%{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml

%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{fontpkgname}.metainfo.xml appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml

%_font_pkg -f %{fontconf}.conf Montserrat-*.otf
%{_datadir}/metainfo/%{fontpkgname}.metainfo.xml
%_font_pkg -n alternates -f %{fontconf}-alternates.conf MontserratAlternates-*.otf
%{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml
%_font_pkg -n base-web Montserrat-{Regular,Light,Bold,ExtraBold,Italic}.{woff,woff2}
%_font_pkg -n extra-web Montserrat*.{woff,woff2}

%files common
%license Montserrat-%{version}/OFL.txt
%doc Montserrat-%{version}/README.md

%changelog
%autochangelog

----

As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. The challenge is to keep these lines with the new spec version. Pointers welcome.

Thanks in advance.

Reference:

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/

[2] https://src.fedoraproject.org/rpms/ibm-plex-fonts/blob/rawhide/f/ibm-plex-fonts.spec

--
Luya Tshimbalanga
Fedora Design Team
Fedora Design Suite maintainer
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux