texworks/texworks.spec

162 lines
5.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package TeXworks
#
# Copyright 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007-09 by Jonathan Kew.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
%define release_num r1281
Name: texworks
Version: 0.4.5
Release: 1
License: GPL-2.0+
Summary: TeXshop-like TeX Editor
Url: http://www.tug.org/texworks/
Group: Productivity/Publishing/TeX/Frontends
Source0: http://texworks.googlecode.com/files/%{name}-%{version}-%{release_num}.tar.gz
BuildRequires: dbus-1-devel
BuildRequires: desktop-file-utils
BuildRequires: hunspell-devel
BuildRequires: libpoppler-devel
BuildRequires: libpoppler-qt4-devel
BuildRequires: libqt4-devel
BuildRequires: update-desktop-files
BuildRequires: python-devel
BuildRequires: lua-devel
Requires: dbus-1
Requires: hunspell
Requires: poppler-tools
Requires: texlive-latex
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The TeXworks project is an effort to build a simple TeX front-end
program (working environment) that will be available for all todays
major desktop operating systems—in particular, MS Windows (XP and
Vista), typical GNU/Linux distros and other X11-based systems, and
Mac OS X. It is deliberately modeled on Dick Kochs award-winning
TeXShop for Mac OS X, which is credited with a resurgence of TeX
usage on the Mac platform.
%package plugin-python
Summary: Plugins to add python scripting to texworks
Group: Development/Libraries/Python
Requires: python
Requires: %{name} = %{version}
%description plugin-python
The TeXworks project is an effort to build a simple TeX front-end
program (working environment) that will be available for all todays
major desktop operating systems—in particular, MS Windows (XP and
Vista), typical GNU/Linux distros and other X11-based systems, and
Mac OS X. It is deliberately modeled on Dick Kochs award-winning
TeXShop for Mac OS X, which is credited with a resurgence of TeX
usage on the Mac platform.
This package adds python scripting abitilies to TeXworks.
%package plugin-lua
Summary: Plugins to add python scripting to texworks
Group: Development/Libraries/Other
Requires: lua
Requires: %{name} = %{version}
%description plugin-lua
The TeXworks project is an effort to build a simple TeX front-end
program (working environment) that will be available for all todays
major desktop operating systems—in particular, MS Windows (XP and
Vista), typical GNU/Linux distros and other X11-based systems, and
Mac OS X. It is deliberately modeled on Dick Kochs award-winning
TeXShop for Mac OS X, which is credited with a resurgence of TeX
usage on the Mac platform.
This package adds lua scripting abitilies to TeXworks.
%prep
%setup -q -n texworks-%{version}
%build
#Python plugin
pushd plugins-src/TWPythonPlugin/
qmake 'INSTALL_PREFIX=%{_prefix}' 'TW_PLUGINPATH=%{_libdir}/%{name}' -after \
'INCLUDEPATH -= /usr/include/python2.6/' \
'INCLUDEPATH += %{_includedir}/python%{py_ver}/' \
'LIBS -= -lpython2.6' \
'LIBS += -lpython%{py_ver}'
popd
#Lua plugin
pushd plugins-src/TWLuaPlugin/
qmake 'INSTALL_PREFIX=%{_prefix}' 'TW_PLUGINPATH=%{_libdir}/%{name}' -after \
'PKGCONFIG -= lua5.1' \
'PKGCONFIG += lua'
popd
#Main package
qmake 'TW_BUILD_ID=openSUSE' 'INSTALL_PREFIX=%{_prefix}' 'TW_HELPPATH=%{_docdir}/%{name}/manual' 'DOCS_DIR=%{_docdir}/%{name}' -after \
'QMAKE_CXXFLAGS -= -DTW_DICPATH=\\\"/usr/share/myspell/dicts\\\"' \
'QMAKE_CXXFLAGS += -DTW_DICPATH=\\\"%{_datadir}/myspell\\\"'
%install
#Python plugin
pushd plugins-src/TWPythonPlugin/
make INSTALL_ROOT=%{buildroot} install
popd
#Lua plugin
pushd plugins-src/TWLuaPlugin/
make INSTALL_ROOT=%{buildroot} install
popd
#Main package
make INSTALL_ROOT=%{buildroot} install
%suse_update_desktop_file texworks Publishing WordProcessor
%clean
rm -rf %{buildroot}
%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif
%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif
%files
%defattr(-,root,root)
%doc COPYING README NEWS manual/
%{_bindir}/texworks
%{_datadir}/applications/texworks.desktop
%{_datadir}/pixmaps/*.png
%{_mandir}/man1/texworks.1.*
%files plugin-python
%defattr(-,root,root)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*PythonPlugin.so
%files plugin-lua
%defattr(-,root,root)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*LuaPlugin.so
%changelog