]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- cleanup; php-mbstring can be suggested in future
[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.6.4
5 %define         _pl     pl4
6 #Release:       1
7 Release:        2.%{_pl}.1
8 License:        GPL v2
9 Group:          Applications/Databases/Interfaces
10 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2
11 # Source0-md5:  a49885849bec79d35f6bdae73cdb813d
12 #Source0:       http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}.tar.bz2
13 Source1:        %{name}.conf
14 Patch0:         %{name}-config.patch
15 URL:            http://www.phpmyadmin.net/
16 Requires(postun):       perl-base
17 Requires:       php
18 Requires:       php-mysql
19 Requires:       php-pcre
20 Requires:       webserver
21 #Suggests:      php-mbstring
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _myadmindir     %{_datadir}/%{name}
26 %define         _sysconfdir     /etc/%{name}
27
28 %description
29 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
30 but also a single database. To accomplish the latter you'll need a
31 properly set up MySQL-user who can read/write only the desired
32 database. It's up to you to look up the appropiate part in the MySQL
33 manual. Currently phpMyAdmin can:
34 - create and drop databases
35 - create, copy, drop and alter tables
36 - delete, edit and add fields
37 - execute any SQL-statement, even batch-queries
38 - manage keys on fields
39 - load text files into tables
40 - create (*) and read dumps of tables
41 - export (*) and import data to CSV values
42 - administer multiple servers and single databases
43 - communicate in more than 20 different languages
44
45 %description -l pl
46 phpMyAdmin potrafi zarz±dzaæ ca³ymi bazami MySQL (potrzebne
47 uprawnienia superu¿ytkownika) jak i pojedynczymi bazami danych.
48 Potrzebny jest u¿ytkownik, który ma prawa zapisu/odczytu tylko tych
49 baz, którymi chcemy administrowaæ (wiêcej informacji w odpowiedniej
50 podrêcznika MySQL). Aktualnie phpMyAdmin potrafi:
51 - tworzyæ i usuwaæ bazy
52 - wykonywaæ create, copy, drop oraz alter na tabelach
53 - dodawaæ, usuwaæ i modyfikowaæ pola
54 - wykonywaæ dowolne zapytania SQL
55 - zarz±dzaæ kluczami na rekordach
56 - wczytywaæ tekst z plików do tabel
57 - obs³ugiwaæ ponad 20 jêzyków
58 - zarz±dzaæ wieloma serwerami i pojedynczymi bazami danych
59 - eksportowaæ i importowaæ dane do warto¶ci CSV
60 - tworzyæ i czytaæ zrzuty tabel
61
62 %prep
63 #%setup -q
64 %setup -q -n %{name}-%{version}-%{_pl}
65 %patch -p1
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,libraries/{auth,export,dbg,dbi,transformations}} \
70         $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
71
72 install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir}
73 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
74 cp -rf themes $RPM_BUILD_ROOT%{_myadmindir}
75 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
76 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
77 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
78 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
79 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbg
80 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbi
81 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/transformations
82
83 cp -rf scripts $RPM_BUILD_ROOT%{_myadmindir}
84
85 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
86 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
87
88 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post
94 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
95         echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
96         if [ -f /var/lock/subsys/httpd ]; then
97                 /usr/sbin/apachectl restart 1>&2
98         fi
99 elif [ -d /etc/httpd/httpd.conf ]; then
100         ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
101         if [ -f /var/lock/subsys/httpd ]; then
102                 /usr/sbin/apachectl restart 1>&2
103         fi
104 fi
105
106 %preun
107 if [ "$1" = "0" ]; then
108         umask 027
109         if [ -d /etc/httpd/httpd.conf ]; then
110                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
111         else
112                 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
113                         /etc/httpd/httpd.conf.tmp
114                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
115         fi
116         if [ -f /var/lock/subsys/httpd ]; then
117                 /usr/sbin/apachectl restart 1>&2
118         fi
119 fi
120
121 %triggerpostun -- phpMyAdmin <= 2.5.3-2
122 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
123         mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
124 else
125         if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
126                 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
127         fi
128 fi
129 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
130         cp $i $i.backup
131         %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
132         %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
133         echo "File changed by trigger: $i (backup: $i.backup)"
134 done
135 if [ -f /var/lock/subsys/httpd ]; then
136         /usr/sbin/apachectl restart 1>&2
137 fi
138
139 %files
140 %defattr(644,root,root,755)
141 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
142 %dir %{_sysconfdir}
143 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
144 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
145 %dir %{_myadmindir}
146 %{_myadmindir}/css
147 %{_myadmindir}/themes
148 %{_myadmindir}/scripts
149 %{_myadmindir}/lang
150 %{_myadmindir}/libraries
151 %{_myadmindir}/*.css
152 %{_myadmindir}/*.html
153 %{_myadmindir}/*.php
This page took 0.041105 seconds and 3 git commands to generate.