]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- 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 %define         _pl     pl2
6 # release 1 is for Ra
7 %define         _rel 4
8 Release:        %{_pl}.%{_rel}
9 License:        GPL v2
10 Group:          Applications/Databases/Interfaces
11 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
12 # Source0-md5:  1ef0b82402b1d43c2be32521baef8b7e
13 #Source0:       http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
14 Source1:        %{name}.conf
15 Patch0:         %{name}-config.patch
16 URL:            http://www.phpmyadmin.net/
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires(triggerpostun):        sed >= 4.0
19 Requires:       php
20 Requires:       php-mysql
21 Requires:       php-pcre
22 Requires:       webapps
23 #Suggests:      php-mbstring
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _appdir %{_datadir}/%{name}
28 %define         _webapps        /etc/webapps
29 %define         _webapp         %{name}
30 %define         _sysconfdir     %{_webapps}/%{_webapp}
31
32 %description
33 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
34 but also a single database. To accomplish the latter you'll need a
35 properly set up MySQL-user who can read/write only the desired
36 database. It's up to you to look up the appropiate part in the MySQL
37 manual. Currently phpMyAdmin can:
38 - create and drop databases
39 - create, copy, drop and alter tables
40 - delete, edit and add fields
41 - execute any SQL-statement, even batch-queries
42 - manage keys on fields
43 - load text files into tables
44 - create (*) and read dumps of tables
45 - export (*) and import data to CSV values
46 - administer multiple servers and single databases
47 - communicate in more than 20 different languages
48
49 %description -l pl
50 phpMyAdmin potrafi zarz±dzaæ ca³ymi bazami MySQL (potrzebne
51 uprawnienia superu¿ytkownika) jak i pojedynczymi bazami danych.
52 Potrzebny jest u¿ytkownik, który ma prawa zapisu/odczytu tylko tych
53 baz, którymi chcemy administrowaæ (wiêcej informacji w odpowiedniej
54 podrêcznika MySQL). Aktualnie phpMyAdmin potrafi:
55 - tworzyæ i usuwaæ bazy
56 - wykonywaæ create, copy, drop oraz alter na tabelach
57 - dodawaæ, usuwaæ i modyfikowaæ pola
58 - wykonywaæ dowolne zapytania SQL
59 - zarz±dzaæ kluczami na rekordach
60 - wczytywaæ tekst z plików do tabel
61 - obs³ugiwaæ ponad 20 jêzyków
62 - zarz±dzaæ wieloma serwerami i pojedynczymi bazami danych
63 - eksportowaæ i importowaæ dane do warto¶ci CSV
64 - tworzyæ i czytaæ zrzuty tabel
65
66 %prep
67 %setup -q -n %{name}-%{version}
68 %patch -p1
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{css,lang,libraries/{auth,dbg,dbi,engines,export,import,transformations}}}
73
74 install *.php *.html *.css $RPM_BUILD_ROOT%{_appdir}
75 install lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang
76 cp -rf themes $RPM_BUILD_ROOT%{_appdir}
77 install css/* $RPM_BUILD_ROOT%{_appdir}/css
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/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
97 %webapp_register apache %{_webapp}
98
99 %triggerun -- apache1
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}/themes
156 %{_appdir}/lang
157 %{_appdir}/libraries
158 %{_appdir}/*.css
159 %{_appdir}/*.html
160 %{_appdir}/*.php
This page took 0.045898 seconds and 4 git commands to generate.