summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 322414349e3be9d9ff650839b7736f227220e607 (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
# Maintainer: MLM-stuff gfxoxinzh@mozmail.com
pkgname=inkscape-bin
pkgver=1.4.3
pkgrel=1
pkgdesc="Professional vector graphics editor - Prebuilt AppImage"
arch=('x86_64')
url="https://inkscape.org"
license=('GPL-2.0-or-later')
depends=('fuse2' 'hicolor-icon-theme')
optdepends=('python: for extensions'
            'python-numpy: for some extensions'
            'python-lxml: for some extensions'
            'fig2dev: xfig import'
            'gvfs: file system support'
            'pstoedit: PostScript support')
provides=('inkscape')
conflicts=('inkscape')
options=('!strip')
source=("inkscape-${pkgver}.AppImage::https://inkscape.org/gallery/item/58919/Inkscape-0d15f75-x86_64.AppImage"
        "inkscape.desktop")
sha256sums=('cb65ccb4bb070d9b8a61483e5cbfd0340c1e10c048db4a677053caad14be5e69'
            'SKIP')
noextract=("inkscape-${pkgver}.AppImage")

prepare() {
    chmod +x "inkscape-${pkgver}.AppImage"
    ./inkscape-${pkgver}.AppImage --appimage-extract >/dev/null 2>&1 || true
}

package() {
    install -Dm755 "inkscape-${pkgver}.AppImage" "$pkgdir/opt/inkscape/inkscape.AppImage"
    
    install -dm755 "$pkgdir/usr/bin"
    cat > "$pkgdir/usr/bin/inkscape" << 'WRAPPER'
#!/bin/bash
exec /opt/inkscape/inkscape.AppImage "$@"
WRAPPER
    chmod 755 "$pkgdir/usr/bin/inkscape"
    
    install -Dm644 "$srcdir/inkscape.desktop" "$pkgdir/usr/share/applications/org.inkscape.Inkscape.desktop"
    
    if [[ -d "$srcdir/squashfs-root/usr/share/icons" ]]; then
        install -dm755 "$pkgdir/usr/share/icons/hicolor"
        cp -r "$srcdir/squashfs-root/usr/share/icons/hicolor"/* "$pkgdir/usr/share/icons/hicolor/"
    fi
    
    if [[ -f "$srcdir/squashfs-root/org.inkscape.Inkscape.svg" ]]; then
        install -Dm644 "$srcdir/squashfs-root/org.inkscape.Inkscape.svg" \
            "$pkgdir/usr/share/icons/hicolor/scalable/apps/org.inkscape.Inkscape.svg"
    fi
}