+# TODO
+# - add codepress (http://codepress.org/index.php) patch
Summary: phpMyAdmin - web-based MySQL administration
Summary(pl.UTF-8): phpMyAdmin - administracja bazami MySQL przez WWW
Name: phpMyAdmin
-Version: 2.11.4
-Release: 2
+Version: 3.3.1
+Release: 1
License: GPL v2
Group: Applications/Databases/Interfaces
Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-all-languages.tar.bz2
-# Source0-md5: 0b6d797a0c14a015d19b94e839f48d1b
+# Source0-md5: f4f9b7b8398bfaaa7235e01cc0a89a79
Source1: %{name}.conf
+Source2: %{name}-lighttpd.conf
Patch0: %{name}-config.patch
+Patch1: %{name}-ServerSelectDisplayName.patch
+Patch2: %{name}-ServerSelectDisplayName-config.patch
URL: http://www.phpmyadmin.net/
BuildRequires: rpmbuild(macros) >= 1.268
Requires(triggerpostun): sed >= 4.0
-Requires: php(ctype)
-Requires: php(mcrypt)
-Requires: php(mbstring)
-Requires: php(mysql)
-Requires: php(pcre)
+Requires: php-common >= 4:5.2
+Requires: php-ctype
+Requires: php-mbstring
+Requires: php-mcrypt
+Requires: php-mysql
+Requires: php-pcre
+Requires: php-session
Requires: webapps
Requires: webserver(access)
-Requires: webserver(php)
+Requires: webserver(alias)
+Suggests: php-mysqli
+Suggests: webserver(indexfile)
+Suggests: webserver(php)
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q -n %{name}-%{version}-all-languages
%patch0 -p1
+%patch1 -p0
+%patch2 -p0
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{js,lang,libraries/{auth,dbg,dbi,engines,export,tcpdf/font,import,transformations}}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{js,lang,libraries/{auth/swekey,dbg,dbi,engines,export,tcpdf/font,import,transformations}}}
install *.php *.html *.css $RPM_BUILD_ROOT%{_appdir}
install lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang
cp -rf pmd $RPM_BUILD_ROOT%{_appdir}
cp -rf themes $RPM_BUILD_ROOT%{_appdir}
-install js/* $RPM_BUILD_ROOT%{_appdir}/js
+cp -rf js $RPM_BUILD_ROOT%{_appdir}
install libraries/*.php $RPM_BUILD_ROOT%{_appdir}/libraries
install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth
+install libraries/auth/swekey/*.{php,crt} $RPM_BUILD_ROOT%{_appdir}/libraries/auth/swekey
install libraries/dbg/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbg
install libraries/dbi/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbi
install libraries/engines/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/engines
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
-cp -f libraries/tcpdf/README{,-tcpdf}
cp -f libraries/import/README{,-import}
cp -f libraries/transformations/README{,-transformations}
%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
+%triggerin -- lighttpd
+%webapp_register lighttpd %{_webapp}
+
+%triggerun -- lighttpd
+%webapp_unregister lighttpd %{_webapp}
+
%files
%defattr(644,root,root,755)
-%doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts libraries/tcpdf/README-tcpdf libraries/import/README-import libraries/transformations/README-transformations libraries/transformations/TEMPLATE* libraries/transformations/*.sh lang/*.sh
+%doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts libraries/import/README-import libraries/transformations/README-transformations libraries/transformations/TEMPLATE* libraries/transformations/*.sh lang/*.sh
%dir %attr(750,root,http) %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
%dir %{_appdir}
%{_appdir}/js