]>
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 |
5f95ba8f | 4 | Version: 2.11.4 |
4b5cf2e8 | 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 |
5f95ba8f | 9 | # Source0-md5: 0b6d797a0c14a015d19b94e839f48d1b |
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) |
8677f286 | 16 | Requires: php(mcrypt) |
2d3dc34c | 17 | Requires: php(mbstring) |
71be8e00 ER |
18 | Requires: php(mysql) |
19 | Requires: php(pcre) | |
f935b243 | 20 | Requires: webapps |
9c9eb38c | 21 | Requires: webserver(access) |
71be8e00 | 22 | Requires: webserver(php) |
89cacb94 | 23 | BuildArch: noarch |
78a895aa PG |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
7e9b99de | 26 | %define _appdir %{_datadir}/%{name} |
f935b243 ER |
27 | %define _webapps /etc/webapps |
28 | %define _webapp %{name} | |
29 | %define _sysconfdir %{_webapps}/%{_webapp} | |
78a895aa PG |
30 | |
31 | %description | |
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: | |
1d23e58d | 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 | |
ffe964b1 TP |
46 | - check referencial integrity |
47 | - create complex queries automatically connecting required tables | |
48 | - create PDF graphics of your database layout | |
49 | - communicate in more than 50 different languages | |
78a895aa | 50 | |
27fed873 JR |
51 | %description -l pl.UTF-8 |
52 | phpMyAdmin potrafi zarządzać całymi bazami MySQL (potrzebne | |
53 | uprawnienia superużytkownika) jak i pojedynczymi bazami danych. | |
54 | Potrzebny jest użytkownik, który ma prawa zapisu/odczytu tylko tych | |
55 | baz, którymi chcemy administrować (więcej informacji w odpowiedniej | |
56 | podręcznika MySQL). Aktualnie phpMyAdmin potrafi: | |
57 | - tworzyć i usuwać bazy | |
58 | - wykonywać create, copy, drop oraz alter na tabelach | |
59 | - dodawać, usuwać i modyfikować pola | |
60 | - wykonywać dowolne zapytania SQL | |
61 | - zarządzać kluczami na rekordach | |
62 | - wczytywać tekst z plików do tabel | |
63 | - obsługiwać ponad 20 języków | |
64 | - zarządzać wieloma serwerami i pojedynczymi bazami danych | |
65 | - eksportować i importować dane do wartości CSV | |
66 | - tworzyć i czytać zrzuty tabel | |
78a895aa | 67 | |
78a895aa | 68 | %prep |
fb6eaade | 69 | %setup -q -n %{name}-%{version}-all-languages |
8677f286 | 70 | %patch0 -p1 |
78a895aa PG |
71 | |
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
8677f286 | 74 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{js,lang,libraries/{auth,dbg,dbi,engines,export,tcpdf/font,import,transformations}}} |
f935b243 ER |
75 | |
76 | install *.php *.html *.css $RPM_BUILD_ROOT%{_appdir} | |
77 | install lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang | |
ffe964b1 | 78 | cp -rf pmd $RPM_BUILD_ROOT%{_appdir} |
f935b243 | 79 | cp -rf themes $RPM_BUILD_ROOT%{_appdir} |
786331fa | 80 | install js/* $RPM_BUILD_ROOT%{_appdir}/js |
52f3e0d7 | 81 | install libraries/*.php $RPM_BUILD_ROOT%{_appdir}/libraries |
f935b243 | 82 | install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth |
f935b243 ER |
83 | install libraries/dbg/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbg |
84 | install libraries/dbi/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbi | |
eedbae07 | 85 | install libraries/engines/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/engines |
86 | install libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export | |
ffe964b1 | 87 | install libraries/import/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/import |
f4f5ac2a | 88 | install libraries/tcpdf/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf |
89 | install libraries/tcpdf/font/*.{php,z} $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf/font | |
f935b243 | 90 | install libraries/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations |
78a895aa | 91 | |
52f3e0d7 | 92 | install libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php |
f935b243 | 93 | ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php |
aac07012 | 94 | |
f935b243 ER |
95 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
96 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
aac07012 | 97 | |
ffe964b1 TP |
98 | cp -f libraries/tcpdf/README{,-tcpdf} |
99 | cp -f libraries/import/README{,-import} | |
100 | cp -f libraries/transformations/README{,-transformations} | |
101 | ||
78a895aa | 102 | %clean |
95798666 | 103 | rm -rf $RPM_BUILD_ROOT |
78a895aa | 104 | |
879dcd55 | 105 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
f935b243 | 106 | %webapp_register apache %{_webapp} |
aac07012 | 107 | |
879dcd55 | 108 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
f935b243 ER |
109 | %webapp_unregister apache %{_webapp} |
110 | ||
243b3916 | 111 | %triggerin -- apache < 2.2.0, apache-base |
f935b243 ER |
112 | %webapp_register httpd %{_webapp} |
113 | ||
243b3916 | 114 | %triggerun -- apache < 2.2.0, apache-base |
f935b243 | 115 | %webapp_unregister httpd %{_webapp} |
aac07012 | 116 | |
077ea1e9 | 117 | %triggerpostun -- phpMyAdmin <= 2.5.3-2 |
ab6e0c6b | 118 | for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do |
077ea1e9 | 119 | cp $i $i.backup |
f935b243 ER |
120 | sed -i -e "s#/home/httpd/html/myadmin#%{_appdir}#g" $i |
121 | sed -i -e "s#/home/services/httpd/html/myadmin#%{_appdir}#g" $i | |
077ea1e9 PG |
122 | echo "File changed by trigger: $i (backup: $i.backup)" |
123 | done | |
f935b243 ER |
124 | |
125 | %triggerpostun -- %{name} < 2.7.0-pl1.2.5 | |
126 | # rescue app config from various old locations | |
127 | if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then | |
128 | mv -f %{_sysconfdir}/config.inc.php{,.rpmnew} | |
129 | mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav %{_sysconfdir}/config.inc.php | |
130 | fi | |
131 | if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then | |
132 | mv -f %{_sysconfdir}/config.inc.php{,.rpmnew} | |
133 | mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php | |
134 | fi | |
135 | if [ -f /etc/%{name}/config.inc.php.rpmsave ]; then | |
136 | mv -f %{_sysconfdir}/config.inc.php{,.rpmnew} | |
137 | mv -f /etc/%{name}/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php | |
138 | fi | |
139 | ||
140 | # nuke very-old config location (this mostly for Ra) | |
141 | if [ -f /etc/httpd/httpd.conf ]; then | |
142 | sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf | |
143 | fi | |
144 | ||
145 | # migrate from httpd (apache2) config dir | |
146 | if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then | |
147 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
148 | mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf | |
149 | fi | |
150 | ||
151 | rm -f /etc/httpd/httpd.conf/99_%{name}.conf | |
152 | /usr/sbin/webapp register httpd %{_webapp} | |
72d7283c | 153 | %service httpd reload |
aac07012 | 154 | |
78a895aa PG |
155 | %files |
156 | %defattr(644,root,root,755) | |
ffe964b1 | 157 | %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts libraries/tcpdf/README-tcpdf libraries/import/README-import libraries/transformations/README-transformations libraries/transformations/TEMPLATE* libraries/transformations/*.sh lang/*.sh |
f935b243 ER |
158 | %dir %attr(750,root,http) %{_sysconfdir} |
159 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
160 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
161 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php | |
162 | %dir %{_appdir} | |
786331fa | 163 | %{_appdir}/js |
f935b243 ER |
164 | %{_appdir}/lang |
165 | %{_appdir}/libraries | |
ffe964b1 | 166 | %{_appdir}/pmd |
786331fa | 167 | %{_appdir}/themes |
f935b243 ER |
168 | %{_appdir}/*.css |
169 | %{_appdir}/*.html | |
170 | %{_appdir}/*.php |