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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
# Maintainer: dreieck
_pkgbase='jena1330-fonts'
_vcssuffix='-git'
pkgbase="${_pkgbase}${_vcssuffix}"
pkgname=(
"jena1330-fonts-license"
"jena1330-fonts-docs${_vcssuffix}"
"jena1330-latex-font${_vcssuffix}"
"jena1330-latex-font-example${_vcssuffix}"
"otf-jena1330${_vcssuffix}"
"ttf-jena1330${_vcssuffix}"
"t1-jena1330${_vcssuffix}"
"woff-jena1330${_vcssuffix}"
"woff2-jena1330${_vcssuffix}"
)
pkgver=r105.20160920.75d5b9e
pkgrel=10
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". LaTeX, OTF, TTF, Postscript Type 1, WOFF and WOFF2 fonts, latest Git checkout.'
arch=(
'any'
)
url='http://www.linta.de/Jena1330/'
license=('OFL')
depends=()
makedepends=(
'git'
'fontforge'
'html2md'
'perl'
'python'
'python-html2text'
'texlive-bin'
'texlive-core'
)
optdepends=()
source=(
"${_pkgbase}::git+https://github.com/Anaphory/Jena1330.git"
"website.html::${url}"
'LICENSE.OFL1.1.txt'
)
sha256sums=(
'SKIP'
'SKIP'
'c9c5ffaa19f9427e2bf9ae8be6da4afb98dde3e0be07c8470410addf7afcd54d'
)
prepare() {
msg2 "Generating 'website.url' information file ..."
printf '%s\n' "${url}" > "${srcdir}/website.url"
cd "${srcdir}/${_pkgbase}"
msg2 "Generating GIT log 'git.log' information file ..."
git log > "${srcdir}/git.log"
}
pkgver() {
cd "${srcdir}/${_pkgbase}"
_rev="$(git rev-list --count HEAD)"
_date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
_hash="$(git rev-parse --short HEAD)"
if [ -z "${_rev}" ]; then
error "Commit count could not be determined."
return 1
else
printf '%s' "r${_rev}.${_date}.${_hash}"
fi
}
build() {
cd "${srcdir}"
msg2 "Converting 'website.html' to text/plain format ..."
html2text --no-wrap-links --body-width 0 --mark-code --reference-links --links-after-para --unicode-snob website.html > website.txt
msg2 "Converting 'website.html' to Markdown format ..."
html2md -i website.html > website.md
cd "${srcdir}/${_pkgbase}"
# Build LaTeX stuff:
msg2 "Building LaTeX font files ..."
./BuildAndInstall
# Build OTF font:
msg2 "Building OTF font file ..."
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.otf", "", 0x410201)'
# Build TTF font:
msg2 "Building TTF font file ..."
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.ttf", "", 0x410201)'
# Build additional Type 1 data:
msg2 "Building not-yet-build Postscript Type 1 font file ..."
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.pfa", "", 0x410201)'
# Build WOFF font:
msg2 "Building WOFF font file ..."
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.woff", "", 0x410201)'
# Build WOFF2 font:
msg2 "Building WOFF2 font file ..."
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.woff2", "", 0x410201)'
}
### License:
package_jena1330-fonts-license() {
pkgdesc='Common license file for the "jena1330-latex-font" and "*-jena1330" font packages.'
optdepends=(
"jena1330-latex-font: For a 'Jena1330' LaTeX font."
"otf-jena1330: For a 'Jena1330' OTF font."
"ttf-jena1330: For a 'Jena1330' TTF font."
"t1-jena1330: For a 'Jena1330' Postscript Type 1 font."
"woff-jena1330: For a 'Jena1330' WOFF font."
"woff2-jena1330: For a 'Jena1330' WOFF2 font."
)
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "${srcdir}/LICENSE.OFL1.1.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### General docs:
package_jena1330-fonts-docs-git () {
pkgdesc='General documentation for the "jena1330-latex-font" and "*-jena1330" font packages. Latest Git checkout & latest upstream website fetch.'
depends=("jena1330-fonts-license")
optdepends=(
"jena1330-latex-font-example: For a LaTeX specific example."
"jena1330-latex-font: For a 'Jena1330' LaTeX font."
"otf-jena1330: For a 'Jena1330' OTF font."
"ttf-jena1330: For a 'Jena1330' TTF font."
"t1-jena1330: For a 'Jena1330' Postscript Type 1 font."
"woff-jena1330: For a 'Jena1330' WOFF font."
"woff2-jena1330: For a 'Jena1330' WOFF2 font."
)
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "${srcdir}/website.html" "${pkgdir}/usr/share/doc/${_pkgbase}/website.html"
install -D -m644 -v "${srcdir}/website.txt" "${pkgdir}/usr/share/doc/${_pkgbase}/website.txt"
install -D -m644 -v "${srcdir}/website.md" "${pkgdir}/usr/share/doc/${_pkgbase}/website.md"
install -D -m644 -v "${srcdir}/website.url" "${pkgdir}/usr/share/doc/${_pkgbase}/website.url"
install -D -m644 -v "${srcdir}/git.log" "${pkgdir}/usr/share/doc/${_pkgbase}/git.log"
install -D -m644 -v 'README' "${pkgdir}/usr/share/doc/${_pkgbase}/README"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/doc/${_pkgbase}/LICENSE.txt"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### LaTeX:
package_jena1330-latex-font-git() {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". LaTeX font, latest Git checkout.'
depends=(
"jena1330-fonts-license"
"t1-jena1330${_vcssuffix}=${pkgver}"
)
optdepends=(
'jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.'
"jena1330-latex-font-example: For an example LaTeX document using the font."
)
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.tfm" "${pkgdir}/usr/share/texmf-dist/fonts/tfm/public/jena1330/Jena1330.tfm"
install -D -m644 -v "work/jena1330.sty" "${pkgdir}/usr/share/texmf/tex/latex/jena1330/jena1330.sty"
## Provided by t1-jena1330 -- create directories and then symlink the files:
install -d -m755 -v "${pkgdir}/usr/share/texmf-dist/fonts/afm/public/jena1330"
install -d -m755 -v "${pkgdir}/usr/share/texmf-dist/fonts/type1/public/jena1330"
ln -sv "/usr/share/fonts/Type1/Jena1330.afm" "${pkgdir}/usr/share/texmf-dist/fonts/afm/public/jena1330/Jena1330.afm"
ln -sv "/usr/share/fonts/Type1/Jena1330.pfb" "${pkgdir}/usr/share/texmf-dist/fonts/type1/public/jena1330/Jena1330.pfb"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### LaTeX example:
package_jena1330-latex-font-example-git() {
pkgdesc='LaTeX example document using the "Jena1330" LaTeX font. Latest Git checkout.'
depends=(
"jena1330-fonts-license"
"jena1330-latex-font"
)
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v 'work/BottomLeft.jpg' "${pkgdir}/usr/share/doc/${_pkgbase}/latex/example/src/BottomLeft.jpg"
install -D -m644 -v 'work/TopRight.jpg' "${pkgdir}/usr/share/doc/${_pkgbase}/latex/example/src/TopRight.jpg"
install -D -m644 -v 'work/VrowenlopAlexander' "${pkgdir}/usr/share/doc/${_pkgbase}/latex/example/src/VrowenlopAlexander"
install -D -m644 -v 'work/jena.tex' "${pkgdir}/usr/share/doc/${_pkgbase}/latex/example/src/jena.tex"
install -D -m644 -v 'work/jena.pdf' "${pkgdir}/usr/share/doc/${_pkgbase}/latex/example/jena.pdf"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### OTF:
package_otf-jena1330-git () {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". OTF font, latest Git checkout.'
depends=("jena1330-fonts-license")
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.otf" "${pkgdir}/usr/share/fonts/OTF/Jena1330.otf"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### TTF:
package_ttf-jena1330-git () {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". TTF font, latest Git checkout.'
depends=("jena1330-fonts-license")
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.ttf" "${pkgdir}/usr/share/fonts/TTF/Jena1330.ttf"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### Postscript Type 1:
package_t1-jena1330-git () {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". Postscript Type 1 font, latest Git checkout.'
depends=("jena1330-fonts-license")
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.afm" "${pkgdir}/usr/share/fonts/Type1/Jena1330.afm"
install -D -m644 -v "work/Jena1330.pfa" "${pkgdir}/usr/share/fonts/Type1/Jena1330.pfa"
install -D -m644 -v "work/Jena1330.pfb" "${pkgdir}/usr/share/fonts/Type1/Jena1330.pfb"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### WOFF:
package_woff-jena1330-git () {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". WOFF font, latest Git checkout.'
depends=("jena1330-fonts-license")
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.woff" "${pkgdir}/usr/share/fonts/WOFF/Jena1330.woff"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
### WOFF2:
package_woff2-jena1330-git () {
pkgdesc='A medieval textura as used by the main writer of the "Jenaer Liederhandschrift". WOFF2 font, latest Git checkout.'
depends=("jena1330-fonts-license")
optdepends=('jena1330-fonts-docs: For the general documentation of the "Jena1330"-font.')
provides=("${pkgname%"${_vcssuffix}"}")
conflicts=("${pkgname%"${_vcssuffix}"}")
cd "${srcdir}/${_pkgbase}"
install -D -m644 -v "work/Jena1330.woff2" "${pkgdir}/usr/share/fonts/WOFF2/Jena1330.woff2"
## Symlink license
install -d -m755 -v "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sv "/usr/share/licenses/jena1330-fonts-license/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
|