summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ec90cdd0c9326d8c5aa2d38b612121322ebc35c (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
# Maintainer: bemxio <bemxiov@protonmail.com>

pkgname="anituner"
pkgdesc="Create, edit and convert Windows animated cursors"

pkgver=2.0.0
pkgrel=6

arch=(i686 x86_64)

url="https://www.gdgsoft.com/anituner"
license=("freeware")

depends=(wine)
makedepends=(unzip gendesk icoutils)

provides=(anituner)

source=("https://download.gdgsoft.com/anitun2p.zip" "anituner" "anituner-atd.xml" "LICENSE")
md5sums=("f0cff36790da5e3f9b02a65aa4d64101" "be9cfcd1a8c5f57cfae60e6739e0fceb" "2c084aaadfb308a757c12ca19c012f9f" "2c89a8cdf5a8ef238b07897d28c419a1")

prepare() {
	# extract the icon out of the executable
	wrestool -x -n MAINICON AniTuner.exe -o AniTuner.ico

	# get the highest quality PNG from the icon file
	icotool -x AniTuner.ico -i 6 --output AniTuner.png

	# generate a .desktop file
	gendesk -f -n \
		--pkgname AniTuner \
		--pkgdesc "${pkgdesc}" \
		--exec anituner \
		--icon AniTuner.png \
		--categories "Graphics;Utility" \
		--mimetypes "image/bmp;image/jpeg;image/png;image/gif;image/vnd.adobe.photoshop;image/x-icon;image/x-win-bitmap;application/x-navi-animation;application/anituner-atd"
}

package() {
	# make a directory for the AniTuner samples
	mkdir -p "${pkgdir}/usr/share/anituner/Samples"

	# copy all of AniTuner's files
	install -Dm755 AniTuner.exe "${pkgdir}/usr/share/anituner/AniTuner.exe"
	install -Dm644 AniTunerPref.xml "${pkgdir}/usr/share/anituner/AniTunerPrefDefault.xml"

	install -Dm644 AniTuner.chm "${pkgdir}/usr/share/anituner/AniTuner.chm"
	install -Dm644 Readme.txt "${pkgdir}/usr/share/anituner/Readme.txt"

	install -Dm644 Samples/* "${pkgdir}/usr/share/anituner/Samples"

	# copy the executable script
	install -Dm755 anituner "${pkgdir}/usr/bin/anituner"

	# copy the extracted icon and the generated .desktop file
	install -Dm644 AniTuner.png "${pkgdir}/usr/share/pixmaps/AniTuner.png"
	install -Dm644 AniTuner.desktop "${pkgdir}/usr/share/applications/AniTuner.desktop"

	# copy the custom MIME type
	install -Dm644 anituner-atd.xml "${pkgdir}/usr/share/mime/packages/anituner-atd.xml"

	# copy the license file
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}