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