Skip to content

Instantly share code, notes, and snippets.

@gnikandrov
Created March 10, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnikandrov/ec48762cf7bcfa1edb1e to your computer and use it in GitHub Desktop.
Save gnikandrov/ec48762cf7bcfa1edb1e to your computer and use it in GitHub Desktop.
Package description for Adobe Source Sans Pro fonts for Sailfish OS
Name: sailfish-fonts-extra
Summary: Extra fonts for Sailfish
Description: |
Source Sans Pro font for Sailfish (similar to original font, but w/Cyrillic and Greek support).
Version: 0.2.010
Release: 2
Group: System/X11/Fonts
License: OFL
URL: https://github.com/adobe-fonts/source-sans-pro
Sources:
- http://github.com/adobe-fonts/source-sans-pro/archive/2.010R-ro/1.065R-it.tar.gz#/source-sans-pro-2.010R-ro-1.065R-it.tar.gz
BuildArch: noarch
Configure: none
Builder: none
SourcePrefix: source-sans-pro-2.010R-ro-1.065R-it
ExtraInstall: |
mkdir -p %{buildroot}%{_datadir}/fonts/source-sans-pro
cp TTF/SourceSansPro-{Light,ExtraLight}.ttf %{buildroot}%{_datadir}/fonts/source-sans-pro/
cp LICENSE.txt %{buildroot}%{_datadir}/fonts/source-sans-pro/
mkdir -p %{buildroot}/opt/alien/system/fonts
cd TTF
rename It.ttf Italic.ttf SourceSansPro-*It.ttf
cp SourceSansPro-{Regular,Italic,{Bold,Light}{,Italic}}.ttf %{buildroot}/opt/alien/system/fonts
Files:
- "%{_datadir}/fonts/source-sans-pro"
SubPackages:
- Name: aliendalvik
Summary: Extra fonts for Alien Dalvik
Description: |
Source Sans Pro font for Alien Dalvik runtime (replaces fonts to make them look closer to native ones).
Group: System/X11/Fonts
AutoDepend: false
Files:
- "/opt/alien/system/fonts/*"
## Since the Spectacle doesn't support embedding install scripts, you'll have to add
## the following lines to your generated spec file:
#
# %post
# # >> post
# if ! fgrep -q 'Source Sans Pro' /etc/fonts/local.conf; then
# sed -i.orig -e '/<family>Sail Sans Pro Light<\/family>/ {N; s/\(<prefer>\)/\1\n <family>Source Sans Pro Light<\/family>/}' \
# -e '/<family>Sail Sans Pro ExtraLight<\/family>/ {N; s/\(<prefer>\)/\1\n <family>Source Sans Pro ExtraLight<\/family>/}' \
# /etc/fonts/local.conf
# fi
# # << post
#
# %preun aliendalvik
# # >> preun aliendalvik
# cd /opt/alien/system/fonts
# for variant in {Regular,Italic,{Bold,Light}{,Italic}}; do
# if [ -f Roboto-${variant}.ttf.backup ]; then
# mv -f Roboto-${variant}.ttf.backup Roboto-${variant}.ttf
# fi
# done
# # << preun aliendalvik
#
# %post aliendalvik
# # >> post aliendalvik
# cd /opt/alien/system/fonts
# for variant in {Regular,Italic,{Bold,Light}{,Italic}}; do
# mv Roboto-${variant}.ttf Roboto-${variant}.ttf.backup
# cp SourceSansPro-${variant}.ttf Roboto-${variant}.ttf
# done
# # << post aliendalvik
@gregguh
Copy link

gregguh commented Jan 19, 2016

Doesn't work with version 2.0.1.7 Taalojärvi :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment