jobextra/retext/PKGBUILD-arch
2023-05-29 15:48:24 +03:00

62 lines
2.4 KiB
Text

# Maintainer: Jiachen Yang <farseerfc@gmail.com>
# AUR Maintainer: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor: Bartosz Chmura <chmurli@gmail.com>
# Contributor: Alessio Sergi <asergi at archlinux dot us>
# Contributor: alfplayer
# Contributor: menta
_pkgname=ReText
pkgname=retext
pkgver=8.0.0
pkgrel=2
pkgdesc="A simple editor for Markdown and ReStructuredText markup languages"
arch=('any')
url="https://github.com/retext-project/retext"
license=('GPL3')
# for desktop integration: 'shared-mime-info' 'xdg-utils' 'desktop-file-utils'
# for toolbar icons (see http://sourceforge.net/p/retext/tickets/44/): 'gconf'
depends=('python-pyqt6' 'python-markups>=2.0.0' 'shared-mime-info' 'xdg-utils' 'python-docutils'
'desktop-file-utils' 'hicolor-icon-theme' 'python-markdown' 'python-pygments' 'python-chardet')
makedepends=('imagemagick' 'qt5-tools' 'python-setuptools')
checkdepends=('xorg-server-xvfb' 'python-chardet' 'python-docutils')
optdepends=('python-pyqt6-webengine: for WebEngine preview'
'python-pyenchant: for spell checking support')
source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.asc}
"x-retext-rst.xml")
sha256sums=('f009a0841a42bc704d56b1d98b21a82fa7dab26bd73fb35d1d7cb6c16db02875'
'SKIP'
'6fef80cccb14813d9cc74810c397a6cd7831d1ca243536759a47c6e8b6cc977a')
validpgpkeys=('F24299FF1BBC9018B906A4CB6026936D2F1C8AE0') # Dmitry Shachnev <mitya57@debian.org>
build () {
cd "$srcdir/${_pkgname}-${pkgver}"
python3 setup.py build
}
check() {
cd "$srcdir/${_pkgname}-${pkgver}"
xvfb-run python3 setup.py test
}
package () {
cd "$srcdir/${_pkgname}-${pkgver}"
python3 setup.py install --root="$pkgdir" -O1
# create /usr/share/* dirs
_SHAREDIR="$pkgdir/usr/share"
install -d -m 755 "$_SHAREDIR"/{applications,mime/packages}
# install icons
_ICONSDIR="$_SHAREDIR/icons/hicolor"
for size in 16 22 24 32 48 128; do
install -d -m 755 "$_ICONSDIR"/${size}x${size}/apps
convert -resize $size +set date:create +set date:modify ReText/icons/$pkgname.png "$_ICONSDIR"/${size}x${size}/apps/$pkgname.png
done
install -d -m 755 $_ICONSDIR/scalable/apps
install -m 644 ReText/icons/$pkgname.svg "$_ICONSDIR"/scalable/apps/$pkgname.svg
# install mime files
install -m 644 "$srcdir"/x-retext-rst.xml "$_SHAREDIR"/mime/packages/
}
# vim:set ts=2 sw=2 et: