diff options
Diffstat (limited to 'pcr/retext')
-rw-r--r-- | pcr/retext/PKGBUILD | 57 | ||||
-rw-r--r-- | pcr/retext/retext.desktop | 9 | ||||
-rw-r--r-- | pcr/retext/retext.install | 15 | ||||
-rw-r--r-- | pcr/retext/x-retext-markdown.xml | 14 | ||||
-rw-r--r-- | pcr/retext/x-retext-rst.xml | 9 |
5 files changed, 104 insertions, 0 deletions
diff --git a/pcr/retext/PKGBUILD b/pcr/retext/PKGBUILD new file mode 100644 index 000000000..baf3e4207 --- /dev/null +++ b/pcr/retext/PKGBUILD @@ -0,0 +1,57 @@ +# 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.0.2 +_pkgverline=5.0 +pkgrel=2 +pkgdesc="A simple editor for Markdown and ReStructuredText markup languages" +arch=('any') +url="http://retext.sourceforge.net/" +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=("http://downloads.sourceforge.net/project/${pkgname}/ReText-${_pkgverline}/ReText-${pkgver}.tar.gz" + "${pkgname}.desktop" + "x-retext-markdown.xml" + "x-retext-rst.xml") +install="${pkgname}".install +sha256sums=('SKIP' + '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: diff --git a/pcr/retext/retext.desktop b/pcr/retext/retext.desktop new file mode 100644 index 000000000..1f48e7b4b --- /dev/null +++ b/pcr/retext/retext.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=ReText +Comment=Simple text editor for Markdown and ReStructuredText +Exec=retext %F +Icon=retext +Terminal=false +Type=Application +Categories=Office; +MimeType=text/x-retext-markdown;text/x-retext-rst; diff --git a/pcr/retext/retext.install b/pcr/retext/retext.install new file mode 100644 index 000000000..d783a77c8 --- /dev/null +++ b/pcr/retext/retext.install @@ -0,0 +1,15 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &>/dev/null + update-desktop-database -q + update-mime-database usr/share/mime &>/dev/null +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + post_install "$1" +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/retext/x-retext-markdown.xml b/pcr/retext/x-retext-markdown.xml new file mode 100644 index 000000000..f2dead22e --- /dev/null +++ b/pcr/retext/x-retext-markdown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="text/x-retext-markdown"> + <sub-class-of type="text/plain"/> + <comment>Markdown document</comment> + <glob pattern="*.md"/> + <glob pattern="*.mkd"/> + <glob pattern="*.mkdn"/> + <glob pattern="*.mdml"/> + <glob pattern="*.mdown"/> + <glob pattern="*.markdown"/> + <glob pattern="*.re"/> + </mime-type> +</mime-info> diff --git a/pcr/retext/x-retext-rst.xml b/pcr/retext/x-retext-rst.xml new file mode 100644 index 000000000..929c29bfe --- /dev/null +++ b/pcr/retext/x-retext-rst.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="text/x-retext-rst"> + <sub-class-of type="text/plain"/> + <comment>reStructuredText document</comment> + <glob pattern="*.rst"/> + <glob pattern="*.rest"/> + </mime-type> +</mime-info> |