From 5219b986895394a0bfd0a8436ba502f4e3c6c70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Sun, 24 Nov 2013 17:00:06 +0100 Subject: [PATCH] A script to create Deb and RPM packages use fpm[1] to create either rpm or deb packages, based on the platform we're working on. This is overridable by the environment variable PKG. This pckage contains both TTF and OTF fonts, as well as the documentation. Currently the version needs to be bumped. It would be better if that was read from metadata. --- .gitignore | 2 ++ pkg.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 pkg.sh diff --git a/.gitignore b/.gitignore index 7a029f8..7d7bb33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.zip +*.deb +*.rpm *~ diff --git a/pkg.sh b/pkg.sh new file mode 100755 index 0000000..0ea8f3f --- /dev/null +++ b/pkg.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# choose package target based on Distro +case $( lsb_release -si ) in + Ubuntu|Debian) pkg=deb ;; + Fedora|RedHat|SLES) pkg=rpm ;; +esac +# But make it overridable from outside: +pkg=${PKG:-${pkg}} + +name='cosmic-sans-neue' +version='1.2.1' +desc='A font family with a great monospaced variant for programmers.' +url=http://openfontlibrary.org/en/font/cosmic-sans-neue-mono + +fpm -s dir -t ${pkg} -a all \ + -n ${name}-fonts \ + -v ${version} \ + --url ${url} \ + --description "${desc}" \ + --license OFL \ + CosmicSansNeueMono.ttf=/usr/share/fonts/truetype/${name}/ \ + CosmicSansNeueMonoBold.ttf=/usr/share/fonts/truetype/${name}/ \ + OTF/CosmicSansNeueMono.otf=/usr/share/fonts/opentype/${name}/ \ + OTF/CosmicSansNeueMonoBold.otf=/usr/share/fonts/opentype/${name}/ \ + OFL.txt=/usr/share/doc/${name}/copyright \ + README.md=/usr/share/doc/${name}/ \ + Specimen=/usr/share/doc/${name}/