From b5ba1388217fb7d5cace3e36da1be9de4202be0d Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Mon, 1 Jun 2015 10:48:59 -0500 Subject: retext: add new package to [pcr] --- pcr/retext/PKGBUILD | 57 ++++++++++++++++++++++++++++++++++++++++ pcr/retext/retext.desktop | 9 +++++++ pcr/retext/retext.install | 15 +++++++++++ pcr/retext/x-retext-markdown.xml | 14 ++++++++++ pcr/retext/x-retext-rst.xml | 9 +++++++ 5 files changed, 104 insertions(+) create mode 100644 pcr/retext/PKGBUILD create mode 100644 pcr/retext/retext.desktop create mode 100644 pcr/retext/retext.install create mode 100644 pcr/retext/x-retext-markdown.xml create mode 100644 pcr/retext/x-retext-rst.xml 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 +# Contributor (Arch): Alessio Sergi +# Contributor (Arch): alfplayer +# Contributor (Arch): menta +# Maintainer: Omar Vega Ramos + +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 @@ + + + + + Markdown document + + + + + + + + + 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 @@ + + + + + reStructuredText document + + + + -- cgit v1.2.3