debian swirl logo

Back to the packages list fonts-noto

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk

pkg = $(DEB_SOURCE_PACKAGE)

DEB_UPSTREAM_URL = https://noto.googlecode.com/files
DEB_UPSTREAM_TARBALL_MD5 = 9a8517a27cdbeb0dfb51559f0e2aa3ca

DEB_UPSTREAM_PACKAGE = NotoFonts-hinted
DEB_UPSTREAM_TARBALL_BASENAME = ${DEB_UPSTREAM_PACKAGE}-${DEB_UPSTREAM_VERSION}
DEB_UPSTREAM_TARBALL_EXTENSION = tgz

binary-fixup/$(pkg)::
		chmod -x debian/fonts-noto/usr/share/fonts/truetype/noto/*.ttf

# extract copyright information embedded in fonts, for copyright check
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(fonts/individual/hinted/.*\.ttf|debian/(changelog|copyright(|_hints|_newhints)))
debian/stamp-copyright-check: debian/stamp-fonts-copyright
debian/stamp-fonts-copyright:
		otfinfo -i fonts/individual/hinted/*.ttf | egrep '(Copyright|Licens)' \
			| perl -pe 's/^.*:\s+//' | sort -u \
			> fonts/individual/hinted/copyright.txt
		touch $@
clean::
		rm -f fonts/individual/hinted/copyright.txt
		rm -f debian/stamp-fonts-copyright

# resolve font facts and encode for control file (see deb-substvars(5) )
CDBS_BUILD_DEPENDS += , lcdf-typetools
substvars-list-encode = perl -0 -F/\\n/ -ane 'print " * ", join("\$${Newline} * ",@F)'
fonts-scriptcount := $(shell otfinfo -s fonts/individual/hinted/*.ttf | perl -pe 's/^.*\t+//' | sort -u | grep -c .)
fonts-familylist := $(shell otfinfo -a fonts/individual/hinted/*.ttf | cut -d: -f2 | sort -u | $(substvars-list-encode))
install/$(pkg)::
	echo 'fonts:scriptcount= $(fonts-scriptcount)' >> debian/$(cdbs_curpkg).substvars
	echo 'fonts:familylist= $(fonts-familylist)' >> debian/$(cdbs_curpkg).substvars

Builds:

fonts-noto
"no tofu" font families with large unicode coverage