[packages/presage] - new, NFY, saving work
qboosh
qboosh at pld-linux.org
Sat Apr 7 09:29:34 CEST 2018
commit a602ed6ff6a9bcdd0aebae67abfaf4627467c925
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Apr 7 09:29:30 2018 +0200
- new, NFY, saving work
presage-configure.patch | 72 +++++++++++++++
presage-link.patch | 23 +++++
presage.spec | 228 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 323 insertions(+)
---
diff --git a/presage.spec b/presage.spec
new file mode 100644
index 0000000..eaa9454
--- /dev/null
+++ b/presage.spec
@@ -0,0 +1,228 @@
+#
+# Conditional build:
+%bcond_without apidocs # do not build and package API docs
+%bcond_without ngram # ARPA ngram language model
+%bcond_without static_libs # don't build static libraries
+#
+Summary: Presage - the intelligent predictive text entry system
+Summary(pl.UTF-8): Presage - inteligentny, przewidujący system wprowadzania tekstu
+Name: presage
+Version: 0.9.1
+Release: 0.1
+License: GPL v2+
+Group: Libraries
+Source0: http://downloads.sourceforge.net/presage/%{name}-%{version}.tar.gz
+# Source0-md5: 9667be297912fa0d432e748526d8dd9e
+Patch0: %{name}-link.patch
+Patch1: %{name}-configure.patch
+URL: http://presage.sourceforge.net/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake >= 1:1.9
+%{?with_ngram:BuildRequires: cmuclmtk}
+BuildRequires: cppunit-devel >= 1.9.6
+%{?with_apidocs:BuildRequires: doxygen}
+BuildRequires: graphviz
+BuildRequires: glib2-devel >= 1:2.0
+BuildRequires: gtk+2-devel >= 1:2.0
+BuildRequires: help2man
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:2
+BuildRequires: ncurses-devel
+BuildRequires: pkgconfig
+BuildRequires: python-dbus
+BuildRequires: python-devel >= 2.0
+BuildRequires: python-pyatspi
+BuildRequires: python-pygtk-gtk >= 2:2
+BuildRequires: python-wx
+BuildRequires: sqlite3-devel >= 3
+BuildRequires: swig-python >= 2.0
+BuildRequires: tinyxml-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXevie-devel
+Requires: %{name}-libs = %{version}-%{release}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Presage (formerly known as Soothsayer) generates predictions by
+modelling natural language as a combination of redundant information
+sources. Presage computes probabilities for words which are most
+likely to be entered next by merging predictions generated by the
+different predictive algorithms. Presage's modular and extensible
+architecture allows its language model to be extended and customized
+to utilize statistical, syntactic, and semantic predictive algorithms.
+
+%description -l pl.UTF-8
+Presage (wcześniej znany jako Soothsayer) generuje przewidywania
+poprzez modelowanie języka naturalnego jako kombinacji redundantnych
+źródeł informacji. Presage wylicza prawdopodobieństwa słów, które są
+najbardziej spodziewane być wpisane jako kolejne, łącząc przewidywania
+wygenerowane różnymi algorytmami predykcji. Modularna i rozszerzalna
+architektura Presage pozwala na rozszerzanie modelu języka i
+dostosowywanie go, aby wykorzystywał algorytmy statystyczne,
+syntaktyczne oraz semantyczne.
+
+%package libs
+Summary: Presage shared library
+Summary(pl.UTF-8): Biblioteka współdzielona Presage
+Group: Libraries
+
+%description libs
+Presage shared library.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona Presage.
+
+%package devel
+Summary: Header files for Presage library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Presage
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+Requires: libstdc++-devel
+
+%description devel
+Header files for Presage library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Presage.
+
+%package static
+Summary: Static Presage library
+Summary(pl.UTF-8): Statyczna biblioteka Presage
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static Presage library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Presage.
+
+%package apidocs
+Summary: API documentation for Presage library
+Summary(pl.UTF-8): Dokumentacja API biblioteki Presage
+Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description apidocs
+API documentation for Presage library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Presage.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ %{!?with_apidocs:--disable-documentation} \
+ %{!?with_static_libs:--disable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO doc/getting_started.txt
+%attr(755,root,root) %{_libdir}/libpresage.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpresage.so.1
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/presage.xml
+
+%attr(755,root,root) %{_bindir}/gpresagemate
+
+%attr(755,root,root) %{_bindir}/gprompter
+
+# dbus service, R: python-dbus
+%attr(755,root,root) %{_bindir}/presage_dbus_python_demo
+%attr(755,root,root) %{_bindir}/presage_dbus_service
+%{py_sitescriptdir}/presage_dbus_service.py[co]
+%{_datadir}/dbus-1/services/org.gnome.presage.service
+%{_mandir}/man1/presage_dbus_python_demo.1*
+%{_mandir}/man1/presage_dbus_service.1*
+
+%attr(755,root,root) %{_bindir}/presage_demo
+%attr(755,root,root) %{_bindir}/presage_demo_text
+%attr(755,root,root) %{_bindir}/presage_python_demo
+%attr(755,root,root) %{_bindir}/presage_simulator
+%attr(755,root,root) %{_bindir}/text2ngram
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/abbreviations_*.txt
+%{_datadir}/%{name}/database_*.db
+%if %{with ngram}
+%{_datadir}/%{name}/vocab*
+%endif
+# FIXME: location
+%doc %{_datadir}/%{name}/html
+%{_desktopdir}/gprompter.desktop
+%{_iconsdir}/hicolor/scalable/apps/gprompter.svg
+%{_pixmapsdir}/gprompter.png
+%{_pixmapsdir}/gprompter.xpm
+%{_mandir}/man1/gprompter.1*
+%{_mandir}/man1/presage_demo.1*
+%{_mandir}/man1/presage_demo_text.1*
+%{_mandir}/man1/presage_python_demo.1*
+%{_mandir}/man1/presage_simulator.1*
+%{_mandir}/man1/text2ngram.1*
+
+%attr(755,root,root) %{py_sitedir}/_presage.so
+%attr(755,root,root) %{py_sitedir}/presage.py[co]
+%{py_sitedir}/python_presage-%{version}-py*.egg-info
+
+# pyprompter, R: python-wxPython
+# FIXME: *.pyo
+%attr(755,root,root) %{_bindir}/pyprompter
+%{py_sitedir}/prompter
+%{py_sitedir}/pyprompter-%{version}-py*.egg-info
+%{_desktopdir}/pyprompter.desktop
+%{_iconsdir}/hicolor/scalable/apps/pyprompter.svg
+%{_pixmapsdir}/pyprompter.png
+%{_pixmapsdir}/pyprompter.xpm
+%{_mandir}/man1/pyprompter.1*
+
+# pypresagemate, R: python-pyatspi, python-pygtk-gtk, python-pygtk-pango, python-Xlib
+%attr(755,root,root) %{_bindir}/pypresagemate
+%{py_sitescriptdir}/presagemate
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpresage.so
+%{_libdir}/libpresage.la
+%{_includedir}/presage*.h
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libpresage.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/*
+%endif
+
+#%doc doc/python_binding.txt
+
+# TODO:
+#%{_datadir}/presage/presage.png
+#%{_datadir}/presage/presage.svg
+#%{_datadir}/presage/presage.xpm
diff --git a/presage-configure.patch b/presage-configure.patch
new file mode 100644
index 0000000..c2ef585
--- /dev/null
+++ b/presage-configure.patch
@@ -0,0 +1,72 @@
+--- presage-0.9.1/configure.ac.orig 2015-04-21 13:33:16.000000000 +0200
++++ presage-0.9.1/configure.ac 2018-03-24 22:37:45.543196684 +0100
+@@ -267,8 +267,7 @@
+ if test "$PYTHON" != :
+ then
+ AC_MSG_CHECKING(for python dbus module)
+- $PYTHON -c "import dbus" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_dbus_python=yes
+ else
+@@ -285,8 +284,7 @@
+ if test "$PYTHON" != :
+ then
+ AC_MSG_CHECKING(for pyatspi module)
+- $PYTHON -c "import pyatspi" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_pyatspi=yes
+ else
+@@ -295,8 +293,7 @@
+ AC_MSG_RESULT($have_pyatspi)
+
+ AC_MSG_CHECKING(for python gtk module)
+- $PYTHON -c "import gtk" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_python_gtk=yes
+ else
+@@ -305,8 +302,7 @@
+ AC_MSG_RESULT($have_python_gtk)
+
+ AC_MSG_CHECKING(for python pango module)
+- $PYTHON -c "import pango" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_python_pango=yes
+ else
+@@ -315,8 +311,7 @@
+ AC_MSG_RESULT($have_python_pango)
+
+ AC_MSG_CHECKING(for python Xlib module)
+- $PYTHON -c "import Xlib" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_python_Xlib=yes
+ else
+@@ -344,8 +339,7 @@
+ if test "$PYTHON" != :
+ then
+ AC_MSG_CHECKING(for python wx module)
+- $PYTHON -c "import wx" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_python_wx=yes
+ else
+@@ -355,8 +349,7 @@
+
+
+ AC_MSG_CHECKING(for python wx.stc module)
+- $PYTHON -c "import wx.stc" 2&>/dev/null
+- if test $? -eq 0;
++ if true;
+ then
+ have_python_wx_stc=yes
+ else
diff --git a/presage-link.patch b/presage-link.patch
new file mode 100644
index 0000000..2fdfdf7
--- /dev/null
+++ b/presage-link.patch
@@ -0,0 +1,23 @@
+--- presage-0.9.1/apps/gtk/gprompter/Makefile.am.orig 2015-04-21 13:31:43.000000000 +0200
++++ presage-0.9.1/apps/gtk/gprompter/Makefile.am 2018-03-04 12:26:44.126679307 +0100
+@@ -238,7 +238,7 @@
+ -I$(srcdir)/scintilla/include \
+ -I$(srcdir)/scintilla/src \
+ -I$(srcdir)/scintilla/lexlib
+-libscintilla_la_LIBADD = $(GNOME_LIBS) $(GTHREAD_LIBS)
++libscintilla_la_LIBADD = $(GNOME_LIBS) $(GTHREAD_LIBS) -lm
+
+ # Distribute files from here.
+ EXTRA_DIST = scintilla/License.txt scintilla/version.txt
+--- presage-0.9.1/configure.ac.orig 2015-04-21 13:33:16.000000000 +0200
++++ presage-0.9.1/configure.ac 2018-03-24 22:56:26.159850555 +0100
+@@ -89,9 +89,6 @@
+ [test "x$have_ld_with_version_script" = "xyes"])
+
+
+-dnl Cygwin windows specific flag
+-LDFLAGS="-L/usr/local/lib $LDFLAGS"
+-
+ dnl ====================
+ dnl Checks for libraries
+ dnl ====================
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/presage.git/commitdiff/a602ed6ff6a9bcdd0aebae67abfaf4627467c925
More information about the pld-cvs-commit
mailing list