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