Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > 615af813259a441af7a6839b1d53e094 > files > 7

phpmyadmin-3.3.2-2mdv2010.1.src.rpm

%define rname phpMyAdmin

%define betaver 0
%define rel 2

%if %betaver
%define tarballver %version-%betaver
%define release %mkrel -c %betaver %rel
%else
%define tarballver %version
%define release %mkrel %rel
%endif

Summary:        Handles the administration of MySQL over the web
Name:           phpmyadmin
Version:        3.3.2
Release:        %release
License:        GPLv2
Group:          System/Servers
URL:            http://www.phpmyadmin.net/
Source0:        http://prdownloads.sourceforge.net/phpmyadmin/%{rname}-%{tarballver}-all-languages.tar.bz2
Source10:       http://prdownloads.sourceforge.net/phpmyadmin/aqua-2.2a.tar.bz2
Source11:       http://prdownloads.sourceforge.net/phpmyadmin/arctic_ocean-2.11a.tar.bz2
Source12:       http://prdownloads.sourceforge.net/phpmyadmin/paradice-2.10a.tar.bz2
Source13:       http://prdownloads.sourceforge.net/phpmyadmin/xp_basic-2.1.tar.bz2
Patch2:         phpMyAdmin-bug22020.diff
Patch3:		phpMyAdmin-bug59446.diff
Requires:       apache-mod_php
Requires:       php-mysql
Requires:       php-mbstring
Requires:       php-mcrypt
%if %mdkversion < 201010
Requires(post):   rpm-helper
Requires(postun):   rpm-helper
%endif
BuildArch:      noarch
BuildRequires:  ImageMagick
BuildRoot:	%{_tmppath}/%{name}-%{version}

%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}-%{tarballver}-all-languages
%patch2 -p1
%patch3 -p1

pushd themes
for i in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13}; do
    tar -jxf $i
done
popd

%build

%install
rm -rf %{buildroot}

export DONT_RELINK=1
 
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 
    rm -f README.VENDOR RELEASE-DATE-* TODO
    rm -rf scripts
    rm -rf contrib
    rm -f lang/*.sh libraries/transformations/*.sh
    find -name "\.htaccess" | xargs rm -f
popd

# fix config file location
mv %{buildroot}/var/www/%{name}/config.sample.inc.php \
    %{buildroot}%{_sysconfdir}/%{name}/config.php
pushd  %{buildroot}/var/www/%{name}
ln -s ../../..%{_sysconfdir}/%{name}/config.php config.inc.php
popd
chmod 640 %{buildroot}%{_sysconfdir}/%{name}/config.php

cat > README.urpmi << EOF
The actual configuration file is /etc/phpmyadmin/config.php.
The config.default.inc.php file contains default values, and is not supposed to 
be modified.
EOF

install -d -m 755 %{buildroot}%{webappconfdir}
cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF
Alias /%{name} /var/www/%{name}

<Directory /var/www/%{name}>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    ErrorDocument 403 "Access denied per %{webappconfdir}/%{name}.conf"

    php_flag session.auto_start 0
</Directory>

<Directory /var/www/%{name}/libraries>
    Order deny,allow
    Deny from all
</Directory>
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

%pretrans 
# fix configuration file name change
if [ -f %{_sysconfdir}/phpmyadmin/config.default.php ]; then
    mv %{_sysconfdir}/phpmyadmin/config.default.php \
        %{_sysconfdir}/phpmyadmin/config.php
fi
if [ -L /var/www/phpmyadmin/libraries/config.default.php ]; then
    rm -f /var/www/phpmyadmin/libraries/config.default.php
fi

%post
# generate random secret
secret=%_get_password 46

# blowfish secret
perl -pi \
    -e "s|\\\$cfg\\['blowfish_secret'\\] = ''|\\\$cfg\\['blowfish_secret'\\] = '$secret'|" \
    %{_sysconfdir}/%{name}/config.php

%if %mdkversion < 201010
%_post_webapp
%endif
%if %mdkversion < 200900
%update_menus
%endif

%postun
%if %mdkversion < 201010
%_postun_webapp
%endif
%if %mdkversion < 200900
%clean_menus
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CREDITS ChangeLog Documentation.txt INSTALL LICENSE README RELEASE-DATE-* TODO scripts README.urpmi 
%config(noreplace) %{webappconfdir}/%{name}.conf
%dir %{_sysconfdir}/%{name}
%attr(-,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php
/var/www/%{name}
%attr(755,root,root) /var/www/%{name}/themes
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_datadir}/applications/*.desktop


%changelog
* Tue May 25 2010 Juan Luis Baptiste <juancho@mandriva.org> 3.3.2-2mdv2010.1
+ Revision: 545836
- Added patch to fix bug 59446: phpmyadmin shows utf8_bin fields in hex format.
- Fixed bug #58925, 600 permissions of theme directory.

* Mon Apr 19 2010 Funda Wang <fwang@mandriva.org> 3.3.2-1mdv2010.1
+ Revision: 536687
- update to new version 3.3.2

* Tue Mar 16 2010 Funda Wang <fwang@mandriva.org> 3.3.1-1mdv2010.1
+ Revision: 522548
- update to new version 3.3.1

* Mon Mar 08 2010 Funda Wang <fwang@mandriva.org> 3.3.0-1mdv2010.1
+ Revision: 515959
- update to new version 3.3.0

* Sun Feb 07 2010 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.5-5mdv2010.1
+ Revision: 501777
- oops, fix typo in apache configuration
- switch default access policy to 'open to localhost only', as it allows to modify server state

* Sun Feb 07 2010 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.5-3mdv2010.1
+ Revision: 501772
- simplify apache configuration, as php4 is dead

* Sun Feb 07 2010 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.5-2mdv2010.1
+ Revision: 501756
- rely on filetrigger for reloading apache configuration begining with 2010.1, rpm-helper macros otherwise

* Mon Jan 11 2010 Funda Wang <fwang@mandriva.org> 3.2.5-1mdv2010.1
+ Revision: 489621
- new version 3.2.5

  + Buchan Milne <bgmilne@mandriva.org>
    - Suggest php-bz2 and apache-mod_ssl (bug #56870)

* Thu Dec 03 2009 Funda Wang <fwang@mandriva.org> 3.2.4-1mdv2010.1
+ Revision: 472781
- new version 3.2.4

* Fri Nov 06 2009 Frederik Himpe <fhimpe@mandriva.org> 3.2.3-1mdv2010.1
+ Revision: 461952
- update to new version 3.2.3

* Tue Oct 13 2009 Oden Eriksson <oeriksson@mandriva.com> 3.2.2.1-1mdv2010.0
+ Revision: 457007
- 3.2.2.1 (This is a security release, fixing some XSS and SQL injection problems.)

* Sun Sep 13 2009 Frederik Himpe <fhimpe@mandriva.org> 3.2.2-1mdv2010.0
+ Revision: 438699
- update to new version 3.2.2

* Mon Aug 10 2009 Frederik Himpe <fhimpe@mandriva.org> 3.2.1-1mdv2010.0
+ Revision: 414366
- update to new version 3.2.1

* Tue Jun 30 2009 Frederik Himpe <fhimpe@mandriva.org> 3.2.0.1-1mdv2010.0
+ Revision: 391088
- update to new version 3.2.0.1

* Mon Jun 15 2009 Frederik Himpe <fhimpe@mandriva.org> 3.2.0-1mdv2010.0
+ Revision: 386104
- update to new version 3.2.0

* Fri May 15 2009 Frederik Himpe <fhimpe@mandriva.org> 3.1.5-1mdv2010.0
+ Revision: 376271
- update to new version 3.1.5

* Sat May 02 2009 Frederik Himpe <fhimpe@mandriva.org> 3.1.4-1mdv2010.0
+ Revision: 370738
- update to new version 3.1.4

* Wed Apr 15 2009 Oden Eriksson <oeriksson@mandriva.com> 3.1.3.2-1mdv2009.1
+ Revision: 367358
- 3.1.3.2 (security fixes)

* Wed Mar 25 2009 Frederik Himpe <fhimpe@mandriva.org> 3.1.3.1-1mdv2009.1
+ Revision: 361175
- update to new version 3.1.3.1

* Thu Mar 05 2009 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.3-2mdv2009.1
+ Revision: 349001
- handle upgrade nicely
- fix config file substitution after install
- cleanup: apache only need read access on configuration file, not write
- no need for a patch to substitute a config file
- use standard rpm-helper macros to generate blowfish secret
- don't move the default configuration file, it is not supposed to be modified, but move the actuel configuration file instead
- more docroot cleanup
- don't duplicate spec-help job

* Tue Mar 03 2009 Oden Eriksson <oeriksson@mandriva.com> 3.1.3-1mdv2009.1
+ Revision: 348169
- 3.1.3

* Tue Jan 20 2009 Funda Wang <fwang@mandriva.org> 3.1.2-1mdv2009.1
+ Revision: 331514
- rediff css patch
- 3.1.2

* Wed Dec 10 2008 Funda Wang <fwang@mandriva.org> 3.1.1-1mdv2009.1
+ Revision: 312383
- update to new version 3.1.1

* Sat Nov 29 2008 Funda Wang <fwang@mandriva.org> 3.1.0-1mdv2009.1
+ Revision: 307960
- 3.1.0 final

* Wed Nov 19 2008 Funda Wang <fwang@mandriva.org> 3.1.0-0.rc1.1mdv2009.1
+ Revision: 304372
- New version 3.1.0 rc1
- rediff cookie patch

* Fri Oct 31 2008 Frederik Himpe <fhimpe@mandriva.org> 3.0.1.1-1mdv2009.1
+ Revision: 299008
- update to new version 3.0.1.1

* Fri Oct 24 2008 Funda Wang <fwang@mandriva.org> 3.0.1-1mdv2009.1
+ Revision: 296907
- new version 3.0.1 final

* Sun Oct 19 2008 Funda Wang <fwang@mandriva.org> 3.0.1-0.rc1.1mdv2009.1
+ Revision: 295281
- 3.0.1 rc1

* Sun Sep 28 2008 Funda Wang <fwang@mandriva.org> 3.0.0-1mdv2009.0
+ Revision: 288968
- New version 3.0.0 final

* Tue Sep 16 2008 Funda Wang <fwang@mandriva.org> 3.0.0-0.rc2.1mdv2009.0
+ Revision: 285104
- 3.0 rc2

* Sat Sep 13 2008 Oden Eriksson <oeriksson@mandriva.com> 3.0.0-0.rc1.2mdv2009.0
+ Revision: 284499
- fix #35792 (Wrong config file location mentioned in urpmi readme file)

* Mon Sep 08 2008 Funda Wang <fwang@mandriva.org> 3.0.0-0.rc1.1mdv2009.0
+ Revision: 282440
- 3.0.0 rc1

* Sat Aug 23 2008 Funda Wang <fwang@mandriva.org> 3.0.0-0.beta.1mdv2009.0
+ Revision: 275351
- New version 3.0.0 beta

* Tue Jul 29 2008 Funda Wang <fwang@mandriva.org> 2.11.8.1-1mdv2009.0
+ Revision: 252408
- New version 2.11.8.1
- clearify the license

* Mon Jul 28 2008 Oden Eriksson <oeriksson@mandriva.com> 2.11.8-1mdv2009.0
+ Revision: 251707
- 2.11.8

* Wed Jul 16 2008 Funda Wang <fwang@mandriva.org> 2.11.7.1-1mdv2009.0
+ Revision: 236237
- update to new version 2.11.7.1

* Tue Jun 24 2008 Funda Wang <fwang@mandriva.org> 2.11.7-1mdv2009.0
+ Revision: 228492
- New version 2.11.7 final

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Wed Jun 11 2008 Funda Wang <fwang@mandriva.org> 2.11.7-0.rc1.1mdv2009.0
+ Revision: 217837
- New version 2.11.7 rc1

* Wed Apr 30 2008 Funda Wang <fwang@mandriva.org> 2.11.6-1mdv2009.0
+ Revision: 199365
- update to new version 2.11.6

* Fri Apr 25 2008 Funda Wang <fwang@mandriva.org> 2.11.5.2-1mdv2009.0
+ Revision: 197369
- update to new version 2.11.5.2

* Wed Apr 16 2008 Funda Wang <fwang@mandriva.org> 2.11.5.1-1mdv2009.0
+ Revision: 194528
- update to new version 2.11.5.1

* Sun Mar 02 2008 Funda Wang <fwang@mandriva.org> 2.11.5-1mdv2008.1
+ Revision: 177599
- update to new version 2.11.5

* Sat Jan 12 2008 Funda Wang <fwang@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 <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Dec 09 2007 Funda Wang <fwang@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 <fwang@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 <nlecureuil@mandriva.com>
    - Fix Exec command
      Remove old menu entry

* Wed Aug 22 2007 Funda Wang <fwang@mandriva.org> 2.11.0-1mdv2008.0
+ Revision: 68871
- New version 2.11.0
- Rediff patch0 (config)

* Fri Jul 20 2007 Funda Wang <fwang@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