%define rname phpMyAdmin Summary: Handles the administration of MySQL over the web Name: phpmyadmin Version: 2.11.5 Release: %mkrel 1 License: GPL Group: System/Servers URL: http://www.phpmyadmin.net/ Source0: http://prdownloads.sourceforge.net/phpmyadmin/%{rname}-%{version}-all-languages.tar.gz Source10: http://prdownloads.sourceforge.net/phpmyadmin/aqua-2.2a.tar.bz2 Source11: http://prdownloads.sourceforge.net/phpmyadmin/arctic_ocean-2.2a.tar.bz2 Source12: http://prdownloads.sourceforge.net/phpmyadmin/paradice-2.2a.tar.bz2 Source13: http://prdownloads.sourceforge.net/phpmyadmin/xp_basic-2.1.tar.bz2 Patch0: phpMyAdmin-use-cookie-in-config.diff Patch1: phpMyAdmin-2.8.2.1-bug23847.diff Patch2: phpMyAdmin-bug22020.diff Requires(pre): apache-mod_php php-mysql php-mbstring php-mcrypt Requires: apache-mod_php php-mysql php-mbstring php-mcrypt Requires(post): rpm-helper Requires(postun): rpm-helper BuildArch: noarch BuildRequires: ImageMagick BuildRequires: apache-base >= 2.0.54 BuildRoot: %{_tmppath}/%{name}-buildroot Obsoletes: phpMyAdmin Conflicts: phpMyAdmin # Macro for generating an environment variable (%1) with %2 random characters %define randstr() %1=`perl -e 'for ($i = 0, $bit = "!", $key = ""; $i < %2; $i++) {while ($bit !~ /^[0-9A-Za-z]$/) { $bit = chr(rand(90) + 32); } $key .= $bit; $bit = "!"; } print "$key";'` %description phpMyAdmin is intended to handle the administration of MySQL over the web. Currently it can : create and drop databases, create, copy, drop and alter tables, delete, edit and add fields, execute any SQL-statement, even batch-queries, manage keys on fields, load text files into tables, create and read dumps of tables, export data to CSV value, administer multiple servers and single databases. %prep %setup -q -n %{rname}-%{version}-all-languages %patch0 -p0 %patch1 -p1 %patch2 -p1 pushd themes for i in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13}; do tar -jxf $i done popd # strip away annoying ^M find -type f | grep -v "\.gif" | grep -v "\.png" | grep -v "\.jpg" | grep -v "\.z" | xargs %{__perl} -pi -e 's/\r$//g' %build %install rm -rf %{buildroot} export DONT_RELINK=1 install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}/var/www/%{name} cp -aRf * %{buildroot}/var/www/%{name}/ # cleanup pushd %{buildroot}/var/www/%{name} rm -f CREDITS ChangeLog Documentation.txt INSTALL LICENSE README RELEASE-DATE-* TODO rm -rf scripts rm -f lang/*.sh libraries/transformations/*.sh find -name "\.htaccess" | xargs rm -f popd # fix config file location mv %{buildroot}/var/www/%{name}/libraries/config.default.php %{buildroot}%{_sysconfdir}/%{name}/ ln -s %{_sysconfdir}/%{name}/config.default.php %{buildroot}/var/www/%{name}/libraries/config.default.php cat > README.urpmi << EOF The config file name has changed name from config.inc.php to config.default.php. From 2.8.0 the file moved into libraries/ Now the file is put in /etc/phpMyAdmin/config.default.php and softlinked to /var/www/%{name}/libraries/config.default.php EOF cat > %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf << EOF Alias /%{name} /var/www/%{name} <IfModule mod_php4.c> php_flag session.auto_start 0 </IfModule> <IfModule mod_php5.c> php_flag session.auto_start 0 </IfModule> <Directory /var/www/%{name}> Allow from All </Directory> <Directory /var/www/%{name}/libraries> Order Deny,Allow Deny from All Allow from None </Directory> # Uncomment the following lines to force a redirect to a working # SSL aware apache server. This serves as an example. # #<IfModule mod_ssl.c> # <LocationMatch /%{name}> # Options FollowSymLinks # RewriteEngine on # RewriteCond %{SERVER_PORT} !^443$ # RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] # </LocationMatch> #</IfModule> EOF # Mandriva Icons install -d %{buildroot}%{_iconsdir} install -d %{buildroot}%{_miconsdir} install -d %{buildroot}%{_liconsdir} convert themes/original/img/logo_right.png -resize 16x16 %{buildroot}%{_miconsdir}/%{name}.png convert themes/original/img/logo_right.png -resize 32x32 %{buildroot}%{_iconsdir}/%{name}.png convert themes/original/img/logo_right.png -resize 48x48 %{buildroot}%{_liconsdir}/%{name}.png # install menu entry. # XDG menu install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=phpMyAdmin Comment=%{summary} Exec=%{_bindir}/www-browser http://localhost/%{name}/ Icon=%{name} Terminal=false Type=Application Categories=X-MandrivaLinux-MoreApplications-Databases; EOF %post %randstr BLOWFISH 8 BLOWFISH=`echo -n $BLOWFISH | md5sum | awk '{print $1}'` perl -pi -e "s|_BLOWFISH_SECRET_|$BLOWFISH|g" %{_sysconfdir}/%{name}/config.default.php %_post_webapp %update_menus %postun %_postun_webapp %clean_menus %clean rm -rf %{buildroot} %files %defattr(0644,root,root,0755) %doc CREDITS ChangeLog Documentation.txt INSTALL LICENSE README RELEASE-DATE-* TODO scripts README.urpmi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf %dir %attr(0755,root,root) %{_sysconfdir}/%{name} %attr(0640,apache,root) %config(noreplace) %{_sysconfdir}/%{name}/config.default.php /var/www/%{name} %{_iconsdir}/%{name}.png %{_miconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_datadir}/applications/*.desktop %changelog * Sun Mar 02 2008 Funda Wang <fundawang@mandriva.org> 2.11.5-1mdv2008.1 + Revision: 177599 - update to new version 2.11.5 * Sat Jan 12 2008 Funda Wang <fundawang@mandriva.org> 2.11.4-1mdv2008.1 + Revision: 149733 - update to new version 2.11.4 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sun Dec 09 2007 Funda Wang <fundawang@mandriva.org> 2.11.3-1mdv2008.1 + Revision: 116630 - update to new version 2.11.3 * Wed Nov 21 2007 Oden Eriksson <oeriksson@mandriva.com> 2.11.2.2-1mdv2008.1 + Revision: 110949 - 2.11.2.2 (Minor security fixes) * Sun Nov 11 2007 Oden Eriksson <oeriksson@mandriva.com> 2.11.2.1-1mdv2008.1 + Revision: 107531 - 2.11.2.1 * Sat Oct 27 2007 Funda Wang <fundawang@mandriva.org> 2.11.2-1mdv2008.1 + Revision: 102583 - update to new version 2.11.2 * Thu Oct 18 2007 Oden Eriksson <oeriksson@mandriva.com> 2.11.1.2-1mdv2008.1 + Revision: 99939 - 2.11.1.2 fixes the following issues: CVE-2007-0095, CVE-2007-0203, CVE-2007-0204, CVE-2007-1325, CVE-2007-1395, CVE-2007-2245, CVE-2007-4306, CVE-2007-5386 * Tue Oct 16 2007 Oden Eriksson <oeriksson@mandriva.com> 2.11.1.1-1mdv2008.1 + Revision: 99007 - 2.11.1.1 (Minor security fixes) * Thu Oct 11 2007 Oden Eriksson <oeriksson@mandriva.com> 2.11.1-1mdv2008.1 + Revision: 97001 - 2.11.1 + Nicolas Lécureuil <neoclust@mandriva.org> - Fix Exec command Remove old menu entry * Wed Aug 22 2007 Funda Wang <fundawang@mandriva.org> 2.11.0-1mdv2008.0 + Revision: 68871 - New version 2.11.0 - Rediff patch0 (config) * Fri Jul 20 2007 Funda Wang <fundawang@mandriva.org> 2.10.3-1mdv2008.0 + Revision: 53916 - New version * Sat Jun 16 2007 Oden Eriksson <oeriksson@mandriva.com> 2.10.2-1mdv2008.0 + Revision: 40253 - 2.10.2 * Tue Apr 24 2007 David Walluck <walluck@mandriva.org> 2.10.1-1mdv2008.0 + Revision: 17770 - 2.10.1 * Mon Apr 23 2007 Oden Eriksson <oeriksson@mandriva.com> 2.10.0.2-3mdv2008.0 + Revision: 17325 - remove the desktop-file-utils deps * Fri Mar 09 2007 Jérôme Soyer <saispo@mandriva.org> 2.10.0.2-2mdv2007.1 + Revision: 140267 - Add Obsoletes and Conflicts + Anssi Hannula <anssi@mandriva.org> - fix typo in summary * Sat Mar 03 2007 David Walluck <walluck@mandriva.org> 2.10.0.2-1mdv2007.1 + Revision: 131733 - 2.10.0.2 rediff cookie patch fix summary and longtitle grammar + Jérôme Soyer <saispo@mandriva.org> - Lowercase - Lowercase * Sun Feb 18 2007 Nicolas Lécureuil <neoclust@mandriva.org> 2.9.2-3mdv2007.1 + Revision: 122574 - Fix typo found by berthy * Sun Feb 18 2007 Nicolas Lécureuil <neoclust@mandriva.org> 2.9.2-2mdv2007.1 + Revision: 122570 - Fix typo found by berthy * Wed Jan 17 2007 Oden Eriksson <oeriksson@mandriva.com> 2.9.2-1mdv2007.1 + Revision: 109858 - rediffed P0 - 2.9.2 (security fixes) - make it backportable - ccp is not used anymore, so don't mention it in README.urpmi * Sun Dec 10 2006 Oden Eriksson <oeriksson@mandriva.com> 2.9.1.1-2mdv2007.1 + Revision: 94448 - don't use ccp for this package (http://savannah.nongnu.org/bugs/?16373) * Mon Nov 20 2006 David Walluck <walluck@mandriva.org> 2.9.1.1-1mdv2007.1 + Revision: 85673 - 2.9.1.1 * Thu Nov 09 2006 David Walluck <walluck@mandriva.org> 2.9.1-1mdv2007.0 + Revision: 79881 - 2.9.1 * Thu Nov 02 2006 David Walluck <walluck@mandriva.org> 2.9.0.3-1mdv2007.1 + Revision: 75100 - Requires(post,postun): rpm-helper - 2.9.0.3 + Oden Eriksson <oeriksson@mandriva.com> - bzip2 cleanup - 2.9.0.2 - rediffed the bug22020 patch - Import phpMyAdmin