Blob Blame History Raw
Name:		php-layers-menu
Version:	3.2.0
Release:	0.2.rc%{?dist}
Summary:	Hierarchical PHP based DHTML menu system
Group:		Applications/Internet
License:	LGPLv2+
URL:		http://phplayersmenu.sourceforge.net/index.php
Source0:	http://switch.dl.sourceforge.net/project/phplayersmenu/phplayersmenu-devel/%{version}-rc/phplayersmenu-%{version}-rc.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
Requires:	php-pear(HTML_Template_PHPLIB)

%description
This is a hierarchical menu system to prepare on the fly DHTML menus 
relying on the PHP scripting engine for the processing of data items.
It supports a wide range of browsers: Mozilla, Konqueror, Netscape, 
Safari, Opera, Internet Explorer; rather old browser versions are 
supported as well; accessibility is provided for text-only browsers.

%prep
%setup -q -n phplayersmenu-%{version}
mkdir tmp
for lang in THEMES/*; do
tar xzvf $lang -C tmp
mv tmp/images/* menuimages/
done
rm -f index.php
rm -rf tmp/

cat <<EOF >README.fedora

This Fedora packaged version of PHP layers menu uses the PEAR port
of PHPLIB.php (HTML_Template_PHPLIB). The bundled version has been
removed so you need to use /usr/share/pear/HTML/Template/PHPLIB.php
as the include path.

EOF

rm -f CHANGE_TEMPLATE_CLASS_NAME.sh
rm -f lib/PHPLIB.php
mkdir docs
mv PATCHES LOGOS DUMPS docs/
find . -type f -name 'example-*' -print0 | xargs -0 sed -i "s:$myDirPath \. 'lib/PHPLIB.php':'/usr/share/pear/HTML/Template/PHPLIB.php':"
find . -type f -name 'demo*' -print0 | xargs -0 sed -i "s:$myDirPath \. 'lib/PHPLIB.php':'/usr/share/pear/HTML/Template/PHPLIB.php':"
mv example-* docs/
mv examples-* docs/
mv demo.* docs/
iconv -f iso8859-1 -t utf-8 ACKNOWLEDGEMENTS > ACKNOWLEDGEMENTS.conv && mv -f ACKNOWLEDGEMENTS.conv ACKNOWLEDGEMENTS
mv ACKNOWLEDGEMENTS README.PHPDOC TODO docs/
mv README.fedora LICENSE COPYING CHANGELOG README.ihtml docs/


%build


%install
rm -rf $RPM_BUILD_ROOT
install -p -d $RPM_BUILD_ROOT%{_datadir}/php/%{name}
cp -r * $RPM_BUILD_ROOT%{_datadir}/php/%{name}
rm -rf $RPM_BUILD_ROOT%{_datadir}/php/%{name}/docs
rm -rf $RPM_BUILD_ROOT%{_datadir}/php/%{name}/THEMES

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc docs/ 
%{_datadir}/php/%{name}


%changelog
* Mon Jul 27 2009 Andrew Colin Kissa <andrew@topdog.za.net> - 3.2.0-0.2.rc
- Change the install dir to meet packaging guidelines
- Correct the licence tag
- Unbundle PHPLIB.php

* Thu Jul 23 2009 Andrew Colin Kissa <andrew@topdog.za.net> - 3.2.0-0.1.rc
- Initial packaging