File treeline.spec of Package treeline

#
# spec file for package treeline (Version 1.2.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           treeline
Summary:        Versatile Tree-Style Outliner for Defining Custom Data Schemas
Version:        1.2.3
Release:        1
Group:          Productivity/Office/Other
License:        GPL v2 or later
Url:            http://www.bellz.org/treeline/
AutoReqProv:    on
BuildRequires:  python update-desktop-files
%if %{?suse_version} > 1020
BuildRequires:  fdupes
%endif
Requires:       python-qt4
Requires:       python-xml
Source0:        %name-%version.tar.bz2
Source1:        %name.desktop
Source2:        x-%name.desktop
Source3:        x-%name-gz.desktop
Source4:        x-treepad.desktop
Source5:        treeline.png
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define python_site    %{_prefix}/%{_lib}/python%{py_ver}/site-packages
BuildArch:      noarch

%description
TreeLine is a versatile tool for working with all kinds of information
that fit into a tree-like structure.

It can be used to edit bookmark files, create mini-databases (for
example, for addresses, tasks, records, or CDs), outline documents, or
just collect ideas. It can also be used as a generic editor for XML
files.

The data schemas for any node in the data tree can be customized and
new types of nodes can be defined. The way data is presented on the
screen, exported to HTML, or printed can be defined with HTML-like
templates. Plug-ins can be written to load and save data from and to
custom file formats or external data sources and extend the
functionality of TreeLine.

TreeLine is written in Python and uses the PyQt bindings to the Qt
toolkit, which makes it very portable.



Authors:
--------
    Doug Bell <doug101@bellz.org>

%prep
%setup -n TreeLine

%build

%install
for i in source/*.py; do
	sed -e "s|#!/usr/bin/env python|#!/usr/bin/python|g" $i > $i.tmp
	mv $i.tmp $i
	chmod 755 $i
done
python install.py -x \
   -p /usr \
   -d /usr/share/doc/packages/treeline \
   -b $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
cp %{SOURCE2} $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
cp %{SOURCE3} $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
cp %{SOURCE4} $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
cp %{SOURCE5} $RPM_BUILD_ROOT/usr/share/pixmaps/
%suse_update_desktop_file -i treeline Office ProjectManagement
%if 0%{suse_version} > 1020
%fdupes -s %buildroot
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc /usr/share/doc/packages/treeline
/usr/bin/*
/usr/lib/*
/usr/share/applications/*desktop
/usr/share/treeline
/opt/kde3
/usr/share/pixmaps/*png
/usr/share/icons/treeline

%changelog
openSUSE Build Service is sponsored by