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