]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- R: php(mbstring) - it's quite a critical change :)
[packages/phpMyAdmin.git] / phpMyAdmin.spec
1 Summary:        phpMyAdmin - web-based MySQL administration
2 Summary(pl.UTF-8):      phpMyAdmin - administracja bazami MySQL przez WWW
3 Name:           phpMyAdmin
4 Version:        2.10.0.2
5 Release:        2
6 License:        GPL v2
7 Group:          Applications/Databases/Interfaces
8 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-all-languages.tar.bz2
9 # Source0-md5:  2aa1abcdacc93a6ccdea149d8c74aa9c
10 Source1:        %{name}.conf
11 Patch0:         %{name}-config.patch
12 URL:            http://www.phpmyadmin.net/
13 BuildRequires:  rpmbuild(macros) >= 1.268
14 Requires(triggerpostun):        sed >= 4.0
15 Requires:       php(ctype)
16 Requires:       php(mbstring)
17 Requires:       php(mysql)
18 Requires:       php(pcre)
19 Requires:       webapps
20 Requires:       webserver(access)
21 Requires:       webserver(php)
22 #Suggests:      php-mbstring
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _appdir         %{_datadir}/%{name}
27 %define         _webapps        /etc/webapps
28 %define         _webapp         %{name}
29 %define         _sysconfdir     %{_webapps}/%{_webapp}
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:
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
47
48 %description -l pl.UTF-8
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
64
65 %prep
66 %setup -q -n %{name}-%{version}-all-languages
67 %patch0 -p0
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{css,js,lang,libraries/{auth,dbg,dbi,engines,export,tcpdf/font,import,transformations}}}
72
73 install *.php *.html *.css $RPM_BUILD_ROOT%{_appdir}
74 install lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang
75 cp -rf themes $RPM_BUILD_ROOT%{_appdir}
76 install css/* $RPM_BUILD_ROOT%{_appdir}/css
77 install js/* $RPM_BUILD_ROOT%{_appdir}/js
78 install libraries/*.php $RPM_BUILD_ROOT%{_appdir}/libraries
79 install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth
80 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbg
81 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbi
82 install libraries/engines/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/engines
83 install libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export
84 install libraries/tcpdf/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf
85 install libraries/tcpdf/font/*.{php,z} $RPM_BUILD_ROOT%{_appdir}/libraries/tcpdf/font
86 install libraries/import/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/import
87 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations
88
89 install libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
90 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
91
92 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %triggerin -- apache1 < 1.3.37-3, apache1-base
99 %webapp_register apache %{_webapp}
100
101 %triggerun -- apache1 < 1.3.37-3, apache1-base
102 %webapp_unregister apache %{_webapp}
103
104 %triggerin -- apache < 2.2.0, apache-base
105 %webapp_register httpd %{_webapp}
106
107 %triggerun -- apache < 2.2.0, apache-base
108 %webapp_unregister httpd %{_webapp}
109
110 %triggerpostun -- phpMyAdmin <= 2.5.3-2
111 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
112         cp $i $i.backup
113         sed -i -e "s#/home/httpd/html/myadmin#%{_appdir}#g" $i
114         sed -i -e "s#/home/services/httpd/html/myadmin#%{_appdir}#g" $i
115         echo "File changed by trigger: $i (backup: $i.backup)"
116 done
117
118 %triggerpostun -- %{name} < 2.7.0-pl1.2.5
119 # rescue app config from various old locations
120 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
121         mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
122         mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsav %{_sysconfdir}/config.inc.php
123 fi
124 if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
125         mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
126         mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php
127 fi
128 if [ -f /etc/%{name}/config.inc.php.rpmsave ]; then
129         mv -f %{_sysconfdir}/config.inc.php{,.rpmnew}
130         mv -f /etc/%{name}/config.inc.php.rpmsave %{_sysconfdir}/config.inc.php
131 fi
132
133 # nuke very-old config location (this mostly for Ra)
134 if [ -f /etc/httpd/httpd.conf ]; then
135         sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
136 fi
137
138 # migrate from httpd (apache2) config dir
139 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
140         cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
141         mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
142 fi
143
144 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
145 /usr/sbin/webapp register httpd %{_webapp}
146 %service httpd reload
147
148 %files
149 %defattr(644,root,root,755)
150 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
151 %dir %attr(750,root,http) %{_sysconfdir}
152 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
153 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
154 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
155 %dir %{_appdir}
156 %{_appdir}/css
157 %{_appdir}/js
158 %{_appdir}/lang
159 %{_appdir}/libraries
160 %{_appdir}/themes
161 %{_appdir}/*.css
162 %{_appdir}/*.html
163 %{_appdir}/*.php
This page took 0.07874 seconds and 4 git commands to generate.