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