]> TLD Linux GIT Repositories - packages/phpMyAdmin.git/blob - phpMyAdmin.spec
- updated to 4.3.8
[packages/phpMyAdmin.git] / phpMyAdmin.spec
1 # TODO
2 # - add codepress (http://codepress.org/index.php) patch
3 # - use system jquery (js/jquery), tcpdf (libraries/tcpdf) and php-gettext (libraries/gettext)
4 Summary:        phpMyAdmin - web-based MySQL administration
5 Summary(pl.UTF-8):      phpMyAdmin - administracja bazami MySQL przez WWW
6 Name:           phpMyAdmin
7 Version:        4.3.8
8 Release:        1
9 License:        GPL v2
10 Group:          Applications/Databases/Interfaces
11 Source0:        http://downloads.sourceforge.net/phpmyadmin/%{name}-%{version}-all-languages.tar.xz
12 # Source0-md5:  c9a3d2725a7983f5a02af91cfa35ba54
13 Source1:        %{name}-apache.conf
14 Source2:        %{name}-lighttpd.conf
15 Patch0:         %{name}-config.patch
16 Patch1:         %{name}-ServerSelectDisplayName.patch
17 URL:            http://www.phpmyadmin.net/
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 # phpMyAdmin doesn't support mysql < 5.5 and won't work with php < 5.3
22 Requires:       mysql-libs >= 5.5
23 Requires:       php(core) >= 5.3
24 Requires:       php(ctype)
25 Requires:       php(filter)
26 Requires:       php(json)
27 Requires:       php(mbstring)
28 Requires:       php(mcrypt)
29 Requires:       php(mysql)
30 Requires:       php(pcre)
31 Requires:       php(session)
32 Requires:       php(simplexml)
33 Requires:       webapps
34 Requires:       webserver(access)
35 Requires:       webserver(alias)
36 Requires(triggerpostun):        sed >= 4.0
37 Suggests:       php-mysqli
38 Suggests:       webserver(indexfile)
39 Suggests:       webserver(php)
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _appdir         %{_datadir}/%{name}
44 %define         _webapps        /etc/webapps
45 %define         _webapp         %{name}
46 %define         _sysconfdir     %{_webapps}/%{_webapp}
47
48 %description
49 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
50 but also a single database. To accomplish the latter you'll need a
51 properly set up MySQL-user who can read/write only the desired
52 database. It's up to you to look up the appropiate part in the MySQL
53 manual. Currently phpMyAdmin can:
54 - create and drop databases
55 - create, copy, drop and alter tables
56 - delete, edit and add fields
57 - execute any SQL-statement, even batch-queries
58 - manage keys on fields
59 - load text files into tables
60 - create (*) and read dumps of tables
61 - export (*) and import data to CSV values
62 - administer multiple servers and single databases
63 - check referencial integrity
64 - create complex queries automatically connecting required tables
65 - create PDF graphics of your database layout
66 - communicate in more than 50 different languages
67
68 %description -l pl.UTF-8
69 phpMyAdmin potrafi zarządzać całymi bazami MySQL (potrzebne
70 uprawnienia superużytkownika) jak i pojedynczymi bazami danych.
71 Potrzebny jest użytkownik, który ma prawa zapisu/odczytu tylko tych
72 baz, którymi chcemy administrować (więcej informacji w odpowiedniej
73 podręcznika MySQL). Aktualnie phpMyAdmin potrafi:
74 - tworzyć i usuwać bazy
75 - wykonywać create, copy, drop oraz alter na tabelach
76 - dodawać, usuwać i modyfikować pola
77 - wykonywać dowolne zapytania SQL
78 - zarządzać kluczami na rekordach
79 - wczytywać tekst z plików do tabel
80 - obsługiwać ponad 20 języków
81 - zarządzać wieloma serwerami i pojedynczymi bazami danych
82 - eksportować i importować dane do wartości CSV
83 - tworzyć i czytać zrzuty tabel
84
85 %prep
86 %setup -q -n %{name}-%{version}-all-languages
87 %patch0 -p1
88 %patch1 -p0
89
90 # cleanup backups after patching
91 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
96
97 cp -p *.php *.css favicon.ico robots.txt $RPM_BUILD_ROOT%{_appdir}
98 cp -a locale themes js libraries $RPM_BUILD_ROOT%{_appdir}
99
100 cp -p libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
101 ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
102
103 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
104 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
105 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %triggerin -- apache1 < 1.3.37-3, apache1-base
111 %webapp_register apache %{_webapp}
112
113 %triggerun -- apache1 < 1.3.37-3, apache1-base
114 %webapp_unregister apache %{_webapp}
115
116 %triggerin -- apache < 2.2.0, apache-base
117 %webapp_register httpd %{_webapp}
118
119 %triggerun -- apache < 2.2.0, apache-base
120 %webapp_unregister httpd %{_webapp}
121
122 %triggerin -- lighttpd
123 %webapp_register lighttpd %{_webapp}
124
125 %triggerun -- lighttpd
126 %webapp_unregister lighttpd %{_webapp}
127
128 %files
129 %defattr(644,root,root,755)
130 %doc ChangeLog README examples
131 %dir %attr(750,root,http) %{_sysconfdir}
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
133 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
134 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
135 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
136 %dir %{_appdir}
137 %{_appdir}/js
138 %{_appdir}/libraries
139 %{_appdir}/locale
140 %{_appdir}/themes
141 %{_appdir}/*.css
142 %{_appdir}/*.php
143 %{_appdir}/favicon.ico
144 %{_appdir}/robots.txt