Merge pull request #2140 from thypon/uberwriter

New package: uberwriter (and his dependencies)
This commit is contained in:
Andrea Brancaleoni 2015-07-31 19:46:38 +02:00
commit 46f53e279c
5 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# Template file for 'python-enchant'
pkgname=python-enchant
version=1.6.6
revision=1
_name=pyenchant
wrksrc=$_name-$version
noarch=yes
build_style=python-module
pycompile_module=enchant
hostmakedepends="python-setuptools enchant-devel"
makedepends="enchant-devel"
depends="enchant"
short_desc="Spellchecking library for python"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-3"
homepage="https://github.com/rfk/pyenchant"
distfiles="$PYPI_SITE/p/$_name/${_name}-${version}.tar.gz"
checksum=25c9d2667d512f8fc4410465fdd2e868377ca07eb3d56e2b6e534a86281d64d3

View file

@ -0,0 +1,22 @@
# Template file for 'ttf-ubuntu-font-family'
pkgname=ttf-ubuntu-font-family
version=0.80
revision=1
wrksrc=ubuntu-font-family-$version
noarch=yes
hostmakedepends="unzip"
depends="font-util"
font_dirs="/usr/share/fonts/TTF"
short_desc="Ubuntu font family"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="custom"
homepage="http://font.ubuntu.com/"
distfiles="http://font.ubuntu.com/download/ubuntu-font-family-$version.zip"
checksum=107170099bbc3beae8602b97a5c423525d363106c3c24f787d43e09811298e4c
do_install() {
vmkdir usr/share/fonts/TTF
install -m644 Ubuntu-{L,R,B,C}*.ttf ${DESTDIR}/usr/share/fonts/TTF
install -m644 UbuntuMono-*.ttf ${DESTDIR}/usr/share/fonts/TTF
vlicense LICENCE.txt
}

View file

@ -0,0 +1,37 @@
diff -up uberwriter_bugfixes/setup.py.orig uberwriter_bugfixes/setup.py
--- uberwriter_bugfixes/setup.py.orig 2012-12-10 23:22:28.168386230 -0600
+++ uberwriter_bugfixes/setup.py 2012-12-10 23:24:50.598256044 -0600
@@ -159,7 +159,4 @@ DistUtilsExtra.auto.setup(
"uberwriter_lib",
"uberwriter"
],
- package_data={
- 'pylocales' : ['locales.db']
- }
)
\ No newline at end of file
diff -up uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py
--- uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig 2012-12-10 23:25:11.512379118 -0600
+++ uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py 2012-12-10 23:26:03.519678793 -0600
@@ -38,20 +38,8 @@ __all__ = ['Country', 'Language', 'Langu
_translator_language = gettext.translation('iso_639', fallback=True).gettext
_translator_country = gettext.translation('iso_3166', fallback=True).gettext
-# Decides where the database is located. If an application provides an
-# os.path.get_module_path monkey patch to determine the path where the module
-# is located it uses this. If not it searches in the directory of this source
-# code file.
-__path__ = None
-if hasattr(os.path, 'get_module_path'):
- __path__ = os.path.get_module_path(__file__)
- if not os.path.isfile(os.path.join(__path__, 'locales.db')):
- __path__ = None
-if __path__ is None:
- __path__ = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
-
# Loading the Database
-_database = sqlite3.connect(os.path.join(__path__, 'locales.db'))
+_database = sqlite3.connect('/usr/share/uberwriter/locales.db')
logger = logging.getLogger(__name__)

View file

@ -0,0 +1,48 @@
diff -up uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig uberwriter_bugfixes/uberwriter/UberwriterWindow.py
--- uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig 2012-12-10 13:24:22.947869013 -0600
+++ uberwriter_bugfixes/uberwriter/UberwriterWindow.py 2012-12-10 13:24:38.839927266 -0600
@@ -19,7 +19,6 @@ import subprocess
import os
import codecs
import webbrowser
-import apt
import urllib
from locale import gettext as _
@@ -528,25 +527,6 @@ class UberwriterWindow(Window):
self.export("html")
def export_as_pdf(self, widget, data=None):
- if self.texlive_installed == False:
- try:
- cache = apt.Cache()
- inst = cache["texlive"].is_installed
- except:
- inst = True
-
- if inst == False:
- dialog = Gtk.MessageDialog(self,
- Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
- Gtk.MessageType.INFO,
- None,
- _("You can not export to PDF.")
- )
- dialog.format_secondary_markup(_("Please install <a href=\"apt:texlive\">texlive</a> from the software center."))
- response = dialog.run()
- return
- else:
- self.texlive_installed = True
self.export("pdf")
def copy_html_to_clipboard(self, widget, date=None):
@@ -851,10 +831,6 @@ class UberwriterWindow(Window):
self.UberwriterAdvancedExportDialog = UberwriterAdvancedExportDialog
# Code for other initialization actions should be added here.
-
- # Texlive checker
-
- self.texlive_installed = False
# Draw background
self.background_image = helpers.get_media_path('bg_light.png')

View file

@ -0,0 +1,22 @@
# Template file for 'uberwriter'
pkgname=uberwriter
version=12.11.02
revision=1
_subversion=public1-beta
wrksrc=uberwriter_bugfixes
build_style=python-module
pycompile_module=$pkgname
noarch=yes
patch_args='-p1'
hostmakedepends="python-distutils-extra intltool"
depends="python-enchant python-gobject python-enchant pandoc ttf-ubuntu-font-family"
short_desc="The simplest writing application"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-3"
homepage="http://uberwriter.wolfvollprecht.de"
distfiles="https://launchpad.net/$pkgname/trunk/${version%.*}/+download/${pkgname}_${version}-${_subversion}.tar.gz"
checksum=1cfedcac0c76200cf2d1de2c34574646d9fb5100e48a8c99994aef1906a0f598
post_install() {
vinstall uberwriter_lib/pylocales/locales.db 644 usr/share/uberwriter
}