1 Summary: phpMyAdmin - web-based MySQL administration
2 Summary(pl): phpMyAdmin - administracja bazami MySQL przez WWW
8 Release: %{_pl}.%{_rel}
10 Group: Applications/Databases/Interfaces
11 Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
12 # Source0-md5: 1ef0b82402b1d43c2be32521baef8b7e
13 #Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
15 Patch0: %{name}-config.patch
16 URL: http://www.phpmyadmin.net/
17 BuildRequires: rpmbuild(macros) >= 1.268
18 Requires(triggerpostun): sed >= 4.0
23 #Suggests: php-mbstring
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _appdir %{_datadir}/%{name}
28 %define _webapps /etc/webapps
29 %define _webapp %{name}
30 %define _sysconfdir %{_webapps}/%{_webapp}
33 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
34 but also a single database. To accomplish the latter you'll need a
35 properly set up MySQL-user who can read/write only the desired
36 database. It's up to you to look up the appropiate part in the MySQL
37 manual. Currently phpMyAdmin can:
38 - create and drop databases
39 - create, copy, drop and alter tables
40 - delete, edit and add fields
41 - execute any SQL-statement, even batch-queries
42 - manage keys on fields
43 - load text files into tables
44 - create (*) and read dumps of tables
45 - export (*) and import data to CSV values
46 - administer multiple servers and single databases
47 - communicate in more than 20 different languages
50 phpMyAdmin potrafi zarz±dzaæ ca³ymi bazami MySQL (potrzebne
51 uprawnienia superu¿ytkownika) jak i pojedynczymi bazami danych.
52 Potrzebny jest u¿ytkownik, który ma prawa zapisu/odczytu tylko tych
53 baz, którymi chcemy administrowaæ (wiêcej informacji w odpowiedniej
54 podrêcznika MySQL). Aktualnie phpMyAdmin potrafi:
55 - tworzyæ i usuwaæ bazy
56 - wykonywaæ create, copy, drop oraz alter na tabelach
57 - dodawaæ, usuwaæ i modyfikowaæ pola
58 - wykonywaæ dowolne zapytania SQL
59 - zarz±dzaæ kluczami na rekordach
60 - wczytywaæ tekst z plików do tabel
61 - obs³ugiwaæ ponad 20 jêzyków
62 - zarz±dzaæ wieloma serwerami i pojedynczymi bazami danych
63 - eksportowaæ i importowaæ dane do warto¶ci CSV
64 - tworzyæ i czytaæ zrzuty tabel
67 %setup -q -n %{name}-%{version}
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{css,lang,libraries/{auth,dbg,dbi,engines,export,import,transformations}}}
74 install *.php *.html *.css $RPM_BUILD_ROOT%{_appdir}
75 install lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang
76 cp -rf themes $RPM_BUILD_ROOT%{_appdir}
77 install css/* $RPM_BUILD_ROOT%{_appdir}/css
78 install libraries/*.php $RPM_BUILD_ROOT%{_appdir}/libraries
79 install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth
80 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbg
81 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbi
82 install libraries/engines/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/engines
83 install libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export
84 install libraries/import/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/import
85 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations
87 install libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
88 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
90 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
91 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 rm -rf $RPM_BUILD_ROOT
97 %webapp_register apache %{_webapp}
100 %webapp_unregister apache %{_webapp}
102 %triggerin -- apache < 2.2.0, apache-base
103 %webapp_register httpd %{_webapp}
105 %triggerun -- apache < 2.2.0, apache-base
106 %webapp_unregister httpd %{_webapp}
108 %triggerpostun -- phpMyAdmin <= 2.5.3-2
109 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
111 sed -i -e "s#/home/httpd/html/myadmin#%{_appdir}#g" $i
112 sed -i -e "s#/home/services/httpd/html/myadmin#%{_appdir}#g" $i
113 echo "File changed by trigger: $i (backup: $i.backup)"
116 %triggerpostun -- %{name} < 2.7.0-pl1.2.5
117 # rescue app config from various old locations
118 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
119 mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
120 mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav %{_sysconfdir}/config.inc.php
122 if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
123 mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
124 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php
126 if [ -f /etc/%{name}/config.inc.php.rpmsave ]; then
127 mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
128 mv -f /etc/%{name}/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php
131 # nuke very-old config location (this mostly for Ra)
132 if [ -f /etc/httpd/httpd.conf ]; then
133 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
136 # migrate from httpd (apache2) config dir
137 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
138 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
139 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
142 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
143 /usr/sbin/webapp register httpd %{_webapp}
144 %service httpd reload
147 %defattr(644,root,root,755)
148 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
149 %dir %attr(750,root,http) %{_sysconfdir}
150 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
151 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
152 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php