google-fonts

Google Fonts portage overlay
git clone https://git.parazyd.org/google-fonts
Log | Files | Refs | Submodules | README

Makefile (1841B)


      1 .POSIX:
      2 
      3 REPO = ./fonts
      4 
      5 APACHE_LICENSE = Apache-2.0
      6 APACHE_SHLICENSE = apache
      7 APACHE_FONTS = $(shell ./tools/getfonts $(REPO)/apache)
      8 
      9 OFL_LICENSE = OFL-1.1
     10 OFL_SHLICENSE = ofl
     11 OFL_FONTS = $(shell ./tools/getfonts $(REPO)/ofl)
     12 
     13 UFL_LICENSE = UbuntuFontLicense-1.0
     14 UFL_SHLICENSE = ufl
     15 UFL_FONTS = $(shell ./tools/getfonts $(REPO)/ufl)
     16 
     17 all: $(APACHE_FONTS) $(OFL_FONTS) $(UFL_FONTS)
     18 
     19 update:
     20 	cd $(REPO) && git pull origin main
     21 	git add fonts
     22 	git commit -m 'Update google-fonts submodule to latest revision.'
     23 
     24 $(APACHE_FONTS):
     25 	@mkdir -p $@
     26 	@cp metadata.skel $@/metadata.xml
     27 	@sed \
     28 		-e "s,@PRETTYNAME@,$(shell ./tools/prettyname $(REPO)/apache/$(shell basename $@) | tr '+' ' ')," \
     29 		-e "s,@PRETTYNAMEURL@,$(shell ./tools/prettyname $(REPO)/apache/$(shell basename $@))," \
     30 		-e "s,@LICENSE@,$(APACHE_LICENSE)," \
     31 		-e "s,@SHLICENSE@,$(APACHE_SHLICENSE)," \
     32 		-e "s,@FONT@,$(shell basename $@)," \
     33 		< ebuild.skel > $@/$(shell basename $@)-9999.ebuild
     34 
     35 $(OFL_FONTS):
     36 	@mkdir -p $@
     37 	@cp metadata.skel $@/metadata.xml
     38 	@sed \
     39 		-e "s,@PRETTYNAME@,$(shell ./tools/prettyname $(REPO)/ofl/$(shell basename $@) | tr '+' ' ')," \
     40 		-e "s,@PRETTYNAMEURL@,$(shell ./tools/prettyname $(REPO)/ofl/$(shell basename $@))," \
     41 		-e "s,@LICENSE@,$(OFL_LICENSE)," \
     42 		-e "s,@SHLICENSE@,$(OFL_SHLICENSE)," \
     43 		-e "s,@FONT@,$(shell basename $@)," \
     44 		< ebuild.skel > $@/$(shell basename $@)-9999.ebuild
     45 
     46 $(UFL_FONTS):
     47 	@mkdir -p $@
     48 	@cp metadata.skel $@/metadata.xml
     49 	@sed \
     50 		-e "s,@PRETTYNAME@,$(shell ./tools/prettyname $(REPO)/ufl/$(shell basename $@) | tr '+' ' ')," \
     51 		-e "s,@PRETTYNAMEURL@,$(shell ./tools/prettyname $(REPO)/ufl/$(shell basename $@))," \
     52 		-e "s,@LICENSE@,$(UFL_LICENSE)," \
     53 		-e "s,@SHLICENSE@,$(UFL_SHLICENSE)," \
     54 		-e "s,@FONT@,$(shell basename $@)," \
     55 		< ebuild.skel > $@/$(shell basename $@)-9999.ebuild
     56 
     57 .PHONY: all update