1 Summary: phpMyAdmin - web-based MySQL administration
2 Summary(pl): phpMyAdmin - administracja bazami MySQL przez WWW
6 # NOTE: bump _rel with every new patchlevel
9 Release: %{_rel}.%{_pl}
10 #Release: 0.%{_pl}.%{_rel}
12 Group: Applications/Databases/Interfaces
13 Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2
14 # Source0-md5: f9000262ce736ec21369e1be1522ea0d
15 # Source0-size: 1278267
16 #Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
18 Patch0: %{name}-config.patch
19 URL: http://www.phpmyadmin.net/
21 Requires(postun): perl-base
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _myadmindir %{_datadir}/%{name}
30 %define _sysconfdir /etc/%{name}
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 super-user'a) jak i pojedynczymi bazami danych. Bêdziesz
52 potrzebowa³ u¿ytkownika, który ma prawa zapisu/odczytu tylko tych baz,
53 którymi chcesz administrowaæ (zajrzyj do odpowiedniej czê¶ci manual'a
54 MySQL). Aktualnie phpMyAdmin potrafi:
55 - tworzyæ i usuwaæ bazy
56 - create, copy, drop oraz alter na tabelach
57 - dodawaæ, usuwaæ i edytowaæ 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 pojedyñczymi bazami danych
63 - eksportowaæ i importowaæ dane do warto¶ci CSV
64 - tworzyæ i czytaæ zrzuty tabel
67 %setup -q -n %{name}-%{version}-%{_pl}
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,libraries/{auth,export,dbg,dbi,transformations}} \
74 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
76 install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir}
77 #install images/*.{gif,png} $RPM_BUILD_ROOT%{_myadmindir}/images
78 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
79 cp -rf themes $RPM_BUILD_ROOT%{_myadmindir}/
80 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
81 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
82 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
83 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
84 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbg
85 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbi
86 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/transformations
88 cp -rf scripts $RPM_BUILD_ROOT%{_myadmindir}
90 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
91 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
93 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
96 rm -rf $RPM_BUILD_ROOT
99 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
100 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
101 if [ -f /var/lock/subsys/httpd ]; then
102 /usr/sbin/apachectl restart 1>&2
104 elif [ -d /etc/httpd/httpd.conf ]; then
105 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
106 if [ -f /var/lock/subsys/httpd ]; then
107 /usr/sbin/apachectl restart 1>&2
112 if [ "$1" = "0" ]; then
114 if [ -d /etc/httpd/httpd.conf ]; then
115 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
117 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
118 /etc/httpd/httpd.conf.tmp
119 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
121 if [ -f /var/lock/subsys/httpd ]; then
122 /usr/sbin/apachectl restart 1>&2
126 %triggerpostun -- phpMyAdmin <= 2.5.3-2
127 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
128 mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
130 if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
131 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
134 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
136 %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
137 %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
138 echo "File changed by trigger: $i (backup: $i.backup)"
140 if [ -f /var/lock/subsys/httpd ]; then
141 /usr/sbin/apachectl restart 1>&2
145 %defattr(644,root,root,755)
146 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
148 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
149 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
152 %{_myadmindir}/themes
153 %{_myadmindir}/scripts
155 %{_myadmindir}/libraries
157 %{_myadmindir}/*.html