1 Summary: phpMyAdmin - web-based MySQL administration
2 Summary(pl): phpMyAdmin - administracja bazami MySQL przez WWW
8 Group: Applications/Databases/Interfaces
9 Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_ver}.tar.bz2
10 # Source0-md5: 93b7c7f3dfcfd6df9c2ea26f31a51772
12 Patch0: %{name}-config.patch
13 URL: http://www.phpmyadmin.net/
15 Requires(postun): perl-base
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _myadmindir %{_datadir}/%{name}
24 %define _sysconfdir /etc/%{name}
27 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
28 but also a single database. To accomplish the latter you'll need a
29 properly set up MySQL-user who can read/write only the desired
30 database. It's up to you to look up the appropiate part in the MySQL
31 manual. Currently phpMyAdmin can:
32 - create and drop databases
33 - create, copy, drop and alter tables
34 - delete, edit and add fields
35 - execute any SQL-statement, even batch-queries
36 - manage keys on fields
37 - load text files into tables
38 - create (*) and read dumps of tables
39 - export (*) and import data to CSV values
40 - administer multiple servers and single databases
41 - communicate in more than 20 different languages
44 phpMyAdmin potrafi zarz±dzaæ ca³ymi bazami MySQL (potrzebne
45 uprawnienia super-user'a) jak i pojedynczymi bazami danych. Bêdziesz
46 potrzebowa³ u¿ytkownika, który ma prawa zapisu/odczytu tylko tych baz,
47 którymi chcesz administrowaæ (zajrzyj do odpowiedniej czê¶ci manual'a
48 MySQL). Aktualnie phpMyAdmin potrafi:
49 - tworzyæ i usuwaæ bazy
50 - create, copy, drop oraz alter na tabelach
51 - dodawaæ, usuwaæ i edytowaæ pola
52 - wykonywaæ dowolne zapytania SQL
53 - zarz±dzaæ kluczami na rekordach
54 - wczytywaæ tekst z plików do tabel
55 - obs³ugiwaæ ponad 20 jêzyków
56 - zarz±dzaæ wieloma serwerami i pojedyñczymi bazami danych
57 - eksportowaæ i importowaæ dane do warto¶ci CSV
58 - tworzyæ i czytaæ zrzuty tabel
61 %setup -q -n %{name}-%{version}-%{_ver}
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,images,libraries/{auth,export}} \
67 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
69 install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir}
70 install images/*.{gif,png} $RPM_BUILD_ROOT%{_myadmindir}/images
71 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
72 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
73 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
74 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
75 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
77 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
78 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
80 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
83 rm -rf $RPM_BUILD_ROOT
86 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*phpMyAdmin.conf" /etc/httpd/httpd.conf; then
87 echo "Include /etc/httpd/phpMyAdmin.conf" >> /etc/httpd/httpd.conf
88 elif [ -d /etc/httpd/httpd.conf ]; then
89 mv -f /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
91 if [ -f /var/lock/subsys/httpd ]; then
92 /usr/sbin/apachectl restart 1>&2
96 if [ "$1" = "0" ]; then
98 if [ -d /etc/httpd/httpd.conf ]; then
99 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
101 grep -v "^Include.*phpMyAdmin.conf" /etc/httpd/httpd.conf > \
102 etc/httpd/httpd.conf.tmp
103 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
104 if [ -f /var/lock/subsys/httpd ]; then
105 /usr/sbin/apachectl restart 1>&2
110 %triggerpostun -- phpMyAdmin <= 2.5.3-2
111 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
112 mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
114 if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
115 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
118 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
120 %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
121 %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
122 echo "File changed by trigger: $i (backup: $i.backup)"
124 if [ -f /var/lock/subsys/httpd ]; then
125 /usr/sbin/apachectl restart 1>&2
129 %defattr(644,root,root,755)
130 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
132 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
133 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
136 %{_myadmindir}/images
138 %{_myadmindir}/libraries
140 %{_myadmindir}/*.html