]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- use webserver(access) virtual rather specific to apache 2.2
[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.9.0.2
5 Release:        1
6 License:        GPL v2
7 Group:          Applications/Databases/Interfaces
8 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
9 # Source0-md5:  c85e8b2b08dc7bd9be1e85ee38f5e4d9
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
16 Requires:       php-mysql
17 Requires:       php-pcre
18 Requires:       webapps
19 Requires:       webserver(access)
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 %patch0 -p0
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{css,js,lang,libraries/{auth,dbg,dbi,engines,export,fpdf/font,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 js/* $RPM_BUILD_ROOT%{_appdir}/js
76 install libraries/*.php $RPM_BUILD_ROOT%{_appdir}/libraries
77 install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth
78 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbg
79 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/dbi
80 install libraries/engines/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/engines
81 install libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export
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
84 install libraries/import/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/import
85 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations
86
87 install libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
88 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
89
90 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
91 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %triggerin -- apache1 < 1.3.37-3, apache1-base
97 %webapp_register apache %{_webapp}
98
99 %triggerun -- apache1 < 1.3.37-3, apache1-base
100 %webapp_unregister apache %{_webapp}
101
102 %triggerin -- apache < 2.2.0, apache-base
103 %webapp_register httpd %{_webapp}
104
105 %triggerun -- apache < 2.2.0, apache-base
106 %webapp_unregister httpd %{_webapp}
107
108 %triggerpostun -- phpMyAdmin <= 2.5.3-2
109 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
110         cp $i $i.backup
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
113         echo "File changed by trigger: $i (backup: $i.backup)"
114 done
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}
144 %service httpd reload
145
146 %files
147 %defattr(644,root,root,755)
148 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
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
155 %{_appdir}/js
156 %{_appdir}/lang
157 %{_appdir}/libraries
158 %{_appdir}/themes
159 %{_appdir}/*.css
160 %{_appdir}/*.html
161 %{_appdir}/*.php
This page took 0.049956 seconds and 3 git commands to generate.