5a6752e
5a6752e
%global htmldir /var/www/yawn
5a6752e
%global apacheconfdir /etc/httpd
5a6752e
%global svnrev 561
5a6752e
5a6752e
Name:           yawn
5a6752e
Version:        0
dc9823a
Release:        0.3.20120227svn%{svnrev}%{?dist}
5a6752e
Summary:        Yet Another WBEM Navigator
5a6752e
5a6752e
5a6752e
Group:          Applications/System
5a6752e
License:        GPLv2
5a6752e
URL:            https://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN
5a6752e
# The source for this package was pulled from upstream's vcs.  Use the
5a6752e
# following command to get the file:
5a6752e
#  wget http://pywbem.svn.sourceforge.net/viewvc/pywbem/yawn/trunk/yawn.py
5a6752e
Source0:        yawn.py
5a6752e
dc9823a
# Patch0: resolves bz#802683, reported upstream (see link in bz)
dc9823a
Patch0:         yawn-0-content-type.patch
dc9823a
5a6752e
BuildRequires:  httpd
5a6752e
Requires:       mod_python, pywbem, httpd
5a6752e
BuildArch:      noarch
5a6752e
5a6752e
%description
5a6752e
Web-based CIM/WBEM browser
5a6752e
5a6752e
%prep
4d9f06a
cp %{SOURCE0} .
dc9823a
%patch0 -p1 -b .content-type
5a6752e
5a6752e
%build
5a6752e
5a6752e
%install
5a6752e
rm -rf $RPM_BUILD_ROOT
5a6752e
mkdir -p $RPM_BUILD_ROOT%{htmldir}
4d9f06a
install ./yawn.py $RPM_BUILD_ROOT%{htmldir}/index.py
5a6752e
install -d $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/
5a6752e
cat > $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/yawn.conf << EOS
5a6752e
Alias /yawn /var/www/yawn
5a6752e
5a6752e
<Location /yawn>
5a6752e
    Order deny,allow
5a6752e
    Deny from all
5a6752e
    Allow from 127.0.0.1
5a6752e
    Allow from ::1
5a6752e
    # Allow from .example.com
5a6752e
</Location>
5a6752e
5a6752e
<Directory /var/www/yawn>
5a6752e
    SetHandler mod_python
5a6752e
    PythonHandler mod_python.publisher
5a6752e
    PythonDebug On
5a6752e
</Directory>
5a6752e
EOS
5a6752e
5a6752e
%clean
5a6752e
rm -rf $RPM_BUILD_ROOT
5a6752e
5a6752e
%post 
5a6752e
/bin/systemctl try-restart httpd.service >/dev/null 2>&1 || :
5a6752e
5a6752e
%files
5a6752e
%defattr(-,root,root,-)
5a6752e
%{htmldir}
5a6752e
%config(noreplace) %{apacheconfdir}/conf.d/yawn.conf
5a6752e
5a6752e
%changelog
dc9823a
* Tue Mar 13 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0-0.3.20120227svn561
dc9823a
- Fix Pickle method sets Content-type: text/plain instead of text/html
dc9823a
  (patch by Jan Safranek, jsafrane@redhat.com)
dc9823a
  Resolves: #802683
dc9823a
5a6752e
* Tue Feb 28 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0-0.2.20120227svn561
5a6752e
- Fix twice listed files
5a6752e
5a6752e
* Mon Feb 27 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0-0.1.20120227svn561
5a6752e
- Remove obsolete BuildRoot tag, use systemctl instead of service, own htmldir,
5a6752e
  fix source and version
5a6752e
5a6752e
* Thu Feb 23 2012 Vitezslav Crhonek <vcrhonek@redhat.com>
5a6752e
- Change htmldir, fix license
5a6752e
5a6752e
* Wed Jan 25 2012 Vitezslav Crhonek <vcrhonek@redhat.com>
5a6752e
- Initial build for Fedora