summaryrefslogtreecommitdiff
path: root/Makefile.font
blob: 808fbdee73fb9cd2e0a6db2d82aad75e16d11d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# script to build Parabola Art Collections.
# Copyright (C) 2015  Márcio Alexandre Silva Delgado <coadde@parabola.nu>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

PREFIX ?= /usr
SHAREDIR ?= $(PREFIX)/share

# fonts list:
fnt = urwGothicDiamond-book \
      urwGothicDiamond-bookOblique \
      urwGothicDiamond-demi \
      urwGothicDiamond-demiOblique

# fonts group list:
fnt-grp = $(addprefix parabola_,$(fnt))

# SFD source list:
sfd = $(addsuffix _sfd3d0.sfd,$(fnt-grp))

# TTF source list:
ttf-1st = $(addsuffix _sfd3d0.ttf,$(fnt-grp))
ttf-2st = $(addsuffix _sfd3d0.ttf,$(fnt))
ttf-3st = $(addsuffix .ttf,$(fnt))

# SFD source files:
sfd-files = $(addprefix $(CURDIR)/,$(sfd))

# TTF source files:
ttf-1st-files = $(addprefix $(CURDIR)/,$(ttf-1st))
ttf-2st-files = $(addprefix $(CURDIR)/,$(ttf-2st))
ttf-3st-files = $(addprefix $(CURDIR)/,$(ttf-3st))

# TTF target files:
trg-dir = $(DESTDIR)$(SHAREDIR)/fonts/TTF
ttf-trg-files = $(addprefix $(trg-dir)/,$(ttf-3st))

all:
	$(CURDIR)/makefont.pe $(sfd-files)
	rename -v parabola_ '' $(ttf-1st-files)
	rename -v _sfd3d0.ttf .ttf $(ttf-2st-files)

clean:
	rm -v $(ttf-3st-files)

update-font-cache:
	fc-cache -s > /dev/null
	mkfontscale $(trg-dir)
	mkfontdir $(trg-dir)

install:
	install -vdm 755 $(trg-dir)
	install -vm 644 $(ttf-3st-files) $(trg-dir)

unistall:
	rm -v $(ttf-trg-files)