summaryrefslogtreecommitdiff
path: root/pcr/retext/PKGBUILD
blob: 688953f88feeebb88eb761c7bdeeb020a8b3dc71 (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
# Maintainer (Arch): Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor (Arch): Bartosz Chmura <chmurli@gmail.com>
# Contributor (Arch): Alessio Sergi <asergi at archlinux dot us>
# Contributor (Arch): alfplayer
# Contributor (Arch): menta
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=retext
pkgver=5.2.0
pkgrel=1.1
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-pyqt5' 'qt5-webkit' 'python-markups' 'shared-mime-info' 'xdg-utils' 'desktop-file-utils' 'gconf')
makedepends=('imagemagick')
optdepends=('python-markdown: for Markdown language support'
            'python-docutils: for reStructuredText language support'
            'python-pyenchant: for spell checking support')
source=("https://github.com/retext-project/${pkgname}/archive/${pkgver}.tar.gz"
        "${pkgname}.desktop"
        "x-retext-markdown.xml"
        "x-retext-rst.xml")
install="${pkgname}".install
sha256sums=('b42c027205d1c5c3d322892b400663f858ac7d3e9953027411c8c11cf51ca362'
            '7782f4402fe62e48335c1bdd5c1fd5cbb48c408fabaf4f018a074f8b3eef838e'
            'b51611479d3224eec2b58264ed91ace3eccb502b7b806dae3e7a3ab4aab8c4b8'
            '6fef80cccb14813d9cc74810c397a6cd7831d1ca243536759a47c6e8b6cc977a')


package () {
    cd "$srcdir/retext-${pkgver}"
    python3 setup.py install --root="$pkgdir"

    # 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 icons/$pkgname.png $_ICONSDIR/${size}x${size}/apps/$pkgname.png
    done
    install -d -m 755 $_ICONSDIR/scalable/apps
    install -m 644 icons/$pkgname.svg $_ICONSDIR/scalable/apps/$pkgname.svg

    # install mime files
    install -m 644 $srcdir/x-retext-{markdown,rst}.xml $_SHAREDIR/mime/packages/

    # install desktop file
    install -m 644 $srcdir/$pkgname.desktop $_SHAREDIR/applications/$pkgname.desktop
}

# vim:set ts=2 sw=2 et: