]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- AllowOverride None
[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.7.0
5 %define         _pl     pl2
6 # release 1 is for Ra
7 %define         _rel 2
8 Release:        %{_pl}.%{_rel}
9 License:        GPL v2
10 Group:          Applications/Databases/Interfaces
11 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2
12 # Source0-md5:  19a46b06254276f4e7c3803ea2d9b335
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 Requires(triggerpostun):        sed >= 4.0
18 Requires:       php
19 Requires:       php-mysql
20 Requires:       php-pcre
21 Requires:       webapps
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
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}-%{_pl}
67 %patch -p1
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{css,lang,libraries/{auth,export,dbg,dbi,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 libraries/*.{js,php} $RPM_BUILD_ROOT%{_appdir}/libraries
78 install libraries/auth/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/auth
79 install libraries/export/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/export
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/transformations/*.php $RPM_BUILD_ROOT%{_appdir}/libraries/transformations
83
84 install 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.0.0
100 %webapp_register httpd %{_webapp}
101
102 %triggerun -- apache >= 2.0.0
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 if [ -f /var/lock/subsys/httpd ]; then
142         /etc/rc.d/init.d/httpd reload 1>&2
143 fi
144
145 %files
146 %defattr(644,root,root,755)
147 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
148 %dir %attr(750,root,http) %{_sysconfdir}
149 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
150 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
151 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
152 %dir %{_appdir}
153 %{_appdir}/css
154 %{_appdir}/themes
155 %{_appdir}/lang
156 %{_appdir}/libraries
157 %{_appdir}/*.css
158 %{_appdir}/*.html
159 %{_appdir}/*.php
This page took 0.079664 seconds and 3 git commands to generate.