Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1484209
 поиск   регистрация   авторизация 
 
Группа :: Разработка/Прочее
Пакет: trac

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

%def_with M24

%if_with M24
%define release alt0.M24.1
%else
%define release alt1
%endif

Summary: Integrated scm, wiki, issue tracker and project environment
Name: trac
Version: 0.10.3
Release: %release
Source0: http://ftp.edgewall.com/pub/trac/%name-%version.tar.gz
Source1: trac-0.9-alt-apache2.conf
#Source2: trac-0.9b1-alt-ru.mo
Source3: trac-0.9.4-alt-nginx.cgi.conf
Source4: trac-0.9.4-alt-nginx.fcgi.conf
Source5: trac-0.9.4-alt-cherokee.cgi.conf
Source6: trac-0.9.4-alt-cherokee.fcgi.conf

Patch0: trac-0.10-alt-tracd-no-threading.patch

License: BSD
Group: Development/Other
Packager: Ivan Fedorov <ns at altlinux.ru>
URL: http://trac.edgewall.com/
BuildArch: noarch

PreReq: python = %__python_version
BuildPreReq: python-devel = %__python_version
BuildRequires(pre): python

# Provided by clearsilver-python

# Required by trac.cgi, etc.
%py_requires neo_cgi
# Provided by python-module-pysqlite or python-module-pysqlite3
# Required by sqlite db engine
%py_requires sqlite

BuildPreReq: rpm-build-python >= 0.15
BuildPreReq: apache2-devel

%description
Trac is a minimalistic web-based software project management and bug/issue
tracking system. It provides an interface to the Subversion revision control
systems, an integrated wiki, flexible issue tracking and convenient report
facilities.

%package contrib
Summary: Trac contribs
Group: Development/Other
Requires: %name = %version

%description contrib
This package contains trac contribs

%package mod_python
Summary: Trac mod_python web frontend
Group: Development/Other
Requires: %name = %version
Requires: apache2

%description mod_python
This package contains trac mod_python web frontend

%package fcgi
Summary: Trac FastCGI web frontend
Group: Development/Other
Requires: %name = %version
# FastCGI server spawner, should be restarted on upgrade
Requires: trac-spawn-fcgi

%description fcgi
This package contains trac FastCGI web frontend

%prep
%setup -q
#%patch -p0

cp %SOURCE3 nginx-A.trac.cgi.conf
cp %SOURCE4 nginx-A.trac.fcgi.conf
cp %SOURCE5 cherokee-A.trac.cgi.conf
cp %SOURCE6 cherokee-A.trac.fcgi.conf

%build
%if_with M24
%__python setup.py build
%else
%__python setup.py build -e %_bindir/python%__python_version
%endif

%install
%__python setup.py install --root=%buildroot --optimize=2 --record=INSTALLED_FILES
%__grep -v %_man1dir INSTALLED_FILES > INSTALLED_FILES.nomans
%__rm INSTALLED_FILES
%__mv INSTALLED_FILES.nomans INSTALLED_FILES
%__cp -a contrib %buildroot/%_datadir/%name/
%__mkdir_p %buildroot%apache_addonconfdir
%__sed  -e 's, at DATADIR at ,%_datadir,g' \
-e 's, at AHTDOCSDIR at ,%apache_htdocsdir,g' \
-e 's, at ACONFDIR at ,%apache_confdir,g' \
-e 's, at LOCALSTATEDIR at ,%_localstatedir,g' \
%SOURCE1 > %buildroot%apache_addonconfdir/A.%name.conf
%__install -d %buildroot%_localstatedir/%name %buildroot%_sysconfdir/%name

%pre
%_sbindir/groupadd -r -f tracadmin ||:

%post fcgi
%post_service trac-spawn-fcgi

%preun fcgi
%preun_service trac-spawn-fcgi

%post mod_python
/sbin/service httpd2 condreload ||:

%postun mod_python
/sbin/service httpd2 condreload ||:

%files -f INSTALLED_FILES
%_man1dir/*
%doc ChangeLog README README.tracd RELEASE
%doc AUTHORS INSTALL THANKS UPGRADE
%doc nginx-A.trac.cgi.conf nginx-A.trac.fcgi.conf
%doc cherokee-A.trac.cgi.conf cherokee-A.trac.fcgi.conf
# put htpasswd here
%dir %_sysconfdir/%name
# workaround for installed but not listed dirs:
%dir %python_sitelibdir/%name
%dir %python_sitelibdir/%name/mimeview
%dir %python_sitelibdir/%name/scripts
%dir %python_sitelibdir/%name/ticket
%dir %python_sitelibdir/%name/upgrades
%dir %python_sitelibdir/%name/versioncontrol
%dir %python_sitelibdir/%name/versioncontrol/web_ui
%dir %python_sitelibdir/%name/web
%exclude %python_sitelibdir/%name/web/modpython_frontend.*
%exclude %python_sitelibdir/%name/web/_fcgi.*
%exclude %python_sitelibdir/%name/web/fcgi_frontend.*
%exclude %_datadir/%name/cgi-bin/trac.fcgi
%dir %python_sitelibdir/%name/wiki
%dir %_datadir/%name
%dir %_datadir/%name/cgi-bin
%dir %_datadir/%name/htdocs
%dir %_datadir/%name/htdocs/css
%dir %_datadir/%name/htdocs/js
%dir %_datadir/%name/templates
%dir %_datadir/%name/wiki-default
%dir %_datadir/%name/wiki-macros
# empty dir for environments creation
%attr(2770,root,tracadmin) %dir %_localstatedir/%name

%files contrib
%dir %_datadir/%name/contrib
%_datadir/%name/contrib/*

%files mod_python
%python_sitelibdir/%name/web/modpython_frontend.*
%config(noreplace) %apache_addonconfdir/A.%name.conf

%files fcgi
%python_sitelibdir/%name/web/fcgi_frontend.*
%python_sitelibdir/%name/web/_fcgi.*
%_datadir/%name/cgi-bin/trac.fcgi

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005