]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- reverted changes related to release-patchlevel issue to avoid bumping
[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         _pl     pl1
5 %define         _rel    3       
6 # NOTE: bump _rel with every new patchlevel
7 Version:        2.5.7
8 Release:        %{_rel}.%{_pl}
9 License:        GPL v2
10 Group:          Applications/Databases/Interfaces
11 Source0:        http://dl.sourceforge.net/phpmyadmin/%{name}-%{version}-%{_pl}.tar.bz2
12 # Source0-md5:  93b7c7f3dfcfd6df9c2ea26f31a51772
13 Source1:        %{name}.conf
14 Patch0:         %{name}-config.patch
15 URL:            http://www.phpmyadmin.net/
16 #Requires:      mysql
17 Requires(postun):       perl-base
18 Requires:       php-mysql
19 Requires:       php-pcre
20 Requires:       php
21 Requires:       webserver
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 super-user'a) jak i pojedynczymi bazami danych. Bêdziesz
48 potrzebowa³ u¿ytkownika, który ma prawa zapisu/odczytu tylko tych baz,
49 którymi chcesz administrowaæ (zajrzyj do odpowiedniej czê¶ci manual'a
50 MySQL). Aktualnie phpMyAdmin potrafi:
51   - tworzyæ i usuwaæ bazy
52   - create, copy, drop oraz alter na tabelach
53   - dodawaæ, usuwaæ i edytowaæ 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 pojedyñczymi bazami danych
59   - eksportowaæ i importowaæ dane do warto¶ci CSV
60   - tworzyæ i czytaæ zrzuty tabel
61
62 %prep
63 %setup -q -n %{name}-%{version}-%{_pl}
64 %patch -p1
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_myadmindir}/{css,lang,images,libraries/{auth,export}} \
69         $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
70
71 install *.php *.html *.css $RPM_BUILD_ROOT%{_myadmindir}
72 install images/*.{gif,png} $RPM_BUILD_ROOT%{_myadmindir}/images
73 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
74 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
75 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
76 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
77 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
78
79 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
80 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
81
82 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %post
88 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*phpMyAdmin.conf" /etc/httpd/httpd.conf; then
89         echo "Include /etc/httpd/phpMyAdmin.conf" >> /etc/httpd/httpd.conf
90 elif [ -d /etc/httpd/httpd.conf ]; then
91         ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
92 fi
93 if [ -f /var/lock/subsys/httpd ]; then
94         /usr/sbin/apachectl restart 1>&2
95 fi
96
97 %preun
98 if [ "$1" = "0" ]; then
99         umask 027
100         if [ -d /etc/httpd/httpd.conf ]; then
101             rm -f /etc/httpd/httpd.conf/99_%{name}.conf
102         else
103                 grep -v "^Include.*phpMyAdmin.conf" /etc/httpd/httpd.conf > \
104                         /etc/httpd/httpd.conf.tmp
105                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
106                 if [ -f /var/lock/subsys/httpd ]; then
107                     /usr/sbin/apachectl restart 1>&2
108                 fi
109         fi
110 fi
111
112 %triggerpostun -- phpMyAdmin <= 2.5.3-2
113 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
114         mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
115 else
116         if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
117                 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
118         fi
119 fi
120 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
121         cp $i $i.backup
122         %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
123         %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
124         echo "File changed by trigger: $i (backup: $i.backup)"
125 done
126 if [ -f /var/lock/subsys/httpd ]; then
127         /usr/sbin/apachectl restart 1>&2
128 fi
129
130 %files
131 %defattr(644,root,root,755)
132 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
133 %dir %{_sysconfdir}
134 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
135 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
136 %dir %{_myadmindir}
137 %{_myadmindir}/css
138 %{_myadmindir}/images
139 %{_myadmindir}/lang
140 %{_myadmindir}/libraries
141 %{_myadmindir}/*.css
142 %{_myadmindir}/*.html
143 %{_myadmindir}/*.php
This page took 0.101486 seconds and 3 git commands to generate.