%undefine __find_provides %undefine __find_requires Summary: Open79XX XML Directory Name: open79xx Version: 1.2 Release: %mkrel 1 License: GPL Group: System/Servers #URL: http://sourceforge.net/projects/open79xxdir #Source0: http://prdownloads.sourceforge.net/open79xxdir/openxmldir_%{version}.tar.gz URL: http://www.automated.it/open79xx/ Source0: http://www.automated.it/open79xx/new_open79xx.tar.bz2 Requires(pre): apache-conf >= 2.0.54 Requires(pre): apache-mpm-prefork >= 2.0.54 Requires(pre): apache-mod_php php-mysql asterisk-chan_sccp Requires: apache-mod_php php-mysql asterisk-chan_sccp BuildArch: noarch BuildRequires: dos2unix BuildRoot: %{_tmppath}/%{name}-buildroot %description Open79XX XMLDirectory is an open PHP-based XML menuing system for providing on-screen services to the Cisco 79XX Series IP Phones. It contains dynamically generated phone directories, on-screen memos, links to other services, and many more options. %prep %setup -q -n new_open79xx # clean up CVS stuff for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -r $i; fi >&/dev/null done # fix dir perms find . -type d | xargs chmod 755 # fix file perms find . -type f | xargs chmod 644 # strip away annoying ^M find -type f | grep -v "\.gif" | grep -v "\.png" | grep -v "\.jpg" | xargs dos2unix -U # path fixes find -type f | xargs perl -pi -e "s|\.\./WebUI/modules/images/headerofficial\.gif|/%{name}/WebUI/modules/images/headerofficial\.gif|g" find -type f | xargs perl -pi -e "s|\"\.\./WebUI|\"/%{name}/WebUI|g" find -type f | xargs perl -pi -e "s|\"\./WebUI|\"/%{name}/WebUI|g" find -type f | xargs perl -pi -e "s|/\.\./\.\./\.\./WebUI/login\.php|/%{name}/WebUI/login\.php|g" %build %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d install -d %{buildroot}/var/www/%{name} cp -aRf * %{buildroot}/var/www/%{name}/ cat > %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf << EOF Alias /%{name} %{_var}/www/%{name} <Directory %{_var}/www/%{name}> Allow from All </Directory> EOF %post %_post_webapp %postun %_postun_webapp %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf /var/www/%{name} %changelog * Sun Feb 19 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2-1mdk - initial Mandriva package