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