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