aboutsummaryrefslogtreecommitdiffstats
path: root/community/texmf-dist/APKBUILD
blob: 2a23c0e0d8a490fd97d806928b117b3403a61552 (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
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
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=texmf-dist
_core=2017.46770
_bibtexextra=2017.46775
_fontsextra=2017.46787
_formatsextra=2017.45845
_games=2017.46791
_humanities=2017.46767
_langchinese=2017.46542
_langcyrillic=2017.45751
_langextra=2017.46741
_langgreek=2017.46662
_langjapanese=2017.46733
_langkorean=2017.44467
_latexextra=2017.46778
_music=2017.46141
_pictures=2017.46740
_pstricks=2017.46667
_publishers=2017.46790
_science=2017.46789
pkgver=${_core}
pkgrel=0
pkgdesc="TeX Live texmf core distribution"
url="http://tug.org/texlive/"
arch="noarch"
license="GPL"
depends=""
depends_dev=""
makedepends="unzip xz"
install=""
subpackages="
	${pkgname}-most
	${pkgname}-lang
	${pkgname}-full
	${pkgname}-bibtexextra
	${pkgname}-fontsextra
	${pkgname}-formatsextra
	${pkgname}-games
	${pkgname}-humanities
	${pkgname}-langchinese
	${pkgname}-langcyrillic
	${pkgname}-langextra
	${pkgname}-langgreek
	${pkgname}-langjapanese
	${pkgname}-langkorean
	${pkgname}-latexextra
	${pkgname}-music
	${pkgname}-pictures
	${pkgname}-pstricks
	${pkgname}-publishers
	${pkgname}-science
	"
source="
	https://sources.archlinux.org/other/texlive/texlive-core-${_core}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-bibtexextra-${_bibtexextra}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-fontsextra-${_fontsextra}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-formatsextra-${_formatsextra}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-games-${_games}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-humanities-${_humanities}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langchinese-${_langchinese}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langcyrillic-${_langcyrillic}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langextra-${_langextra}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langgreek-${_langgreek}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langjapanese-${_langjapanese}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-langkorean-${_langkorean}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-latexextra-${_latexextra}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-music-${_music}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-pictures-${_pictures}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-pstricks-${_pstricks}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-publishers-${_publishers}-src.zip
	https://sources.archlinux.org/other/texlive/texlive-science-${_science}-src.zip
	duplicates.txt
	"
options="!check"

unpack() {
	# Prevent unpacking by overwriting the unpack() function
	return 0
}

build(){
	return 0
}
	
package() {
	# Packages are packed in .tar.xz archives, which in turn are bundled into a
	# zip. We will unzip each bundle into pkgs-packed and untar all packages of
	# that bundle into pkgs-unpacked. Since some packages are expected to
	# be unpacked into /usr/share and others into /usr/shared/texmf-dist, this
	# will create a mess. We will later copy all folders beginning with texmf
	# into /usr/share, and merge every remaining file into
	# /usr/share/texmf-dist to clean up this mess.
	
	mkdir -p "${pkgdir}/usr/share/"
	mkdir -p "${srcdir}/pkgs-packed"
	mkdir -p "${srcdir}/pkgs-unpacked"
	cd "${srcdir}/pkgs-packed"
	unzip "${srcdir}/texlive-core-${_core}-src.zip" > /dev/null
	cd "${srcdir}/pkgs-unpacked"
	find "${srcdir}/pkgs-packed" -name '*.tar.xz' -exec tar -xf {} \;
	find . -maxdepth 1 -name 'texmf*' -exec mv {} "${pkgdir}/usr/share/" \;
	find . -type d -mindepth 1 -exec mkdir -p "${pkgdir}/usr/share/texmf-dist/"{} \;
	find . -type f -exec mv {} "${pkgdir}/usr/share/texmf-dist/"{} \;

	# Remove files already provided by texlive* packages
	cd "${pkgdir}/usr/share/texmf-dist"
	for file in $(cat "${srcdir}/duplicates.txt"); do
		rm -f $file
	done

	rm -rf "${srcdir}/pkgs-packed" "${srcdir}/pkgs-unpacked"
}

pack_subpkg() {
	local our_pkgver="$1"

	# See comment in package(), same applies here
	mkdir -p "${subpkgdir}/usr/share/"
	mkdir -p "${srcdir}/pkgs-packed"
	mkdir -p "${srcdir}/pkgs-unpacked"
	cd "${srcdir}/pkgs-packed"
	unzip "${srcdir}/texlive-${subpkgname#texmf-dist-}-${our_pkgver}-src.zip" > /dev/null
	cd "${srcdir}/pkgs-unpacked"
	find "${srcdir}/pkgs-packed" -name '*.tar.xz' -exec tar -xf {} \;
	find . -maxdepth 1 -name 'texmf*' -exec mv {} "${subpkgdir}/usr/share/" \;
	find . -type d -mindepth 1 -exec mkdir -p "${subpkgdir}/usr/share/texmf-dist/"{} \;
	find . -type f -exec mv {} "${subpkgdir}/usr/share/texmf-dist/"{} \;

	# Remove files already provided by texlive* packages
	cd "${subpkgdir}/usr/share/texmf-dist"
	for file in $(cat "${srcdir}/duplicates.txt"); do
		rm -f $file
	done

	rm -rf "${srcdir}/pkgs-packed" "${srcdir}/pkgs-unpacked"
}

most() {
	pkgdesc="TeX Live texmf distribution including most packages"
	depends="
		${pkgname}
		${pkgname}-bibtexextra
		${pkgname}-fontsextra
		${pkgname}-formatsextra
		${pkgname}-games
		${pkgname}-humanities
		${pkgname}-latexextra
		${pkgname}-music
		${pkgname}-pictures
		${pkgname}-pstricks
		${pkgname}-publishers
		${pkgname}-science
		"
	mkdir -p "${subpkgdir}"
}

lang() {
	pkgdesc="TeX Live texmf distribution: Additional languages"
	depends="
		${pkgname}
		${pkgname}-langchinese
		${pkgname}-langcyrillic
		${pkgname}-langextra
		${pkgname}-langgreek
		${pkgname}-langjapanese
		${pkgname}-langkorean
		"
	mkdir -p "${subpkgdir}"
}

full() {
	pkgdesc="Full TeX Live texmf distribution"
	depends="${pkgname}-most ${pkgname}-lang"
	mkdir -p "${subpkgdir}"
}

bibtexextra() {
	pkgdesc="TeX Live texmf distribution: Additional BibTeX styles and bibliography DBs"
	pack_subpkg "$_bibtexextra"
}

fontsextra() {
	pkgdesc="TeX Live texmf distribution: Additional fonts"
	pack_subpkg "$_fontsextra"
}

formatsextra() {
	pkgdesc="TeX Live texmf distribution: Additional TeX formats"
	pack_subpkg "$_formatsextra"
}

games() {
	pkgdesc="TeX Live texmf distribution: Typesetting board games including chess"
	pack_subpkg "$_games"
}

humanities() {
	pkgdesc="TeX Live texmf distribution: Packages for humanities, law, linguistics, ..."
	pack_subpkg "$_humanities"
}

langchinese() {
	pkgdesc="TeX Live texmf distribution: Support for Chinese"
	pack_subpkg "$_langchinese"
}

langcyrillic() {
	pkgdesc="TeX Live texmf distribution: Support for Cyrillic languages"
	pack_subpkg "$_langcyrillic"
}

langextra() {
	pkgdesc="TeX Live texmf distribution: Additional languages"
	pack_subpkg "$_langextra"
}

langgreek() {
	pkgdesc="TeX Live texmf distribution: Support for Greek"
	pack_subpkg "$_langgreek"
}

langjapanese() {
	pkgdesc="TeX Live texmf distribution: Support for Japanese"
	pack_subpkg "$_langjapanese"
}

langkorean() {
	pkgdesc="TeX Live texmf distribution: Support for Korean"
	pack_subpkg "$_langkorean"
}

latexextra() {
	pkgdesc="TeX Live texmf distribution: Add-onpackages for LaTeX"
	pack_subpkg "$_latexextra"
}

music() {
	pkgdesc="TeX Live texmf distribution: Music typesetting packages"
	pack_subpkg "$_music"
}

pictures() {
	pkgdesc="TeX Live texmf distribution: Packages for drawing graphics"
	pack_subpkg "$_pictures"
}

pstricks() {
	pkgdesc="TeX Live texmf distribution: Additional PSTricks packages"
	pack_subpkg "$_pstricks"
}

publishers() {
	pkgdesc="TeX Live texmf distribution: LaTeX packages for specific publishers"
	pack_subpkg "$_publishers"
}

science() {
	pkgdesc="TeX Live texmf distribution: Typesetting for math and sciences"
	pack_subpkg "$_science"
}

sha512sums="7826b0d0486d620971e2d84087e6688fb99ea3778dd90d099d7333de10986a7746683dc36d9ca0b93906807ca502315f6dcf2462f13ea498a761e029bec14e24  texlive-core-2017.46770-src.zip
f3886ef7e875b6e4a62ffe8afb34da31e02ceb8adbe67965a2a29f42fa92cac11baa81a89aa20e12bb1110c7dbf949dffdb4815e0b6da4cb97985648209598e2  texlive-bibtexextra-2017.46775-src.zip
266a943cf88d0948061a12cdfbf25ce44aa97425fe379dd17941e37e28e1040f642ff734f3be8ac29a6a76a7b6ce9c1da8f5fff0c6bd55c5ecc044c1a889e907  texlive-fontsextra-2017.46787-src.zip
adf2c5ad4bc131749349a69a8429cdfca7d44cc221b4c0ebceb38d59440183e7d888631fb2a7faa7f3ce806e65b9e4f433fbd289ec9fd0e7f4d0248c5f48930f  texlive-formatsextra-2017.45845-src.zip
87579c98c31e6dfae05b78330f72f6113f44704253f5c2e41855898e1b650ee08fdfc4dbace026f03ccfab7c262526e53158c65bae9e743c1d525f58eb8466da  texlive-games-2017.46791-src.zip
e7487b8b73d32ae5570d64bcbe8b07d6ab4d0822d35e4042864c9ccbaa36a56f6fb0d65facae3bf64b0f382c5c72ebb313e25918df11d3882af59de67d0d9d60  texlive-humanities-2017.46767-src.zip
fdce0505245ca77e5b04761c4dff41cdbab958c6a9cc4fa2bedaf33a7bf523ad9341ff91e1ba9e1e4925e76b618155685699f8ce1db3c3d1baaa7433456feb0c  texlive-langchinese-2017.46542-src.zip
e9a3f457769f5690bef1d09a435587914534fb8c0a7c2d72ae26e0421753ff1e1a6a5ea2b2767e9546cb092a268a19edf8d3f03b88bc0af1cbd871f12044b12e  texlive-langcyrillic-2017.45751-src.zip
47176f9686c65138c3d9aa31a0baff6dc10bb363150e951212d1b9ead2a79899c28897e83e854fe50f1925c9dd150116cc1ec82c462fa048efc9c6e982916592  texlive-langextra-2017.46741-src.zip
57fd9b8e0219fec0b88638fdb1cca89045c9cb6d66ae43dd687cb301e39c90d320d1bb0a7a64e90b3a04a1e67aea2e12dc5252227ec2555a59900be121e9d00e  texlive-langgreek-2017.46662-src.zip
c94c5922289d286df8c5800943d92c44dfae0f62c6ee76fe863e480ec734a40218dcabc5f000cbd77f65418da25e6a44d4907987d2cbcb5fd8888a3b1bc27c31  texlive-langjapanese-2017.46733-src.zip
cca9fba7cd3b0888949e0ed9799052be9c8957ff6784ea65f26306bce0c6812f15b94a919b3f2ecb197650a976bca2d41b52d74ddbfecdecfa4b61aed33516a0  texlive-langkorean-2017.44467-src.zip
34580ad4d7579c7a3d03e55446a23ef4e0c10df15e414b7e067b38cb0010cc46ccbe4421fb7076939f9c5f5c2933717fc2b016727180f1e38ae5ebfb6aa39dbf  texlive-latexextra-2017.46778-src.zip
5360a2a4057ce04775995224d76acd7204234707bfb66cdc4a1140e32e7907aaba0a09634223035658f70496f1b33f7528b29bcc198791ad3c4eb32d45e9b4fd  texlive-music-2017.46141-src.zip
755f47a3a0a734d79bd76495f3c6b0b76a3a2fb186742892ea1ad5689a467713e2fa7a22dff50850f13b332bc9ae43e8455dba3c8a82aa0198b8641788dd2fbc  texlive-pictures-2017.46740-src.zip
ee1e74c265b28356510408d4a3fbc002d1f0e63621c24ce3b3ec4ff83032efbaea49280bbd35d5d07ef4677619f4f411b8db6dcb4ffbbb189a0b323deccde5e3  texlive-pstricks-2017.46667-src.zip
3b401690741360aa73d2204563ad3e18034d586cfbe7bca8acca64e8519d5bcaacdcd974c94c827b7d8f1851cfa9fc58b6d70ece3d50dde2eb2c04aea7e30866  texlive-publishers-2017.46790-src.zip
5d620c6686bb4be1ba41bced1c19a6ed9f21a7b1f88c8d942c7619e867909aead7afd5aa2510c396d5ca3d9313211abecfd0fff83a25c170756dff201b423c94  texlive-science-2017.46789-src.zip
795df101ccb6708cb197df3785f033140bfe47ff041a375d469826e0d6217775a40e58e7c5a752229d40bb7b3fd36a297617137089752d24b7999d2d17d15339  duplicates.txt"