LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File trac-discussion-plugin.spec of Package trac-discussion-plugin (Project home:guidod:trac12)

# norootforbuild
%define ver 0.8
%define rev 10605
%define nam discussionplugin
%define branch 0.11

%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_version: %global python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")}
%{!?py_requires: %global py_requires Requires: python >= %python_version}

Name:           trac-discussion-plugin
Version:        %ver.r%rev
Release:        1
License:        GPL
Group:          Development/Tools/Other
Url:            http://trac-hacks.org/wiki/DiscussionPlugin
# http://trac-hacks.org/changeset/latest/discussionplugin?old_path=/&filename=discussionplugin&format=zip
Source0:        %nam-r%rev.zip
Provides:       %name = %ver
Provides:       trac-hacks-%nam = %ver
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  unzip
BuildRequires:  python-devel
BuildRequires:  python-setuptools >= 0.6
Requires:       python-setuptools
Requires:       trac >= 0.11
Summary:        Trac Discussion Forum Plugin

%if %{?suse_version: 0%{?suse_version} > 1110 } %{!?suse_version: 1}
BuildArch:      noarch

%if "%python_version" == "2.4"
Patch1: trac-discussion-plugin.no-ifelse-api-01.patch
Patch2: trac-discussion-plugin.no-ifelse-timeline-01.patch

%if 0%{?suse_version}
Suggests: trac-tags-plugin
Suggests: trac-spamfilter-plugin

 The DiscussionPlugin adds discussion forums to Trac. An arbitrary
 number of forums can be added, organized to forum groups. Users can
 create topics in forums and reply to them which together creates
 discussion threads. Threaded or flat view to topics and its replies
 is supported. Each forum has a list of moderators who can delete topics,
 replies, etc. Plugin is administrated directly or via Trac administration
 interface with appropriate rights. Appending new forums and topics either
 as new replies shows up in timeline. Searching capability in topics and
 replies is supported too. 

%setup -qn %nam/%branch
%if "%python_version" == "2.4"
%patch1 -p1
%patch2 -p1

%{__python} setup.py build

%{__python} setup.py install --root=%{buildroot} --prefix=%{_prefix} \
 %{!?suse_version: --record=INSTALLED_FILES} %{?suse_version: --record-rpm=INSTALLED_FILES}

test "%{buildroot}" != "/" && %__rm -rf %{buildroot}