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