summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de3b12f6af5774ae6e63e64cdf0f6dbb94bcebc2 (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
# Maintainer: Filip Andersson <filip@artifact.se>
#
# NOTE: This package requires additional Python dependencies that are not available
# in the official Arch repositories. After installing this package, you must manually
# install the required dependencies using pip:
#
#   pip install py2neo
#
# Other dependencies may also be required. If you encounter import errors, install
# the missing packages with pip.


_name=mal-gui
pkgname='python-mal-gui'
pkgver=0.0.8
pkgrel=1
pkgdesc="A graphical user interface tool used to create MAL instance models."
arch=('any')
url=https://github.com/mal-lang/"${_name}"
license=('Apache-2.0')
depends=(
    'python>=3.10'
    'python-mal-toolbox'
    'python-numpy'
    'pyside6'
    'pyside6-tools'
    'shiboken6'
    'python-qt-material'
    'qt6-tools'
    'python-appdirs'
    'python-networkx'
)
makedepends=('python-build' 'python-installer' 'python-wheel' 'git')
optdepends=(
  'NOTE: Install manually with pip: py2neo (required for Neo4j integration)'
)
source=("${_name}-${pkgver}.tar.gz::https://github.com/mal-lang/${_name}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('e00bd0295aced1467e8c3685a8c892b177d0f0f2ce0d25b84f54451fbf54bc98')


prepare() {
    cd "${srcdir}/${_name}-${pkgver}"
}

build() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl
    
    # Install license if it exists
    if [ -f LICENSE ]; then
        install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    elif [ -f COPYING ]; then
        install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
    fi
    
    # Install documentation
    if [ -f README.md ]; then
        install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
    fi
}

check() {
    cd "${srcdir}/${_name}-${pkgver}"
}