Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 2ef01f63412438d2f77d4ebafa8b5221 > files > 4

viewvc-1.1.5-1mdv2010.1.src.rpm

Name:           viewvc
Version:        1.1.5
Release:        %mkrel 1
Epoch:          0
Summary:        Browser interface for CVS and Subversion version control repositories
License:        BSD
Group:          System/Servers
URL:            http://www.viewvc.org/
Source0:        http://viewvc.tigris.org/files/documents/3330/46029/%name-%version.tar.gz
Patch0:         %{name}-tools.patch
Patch1:         %{name}-1.1.0-config.patch
Requires:       apache
Requires(post): rpm-helper
Requires(postun): rpm-helper
BuildRequires:  python
Requires:       python
Obsoletes:      viewcvs < %{epoch}:%{version}-%{release}
Provides:       viewcvs = %{epoch}:%{version}-%{release}
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
ViewVC is a browser interface for CVS and Subversion version control 
repositories. It generates templatized HTML to present navigable 
directory, revision, and change log listings. It can display specific 
versions of files as well as diffs between those versions. Basically, 
ViewVC provides the bulk of the report-like functionality you expect out 
of your version control tool, but much more prettily than the average 
textual command-line program output.

Here are some of the additional features of ViewVC:

    * Support for filesystem-accessible CVS and Subversion repositories.
    * Individually configurable virtual host support.
    * Line-based annotation/blame display (CVS only).
    * Revision graph capabilities (via integration with CvsGraph) (CVS 
      only).
    * Syntax highlighting support (via integration with GNU enscript).
    * Bonsai-like repository query facilities.
    * Template-driven output generation.
    * Colorized, side-by-side differences.
    * Tarball generation (by tag/branch for CVS, by revision for 
      Subversion).
    * I18N support based on the Accept-Language request header.
    * Ability to run either as CGI script or as a standalone server.
    * Regexp-based file searching.
    * INI-like configuration file (as opposed to requiring actual code 
      tweaks).

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p0 -b .config

%build

%install
%{__rm} -rf %{buildroot}
%{__python} ./viewvc-install --destdir=%{buildroot} --prefix=%{_datadir}/%{name}

# remove uneeded files
%{__rm} -f %{buildroot}%{_datadir}/%{name}/bin/mod_python/.htaccess

# fix python files perms and shellbang
%{__perl} -pi \
        -e 's|/usr/local/bin/python|%{_bindir}/python|g;' \
        -e 's|\s*/usr/bin/env python|%{_bindir}/python|g;' \
        -e 's|CONF_PATHNAME =.*|CONF_PATHNAME = r"%{_sysconfdir}/%{name}/viewvc.conf"|g;' \
        `%{_bindir}/find %{buildroot}%{_datadir}/%{name} -type f` 

# install cgi's to www directory
%{__mkdir_p} %{buildroot}%{_var}/www/cgi-bin
%{__install} -m 755 %{buildroot}%{_datadir}/%{name}/bin/cgi/*.cgi %{buildroot}%{_var}/www/cgi-bin
%{__rm} -rf %{buildroot}%{_datadir}/%{name}/bin/cgi

# fix paths in configuration
%{__perl} -pi \
  -e 's|^#template_dir = .*|template_dir = %{_datadir}/%{name}/templates/|g;' \
  -e 's|^#docroot = .*|docroot = /%{name}|;' \
  -e 's|^#cvsgraph_conf = .*|cvsgraph_conf = %{_sysconfdir}/%{name}/cvsgraph.conf|;' \
  -e 's|^#mime_types_files = .*|mime_types_files = %{_sysconfdir}/%{name}/mimetypes.conf, %{_sysconfdir}/httpd/conf/mime.types|;' \
  %{buildroot}%{_datadir}/%{name}/viewvc.conf

# install config to sysconf directory
%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}
%{__install} -m 644 %{buildroot}%{_datadir}/%{name}/viewvc.conf %{buildroot}%{_sysconfdir}/%{name}/viewvc.conf
%{__rm} -f %{buildroot}%{_datadir}/%{name}/viewvc.conf
%{__install} -m 644 %{buildroot}%{_datadir}/%{name}/cvsgraph.conf %{buildroot}%{_sysconfdir}/%{name}/cvsgraph.conf
%{__rm} -f %{buildroot}%{_datadir}/%{name}/cvsgraph.conf
%{__install} -m 644 %{buildroot}%{_datadir}/%{name}/mimetypes.conf %{buildroot}%{_sysconfdir}/%{name}/mimetypes.conf
%{__rm} -f %{buildroot}%{_datadir}/%{name}/mimetypes.conf

# move static files under %{_var}/www
%{__mv} %{buildroot}%{_datadir}/%{name}/templates/docroot %{buildroot}%{_var}/www/%{name}

# compile the python files
%{_bindir}/find %{buildroot}%{_datadir}/%{name}/lib -type f -name "*.pyc" | %{_bindir}/xargs %{__rm}
%{__python} -O %{_libdir}/python%{pyver}/compileall.py %{buildroot}%{_datadir}/%{name}/lib

# apache configuration
%{__mkdir_p} %{buildroot}%{_webappconfdir}
%{__cat} > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
# %{name} configuration

Alias /%{name} %{_var}/www/%{name}

<Directory %{_var}/www/%{name}>
    Allow from all
</Directory>

<LocationMatch "^/cgi-bin/(query|viewvc).cgi">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    ErrorDocument 403 "Access denied per %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf"
</LocationMatch>

<IfModule mod_python.c>
    Alias /%{name}-mp %{_datadir}/%{name}/bin/mod_python/viewvc.py
    <Directory %{_datadir}/%{name}/bin/mod_python>
        AddHandler python-program .py
        PythonHandler handler
        Order allow,deny
        Allow from 127.0.0.1
        ErrorDocument 403 "Access denied per %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf"
    </Directory>
</IfModule>
EOF

# set mode 755 on executable scripts
%{__grep} -rl '^#!' %{buildroot}%{_datadir}/%{name} | %{_bindir}/xargs %{__chmod} 755

cat >README.mdv <<EOF
Mandriva RPM specific notes
===========================

Setup
-----
The setup used here differs from default one in order to achieve better FHS
compliance:

- the files accessible from the web are in /var/www/cgi-bin
- the files not accessible from the web are in /usr/share/viewvc
- the configuration file is located at /etc/viewvc/viewvc.conf

Post-installation
-----------------
You have manually to create the MySQL database if you want to use query mode.

Additional useful packages
--------------------------
- cvs and rcs provide a web interface for CVS repositories
- python-svn provides a web interface for SVN repositories
- MySQL-python and a MySQL database are needed for query mode
- apache-mod_python, will be accessible at http://localhost/viewvc-mp (instead
  of the cgi files)
EOF

%clean
%{__rm} -rf %{buildroot}

%post
%if %mdkversion < 201010
%_post_webapp
%endif

%postun
%if %mdkversion < 201010
%_postun_webapp
%endif

%files
%defattr(-,root,root)
%doc CHANGES COMMITTERS INSTALL LICENSE.html README README.mdv docs/
%config(noreplace) %{_sysconfdir}/%{name}
%config(noreplace) %{_webappconfdir}/%{name}.conf
%{_datadir}/%{name}
%{_var}/www/cgi-bin/*.cgi
%{_var}/www/%{name}


%changelog
* Tue Mar 30 2010 Oden Eriksson <oeriksson@mandriva.com> 0:1.1.5-1mdv2010.1
+ Revision: 528953
- 1.1.5

* Thu Mar 11 2010 Oden Eriksson <oeriksson@mandriva.com> 0:1.1.4-1mdv2010.1
+ Revision: 517984
- 1.1.4

* Sun Jan 17 2010 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1.3-3mdv2010.1
+ Revision: 492703
- use herein document instead of external source for README.mdv
- rely on filetrigger for reloading apache configuration begining with 2010.1, rpm-helper macros otherwise

* Thu Jan 07 2010 Oden Eriksson <oeriksson@mandriva.com> 0:1.1.3-2mdv2010.1
+ Revision: 487113
- added mod_python support
- whoops, really fix path to templates
- limit access to the cgi files per default
- more config fixes
- package mod_python files
- fix path to templates

* Wed Dec 30 2009 Frederik Himpe <fhimpe@mandriva.org> 0:1.1.3-1mdv2010.1
+ Revision: 484041
- Update to new version 1.1.3

* Wed Aug 12 2009 Funda Wang <fwang@mandriva.org> 0:1.1.2-1mdv2010.0
+ Revision: 415260
- new version 1.1.2

* Fri Jun 05 2009 Funda Wang <fwang@mandriva.org> 0:1.1.1-1mdv2010.0
+ Revision: 383002
- update tools patch
- New version 1.1.1

* Sun Nov 30 2008 David Walluck <walluck@mandriva.org> 0:1.1.0-0.beta1.1mdv2009.1
+ Revision: 308328
- 1.1.0

* Sat Oct 18 2008 David Walluck <walluck@mandriva.org> 0:1.0.7-1mdv2009.1
+ Revision: 295155
- remove obsolete patches
- 1.0.7

* Thu Sep 18 2008 Frederik Himpe <fhimpe@mandriva.org> 0:1.0.5-5mdv2009.0
+ Revision: 285705
- Add patch from upstream svn fixing a small security problem
  (http://viewvc.tigris.org/issues/show_bug.cgi?id=354)

* Sun Aug 03 2008 Thierry Vignaud <tv@mandriva.org> 0:1.0.5-4mdv2009.0
+ Revision: 261852
- rebuild

* Wed Jul 30 2008 Thierry Vignaud <tv@mandriva.org> 0:1.0.5-3mdv2009.0
+ Revision: 255528
- rebuild

* Tue Mar 04 2008 Frederik Himpe <fhimpe@mandriva.org> 0:1.0.5-1mdv2008.1
+ Revision: 178842
- New upstream bug and security fix release

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Wed Aug 22 2007 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.0.4-3mdv2008.0
+ Revision: 69124
- requires python, for cgi module

* Fri Jun 01 2007 David Walluck <walluck@mandriva.org> 0:1.0.4-2mdv2008.0
+ Revision: 33680
- version explicit Obsoletes
- fix patch specifying config file location
- remove epoch from the build root
- update README.mdv a bit

* Tue Apr 17 2007 David Walluck <walluck@mandriva.org> 0:1.0.4-1mdv2008.0
+ Revision: 14167
- 1.0.4


* Fri Jan 19 2007 Gustavo De Nardin <gustavodn@mandriva.com> 1.0.3-2mdv2007.0
+ Revision: 110542
- Patch from trunk r1504, to speed up directory listing when use_pagesize > 0.

* Thu Oct 19 2006 David Walluck <walluck@mandriva.org> 0:1.0.3-1mdv2007.1
+ Revision: 66090
- 1.0.3
- Import viewvc

* Sat Jul 22 2006 David Walluck <walluck@mandriva.org> 0:1.0.1-1mdv2007.0
- 1.0.1
- fix macros in changelog

* Tue Jun 27 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.0.0-2mdv2007.0
- new webapp macros
- decompress all patches

* Wed May 03 2006 David Walluck <walluck@mandriva.org> 0:1.0.0-1mdk
- 1.0.0
- fix find syntax

* Tue Apr 11 2006 David Walluck <walluck@mandriva.org> 0:1.0-0.20060410.1mdk
- updated snapshot in line with the official 1.0.0-rc1 release on Apr 06

* Wed Mar 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.0-0.20060328.1mdk
- updated snapshot (should fix query mode)
- rediff config patch
- make most requires optionals, and document them in README.mdv

* Sun Mar 19 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.0-0.20060123.2mdk
- backport compatible apache configuration file
- require MySQL-python for query.cgi

* Mon Jan 23 2006 David Walluck <walluck@mandriva.org> 0:1.0-0.20060123.1mdk- CVS (20060123)
* Tue Nov 15 2005 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.0-0.20050115.6mdk
- FHS installation:
 - move configuration files to %%{_sysconfdir}/%%{name}
 - move static files to %%{_var}/www/%%{name}
 - move data files to %%{_datadir}/%%{name}
- spec cleanup
- fix URL
- fix python files perms and shellbang

* Sat Jul 30 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.0-0.20050115.5mdk
- Fix Requires

* Sat Jul 30 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.0-0.20050115.4mdk
- Fix BuildRequires

* Sun Feb 06 2005 David Walluck <walluck@mandrake.org> 0:1.0-0.20050115.3mdk
- rebuild

* Sat Jan 29 2005 David Walluck <walluck@mandrake.org> 0:1.0-0.20050115.2mdk
- add tools
- patch tools to fix tools/make_database

* Sun Oct 31 2004 David Walluck <walluck@mandrake.org> 0:1.0-0.20050115.1mdk
- 1.0-dev (CVS-20050115)

* Sun Oct 31 2004 David Walluck <walluck@mandrake.org> 0:1.0-0.20041030.1mdk
- 1.0-dev (CVS-20041030)
- fix website docs install
- fix apache icons location
- remove CVS dirs
- don't copy tools
- requires python-svn (needed for svn support)
- doesn't require enscript by default
- doesn't require rcs by default

* Wed Jun 09 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0-0.20040223.4mdk
- Requires python itself (cgi.py)

* Tue Feb 24 2004 David Walluck <walluck@linux-mandrake.com> 0:1.0-0.20040223.3mdk
- use existing perl regex instead of patch

* Tue Feb 24 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0-0.20040223.2mdk
- %%patch0: uses png icons since http2 don't have gif

* Mon Feb 23 2004 David Walluck <walluck@linux-mandrake.com> 0:1.0-0.20040223.1mdk
- 1.0-dev (CVS-20040223) - svn 1.0 is out now, so why not update this as well
- update my email address in %%changelog

* Sun Feb 01 2004 David Walluck <walluck@linux-mandrake.com> 0:1.0-0.20040201.1mdk
- 1.0-dev (CVS-20040201) with fix for enabling of cvsgraph when not using cvs
- fix path of custom cvsgraph config