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