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