summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2230eab67019f711bf2d76a670fd155973ed17b5 (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
pkgbase='novelwriter'
pkgname=('novelwriter')
_module='novelWriter'
pkgver='2.4'
pkgrel=1
pkgdesc="A markdown-like document editor for writing novels"
url="https://novelwriter.io"
depends=('python' 'python-pyenchant' 'python-lxml' 'python-pyqt5' 'python-pyqt5-webengine' 'qt5-svg' 'nuspell')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
license=('GPL')
arch=('any')
source=("https://github.com/vkbo/$_module/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('cf8afc0c7a81e7e63981791b702d8ad6e92af7ecc33cc4f6932fbdf3f0a24656')

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

package() {
    depends+=()
    cd "${srcdir}/${_module}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/$_module-$pkgver-py3-none-any.whl

    install -D setup/data/novelwriter.desktop -t "${pkgdir}"/usr/share/applications
    install -D setup/data/novelwriter.png -t "${pkgdir}"/usr/share/pixmaps
    install -D setup/data/x-novelwriter-project.xml -t "${pkgdir}"/usr/share/mime/packages
    mkdir -p "${pkgdir}"/usr/share/icons/"${pkgname}" && cp -r setup/data/hicolor/* "${pkgdir}"/usr/share/icons/"${pkgname}"

}