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