summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c2c27492e8d9e6d8918900f116e8a5b272893e6 (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
# Maintainer: Claudia Pellegrino <aur@cpellegrino.de>

pkgname=embrilliance
#https://www.embrilliance.com/emb_downloads/1175/Embrilliance11754Setup.zip
pkgver=1.17.5.4
_pkgver_minor="$(cut -d . -f -3 <<< "${pkgver}")"
pkgrel=1
pkgdesc='Render, convert and digitize embroidery designs. Windows version.'
arch=('x86_64')
url='https://embrilliance.com/downloads'
license=('unknown')
depends=('wine' 'wine-mono' 'wine-gecko')
makedepends=('icoutils' 'innoextract' 'unzip')
options=('!strip')
install="${pkgname}.install"

source=(
  "https://www.embrilliance.com/emb_downloads/${_pkgver_minor//./}/Embrilliance${pkgver//./}Setup.zip"
  "${pkgname}.bash"
  "${pkgname}.desktop"
  'LICENSE'
)

sha512sums=(
  '3bad18c0b809b5c360c3b72d4e266964425c1df35d2257700bceaa914149fb1a1dd19908055c75cc2ef326bf3dc927c192af03514aca4b86305b2ecedf4413a1'
  'SKIP'
  'SKIP'
  'SKIP'
)

noextract=("Embrilliance${pkgver//./}Setup.zip")

prepare() {
  mkdir -p "${srcdir}/${pkgname}-setup"
  cd "${srcdir}/${pkgname}-setup"

  echo >&2 'Decompressing installer'
  unzip -u "${srcdir}/Embrilliance${pkgver//./}Setup.zip"

  echo >&2 'Extracting files from installer'
  innoextract -s --exclude-temp --color=0 --progress=0 \
    "Embrilliance${pkgver//./}Setup.exe"
}

package() {
    echo >&2 'Packaging license'
    install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
      "${srcdir}/LICENSE"

    echo >&2 'Packaging app icon'
    mkdir -p "${pkgdir}/usr/share/pixmaps"
    wrestool -x -n 100 -t 14 \
      -o "${pkgdir}/usr/share/pixmaps/${pkgname}.ico" \
      "${srcdir}/${pkgname}-setup/app/Embroidery.exe"

    echo >&2 'Packaging user documents'
    mkdir -p "${pkgdir}/usr/share"
    mv "${pkgname}-setup/app/Motifs/Embrilliance" \
      "${pkgdir}/usr/share/${pkgname}"

    echo >&2 'Packaging app resources'
    mkdir -p "${pkgdir}/opt/"
    mv "${pkgname}-setup/app" "${pkgdir}/opt/${pkgname}"

    echo >&2 'Packaging app launcher'
    install -D -m 755 -T \
        "${srcdir}/${pkgname}.bash" \
        "${pkgdir}/usr/bin/${pkgname}"

    echo >&2 'Packaging desktop file'
    install -D -m 755 -T \
        "${srcdir}/${pkgname}.desktop" \
        "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}