X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=phpMyAdmin.spec;h=1f4c26b3378e3f0cfc8b902733e0ef1874058d6c;hb=01cd4cc6c3941e0d7d1396fb63a82749ed554295;hp=e1f47ccd63fab30bb114f51b6123fb5494f7b10a;hpb=200a877ccf2d5921d9517d40bf49f7ee24da9824;p=packages%2FphpMyAdmin.git diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index e1f47cc..1f4c26b 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -1,29 +1,40 @@ +# TODO +# - add codepress (http://codepress.org/index.php) patch Summary: phpMyAdmin - web-based MySQL administration -Summary(pl): phpMyAdmin - administracja bazami MySQL przez WWW +Summary(pl.UTF-8): phpMyAdmin - administracja bazami MySQL przez WWW Name: phpMyAdmin -Version: 2.6.4 -%define _pl pl4 -#Release: 1 -Release: 2.%{_pl}.1 +Version: 3.0.0 +Release: 1 License: GPL v2 Group: Applications/Databases/Interfaces -Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2 -# Source0-md5: a49885849bec79d35f6bdae73cdb813d -#Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2 +Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-all-languages.tar.bz2 +# Source0-md5: f14b23fa5065fdc1e1709c87bb2aad1d 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/ -Requires(postun): perl-base -Requires: php -Requires: php-mysql -Requires: php-pcre -Requires: webserver -#Suggests: php-mbstring +BuildRequires: rpmbuild(macros) >= 1.268 +Requires(triggerpostun): sed >= 4.0 +Requires: php(ctype) +Requires: php(mbstring) +Requires: php(mcrypt) +Requires: php(mysql) +Requires: php(pcre) +Requires: webapps +Requires: webserver(access) +Requires: webserver(alias) +Requires: webserver(php) +Suggests: php-mysqli +Suggests: webserver(indexfile) BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _myadmindir %{_datadir}/%{name} -%define _sysconfdir /etc/%{name} +%define _appdir %{_datadir}/%{name} +%define _webapps /etc/webapps +%define _webapp %{name} +%define _sysconfdir %{_webapps}/%{_webapp} %description phpMyAdmin can administer a whole MySQL-server (needs a super-user) @@ -40,114 +51,99 @@ manual. Currently phpMyAdmin can: - create (*) and read dumps of tables - export (*) and import data to CSV values - administer multiple servers and single databases -- communicate in more than 20 different languages - -%description -l pl -phpMyAdmin potrafi zarz±dzaæ ca³ymi bazami MySQL (potrzebne -uprawnienia superu¿ytkownika) jak i pojedynczymi bazami danych. -Potrzebny jest u¿ytkownik, który ma prawa zapisu/odczytu tylko tych -baz, którymi chcemy administrowaæ (wiêcej informacji w odpowiedniej -podrêcznika MySQL). Aktualnie phpMyAdmin potrafi: -- tworzyæ i usuwaæ bazy -- wykonywaæ create, copy, drop oraz alter na tabelach -- dodawaæ, usuwaæ i modyfikowaæ pola -- wykonywaæ dowolne zapytania SQL -- zarz±dzaæ kluczami na rekordach -- wczytywaæ tekst z plików do tabel -- obs³ugiwaæ ponad 20 jêzyków -- zarz±dzaæ wieloma serwerami i pojedynczymi bazami danych -- eksportowaæ i importowaæ dane do warto¶ci CSV -- tworzyæ i czytaæ zrzuty tabel +- check referencial integrity +- create complex queries automatically connecting required tables +- create PDF graphics of your database layout +- communicate in more than 50 different languages + +%description -l pl.UTF-8 +phpMyAdmin potrafi zarządzać całymi bazami MySQL (potrzebne +uprawnienia superużytkownika) jak i pojedynczymi bazami danych. +Potrzebny jest użytkownik, który ma prawa zapisu/odczytu tylko tych +baz, którymi chcemy administrować (więcej informacji w odpowiedniej +podręcznika MySQL). Aktualnie phpMyAdmin potrafi: +- tworzyć i usuwać bazy +- wykonywać create, copy, drop oraz alter na tabelach +- dodawać, usuwać i modyfikować pola +- wykonywać dowolne zapytania SQL +- zarządzać kluczami na rekordach +- wczytywać tekst z plików do tabel +- obsługiwać ponad 20 języków +- zarządzać wieloma serwerami i pojedynczymi bazami danych +- eksportować i importować dane do wartości CSV +- tworzyć i czytać zrzuty tabel %prep -#%setup -q -%setup -q -n %{name}-%{version}-%{_pl} -%patch -p1 +%setup -q -n %{name}-%{version}-all-languages +%patch0 -p1 +%patch1 -p0 +%patch2 -p0 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,libraries/{auth,export,dbg,dbi,transformations}} \ - $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd} +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{js,lang,libraries/{auth,dbg,dbi,engines,export,tcpdf/font,import,transformations}}} -install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir} -install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang -cp -rf themes $RPM_BUILD_ROOT%{_myadmindir} -install css/* $RPM_BUILD_ROOT%{_myadmindir}/css -install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries -install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth -install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export -install libraries/dbg/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbg -install libraries/dbi/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbi -install libraries/transformations/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/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} +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/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 libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export +install libraries/import/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/import +install libraries/tcpdf/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf +install libraries/tcpdf/font/*.{php,z} $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf/font +install libraries/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations -cp -rf scripts $RPM_BUILD_ROOT%{_myadmindir} +install libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php +ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php -install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir} -ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf +install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf -install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf +cp -f libraries/import/README{,-import} +cp -f libraries/transformations/README{,-transformations} %clean rm -rf $RPM_BUILD_ROOT -%post -if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then - echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi -elif [ -d /etc/httpd/httpd.conf ]; then - ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi -fi - -%preun -if [ "$1" = "0" ]; then - umask 027 - if [ -d /etc/httpd/httpd.conf ]; then - rm -f /etc/httpd/httpd.conf/99_%{name}.conf - else - grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \ - /etc/httpd/httpd.conf.tmp - mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf - fi - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi -fi - -%triggerpostun -- phpMyAdmin <= 2.5.3-2 -if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then - mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php -else - if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then - mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php - fi -fi -for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do - cp $i $i.backup - %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i - %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i - echo "File changed by trigger: $i (backup: $i.backup)" -done -if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 -fi +%triggerin -- apache1 < 1.3.37-3, apache1-base +%webapp_register apache %{_webapp} + +%triggerun -- apache1 < 1.3.37-3, apache1-base +%webapp_unregister apache %{_webapp} + +%triggerin -- apache < 2.2.0, apache-base +%webapp_register httpd %{_webapp} + +%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 -%dir %{_sysconfdir} -%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/* -%config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf -%dir %{_myadmindir} -%{_myadmindir}/css -%{_myadmindir}/themes -%{_myadmindir}/scripts -%{_myadmindir}/lang -%{_myadmindir}/libraries -%{_myadmindir}/*.css -%{_myadmindir}/*.html -%{_myadmindir}/*.php +%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 +%{_appdir}/lang +%{_appdir}/libraries +%{_appdir}/pmd +%{_appdir}/themes +%{_appdir}/*.css +%{_appdir}/*.html +%{_appdir}/*.php