Name: phpMyAdmin License: GPL Group: Applications/Networking Version: 2.9.0.1 Release: 1.%{mysig} Source0: %{name}-%{version}.tar.bz2 Source1: %{name}-httpd.conf URL: http://www.phpmyadmin.net BuildRoot: %{_tmppath}/%{name}-root Summary: Adminstration of MySQL over the Web. BuildArch: noarch Requires: httpd php php-mysql perl BuildPreReq: perl # we have nothing to auto-req-provides in this PHP code AutoReq: no %description phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the WWW. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields. %prep %setup -q -n %{name}-%{version} %build find . -type d -name CVS -exec rm -rf {} \; 2> /dev/null || : find . -type f -name .cvsignore -exec rm -f {} \; # fix the path perl -pi -e 's@/usr/local/bin/perl@/usr/bin/perl@' scripts/convertcfg.pl %install [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name} mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf cp -a . $RPM_BUILD_ROOT%{_datadir}/%{name} # documentation will be placed to /usr/share/doc pushd $RPM_BUILD_ROOT%{_datadir}/%{name} for i in CREDITS ChangeLog Documentation.html Documentation.txt INSTALL LICENSE README TODO RELEASE-DATE-%{version}-pl2; do rm -f $i done # to reach documentation via HTTP we use symlinks for i in ChangeLog Documentation.html LICENSE README; do ln -s ../doc/phpMyAdmin-%{version}/$i $i done popd # move config files to /etc/phpMyAdmin directory and use symbolic link mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} pushd $RPM_BUILD_ROOT/%{_datadir}/%{name} cp -a libraries/config.default.php $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/config.inc.php ln -s ../../..%{_sysconfdir}/%{name}/config.inc.php # empty includes for custom header and footer for i in config.header.inc.php config.footer.inc.php; do touch $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/$i ln -s ../../..%{_sysconfdir}/%{name}/$i done popd %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc CREDITS Documentation.html Documentation.txt ChangeLog INSTALL %doc LICENSE README TODO RELEASE-DATE-%{version} %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/config.inc.php %config(noreplace) %{_sysconfdir}/%{name}/config.header.inc.php %config(noreplace) %{_sysconfdir}/%{name}/config.footer.inc.php %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %{_datadir}/%{name} %changelog * Tue Oct 03 2006 Milan Kerslager 2.9.0.1-1.ker.rhel4 - update * Tue Apr 04 2006 Milan Kerslager 2.8.0.2-0.2.ker.rhel4 - totally broken configuration fixed * Fri Mar 31 2006 Milan Kerslager 2.8.0.2-0.1.ker.rhel4 - update * Mon Feb 27 2006 Milan Kerslager 2.7.0-0.pl2.ker.rhel4 - update * Fri Dec 10 2004 Milan Kerslager 2.6.0-1.pl3 - update * Mon Jul 26 2004 Milan Kerslager 2.5.7-1.pl1 - updated to the latest release - fix unreachable documentation files * Sun Jan 04 2004 Milan Kerslager 2.5.5-0.3.pl1 - move config file to /etc/phpMyAdmin - provide original as /etc/phpMyAdmin/config.inc.php-dist - make config file as %config(noreplace) * Sun Jan 04 2004 Milan Kerslager 2.5.5-0.1.pl1 - updated release * Tue May 13 2003 Milan Kerslager - initial release