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