Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
slapos
Commits
e6e5aa05
Commit
e6e5aa05
authored
Mar 05, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/fonts: make fonts shareable
parent
bc3e83da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
12 deletions
+50
-12
component/fonts/buildout.cfg
component/fonts/buildout.cfg
+34
-12
component/fonts/buildout.hash.cfg
component/fonts/buildout.hash.cfg
+7
-0
component/fonts/empty.zip
component/fonts/empty.zip
+0
-0
component/fonts/fonts-copy-fonts.py
component/fonts/fonts-copy-fonts.py
+9
-0
No files found.
component/fonts/buildout.cfg
View file @
e6e5aa05
...
...
@@ -2,23 +2,45 @@
extends =
../xz-utils/buildout.cfg
../p7zip/buildout.cfg
buildout.hash.cfg
parts =
liberation-fonts
ipaex-fonts
ipa-fonts
ocrb-fonts
android-fonts
dejavu-fonts
fonts
[fonts]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
# Parts to install all fonts, in a way compatible with slapos.recipe.cmmi
# shared option.
# This can be configured in softwares, by setting the list of parts
# containing fonts as ${fonts:fonts}
fonts =
liberation-fonts ${liberation-fonts:location}
ipaex-fonts ${ipaex-fonts:location}
ipa-fonts ${ipa-fonts:location}
ocrb-fonts ${ocrb-fonts:location}
android-fonts ${android-fonts:location}
dejavu-fonts ${dejavu-fonts:location}
recipe = slapos.recipe.cmmi
shared = true
# XXX we need an URL so that recipe create directories.
url = ${:_profile_base_location_}/${empty.zip:filename}
md5sum = ${empty.zip:md5sum}
configure-command =:
make-binary = :
post-make-hook = ${:_profile_base_location_}/${fonts-copy-fonts:filename}#${fonts-copy-fonts:md5sum}:post_make_hook
[fonts-base]
destination = ${fonts:location}/${:_buildout_section_name_}
location = ${:destination}
recipe = slapos.recipe.build:download-unpacked
strip-top-level-dir = true
# download and unpack, with shared parts support
recipe = slapos.recipe.cmmi
shared = true
configure-command = :
make-binary = :
post-install = cp -ra . ${:location}
location = @@LOCATION@@
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
# Liberation(tm) Fonts - a font family which aims at metric
# compatibility with Arial, Times New Roman, and Courier New.
...
...
@@ -61,7 +83,7 @@ md5sum = d0efec10b9f110a32e9b8f796e21782c
# Microsoft's TrueType core fonts
# non-free so not enabled by default
[msttcore-fonts]
location = ${
fonts:location
}/${:_buildout_section_name_}
location = ${
buildout:parts-directory
}/${:_buildout_section_name_}
recipe = slapos.recipe.build
script =
from zc.buildout.download import Download
...
...
component/fonts/buildout.hash.cfg
0 → 100644
View file @
e6e5aa05
[fonts-copy-fonts]
filename = fonts-copy-fonts.py
md5sum = c2fbe8f195d65aee9e1daa49544e2f68
[empty.zip]
filename = empty.zip
md5sum = 76cdb2bad9582d23c1f6f4d868218d6c
\ No newline at end of file
component/fonts/empty.zip
0 → 100644
View file @
e6e5aa05
File added
component/fonts/fonts-copy-fonts.py
0 → 100644
View file @
e6e5aa05
import
os
import
textwrap
import
glob
import
shutil
def
post_make_hook
(
options
,
buildout
,
environment
=
None
):
prefix
=
options
[
'prefix'
]
for
name
,
location
in
(
line
.
split
()
for
line
in
options
[
'fonts'
].
splitlines
()):
shutil
.
copytree
(
location
,
os
.
path
.
join
(
prefix
,
name
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment