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: 1.%{_pl}.%{_rel}
11 Group: Applications/Databases/Interfaces
12 Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2
13 # Source0-md5: 9580c5da497af4ff9ff3af7fa6e2793c
14 # Source0-size: 1278267
15 #Source0: http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
17 Patch0: %{name}-config.patch
18 URL: http://www.phpmyadmin.net/
20 Requires(postun): perl-base
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _myadmindir %{_datadir}/%{name}
29 %define _sysconfdir /etc/%{name}
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}
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,libraries/{auth,export,dbg,dbi,transformations}} \
73 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
75 install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir}
76 #install images/*.{gif,png} $RPM_BUILD_ROOT%{_myadmindir}/images
77 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
78 cp -rf themes $RPM_BUILD_ROOT%{_myadmindir}/
79 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
80 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
81 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
82 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
83 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbg
84 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbi
85 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/transformations
87 cp -rf scripts $RPM_BUILD_ROOT%{_myadmindir}
89 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
90 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
92 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
95 rm -rf $RPM_BUILD_ROOT
98 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
99 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
100 if [ -f /var/lock/subsys/httpd ]; then
101 /usr/sbin/apachectl restart 1>&2
103 elif [ -d /etc/httpd/httpd.conf ]; then
104 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
105 if [ -f /var/lock/subsys/httpd ]; then
106 /usr/sbin/apachectl restart 1>&2
111 if [ "$1" = "0" ]; then
113 if [ -d /etc/httpd/httpd.conf ]; then
114 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
116 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
117 /etc/httpd/httpd.conf.tmp
118 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
120 if [ -f /var/lock/subsys/httpd ]; then
121 /usr/sbin/apachectl restart 1>&2
125 %triggerpostun -- phpMyAdmin <= 2.5.3-2
126 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
127 mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
129 if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
130 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
133 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
135 %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
136 %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
137 echo "File changed by trigger: $i (backup: $i.backup)"
139 if [ -f /var/lock/subsys/httpd ]; then
140 /usr/sbin/apachectl restart 1>&2
144 %defattr(644,root,root,755)
145 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
147 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
148 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
151 %{_myadmindir}/themes
152 %{_myadmindir}/scripts
154 %{_myadmindir}/libraries
156 %{_myadmindir}/*.html