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