%global htmldir /var/www/yawn
%global apacheconfdir /etc/httpd
%global svnrev 561
Name: yawn
Version: 0
Release: 0.1.20120227svn%{svnrev}%{?dist}
Summary: Yet Another WBEM Navigator
Group: Applications/System
License: GPLv2
URL: https://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN
# The source for this package was pulled from upstream's vcs. Use the
# following command to get the file:
# wget http://pywbem.svn.sourceforge.net/viewvc/pywbem/yawn/trunk/yawn.py
Source0: yawn.py
BuildRequires: httpd
Requires: mod_python, pywbem, httpd
BuildArch: noarch
%description
Web-based CIM/WBEM browser
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{htmldir}
install %{SOURCE0} $RPM_BUILD_ROOT%{htmldir}/index.py
install -d $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/
cat > $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/yawn.conf << EOS
Alias /yawn /var/www/yawn
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
# Allow from .example.com
SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
EOS
%clean
rm -rf $RPM_BUILD_ROOT
%post
/bin/systemctl try-restart httpd.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%{htmldir}
%{htmldir}/index.py*
%config(noreplace) %{apacheconfdir}/conf.d/yawn.conf
%changelog
* Mon Feb 27 2012 Vitezslav Crhonek - 0-0.1.20120227svn561
- Remove obsolete BuildRoot tag, use systemctl instead of service, own htmldir,
fix source and version
* Thu Feb 23 2012 Vitezslav Crhonek
- Change htmldir, fix license
* Wed Jan 25 2012 Vitezslav Crhonek
- Initial build for Fedora