]> git.pld-linux.org Git - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- updated to 2.6.4-2.pl4
[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:      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 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 images/*.{gif,png} $RPM_BUILD_ROOT%{_myadmindir}/images
74 install lang/*.php $RPM_BUILD_ROOT%{_myadmindir}/lang
75 cp -rf themes $RPM_BUILD_ROOT%{_myadmindir}/
76 install css/* $RPM_BUILD_ROOT%{_myadmindir}/css
77 install libraries/*.{js,php} $RPM_BUILD_ROOT%{_myadmindir}/libraries
78 install libraries/auth/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/auth
79 install libraries/export/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/export
80 install libraries/dbg/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbg
81 install libraries/dbi/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/dbi
82 install libraries/transformations/*.php $RPM_BUILD_ROOT%{_myadmindir}/libraries/transformations
83
84 cp -rf scripts $RPM_BUILD_ROOT%{_myadmindir}
85
86 install config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
87 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_myadmindir}/config.inc.php
88
89 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %post
95 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
96         echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
97         if [ -f /var/lock/subsys/httpd ]; then
98                 /usr/sbin/apachectl restart 1>&2
99         fi
100 elif [ -d /etc/httpd/httpd.conf ]; then
101         ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
102         if [ -f /var/lock/subsys/httpd ]; then
103                 /usr/sbin/apachectl restart 1>&2
104         fi
105 fi
106
107 %preun
108 if [ "$1" = "0" ]; then
109         umask 027
110         if [ -d /etc/httpd/httpd.conf ]; then
111                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
112         else
113                 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
114                         /etc/httpd/httpd.conf.tmp
115                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
116         fi
117         if [ -f /var/lock/subsys/httpd ]; then
118                 /usr/sbin/apachectl restart 1>&2
119         fi
120 fi
121
122 %triggerpostun -- phpMyAdmin <= 2.5.3-2
123 if [ -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave ]; then
124         mv -f /home/services/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
125 else
126         if [ -f /home/httpd/html/myadmin/config.inc.php.rpmsave ]; then
127                 mv -f /home/httpd/html/myadmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
128         fi
129 fi
130 for i in `grep -lr "/home/\(services/\)*httpd/html/myadmin" /etc/httpd/*`; do
131         cp $i $i.backup
132         %{__perl} -pi -e "s#/home/httpd/html/myadmin#%{_myadmindir}#g" $i
133         %{__perl} -pi -e "s#/home/services/httpd/html/myadmin#%{_myadmindir}#g" $i
134         echo "File changed by trigger: $i (backup: $i.backup)"
135 done
136 if [ -f /var/lock/subsys/httpd ]; then
137         /usr/sbin/apachectl restart 1>&2
138 fi
139
140 %files
141 %defattr(644,root,root,755)
142 %doc Documentation.* CREDITS ChangeLog INSTALL README TODO translators.html scripts
143 %dir %{_sysconfdir}
144 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
145 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
146 %dir %{_myadmindir}
147 %{_myadmindir}/css
148 %{_myadmindir}/themes
149 %{_myadmindir}/scripts
150 %{_myadmindir}/lang
151 %{_myadmindir}/libraries
152 %{_myadmindir}/*.css
153 %{_myadmindir}/*.html
154 %{_myadmindir}/*.php
This page took 0.033887 seconds and 3 git commands to generate.