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
10 Group: Applications/Databases/Interfaces
11 Source0: https://files.phpmyadmin.net/phpMyAdmin/%{version}/%{name}-%{version}-all-languages.tar.xz
12 # Source0-md5: 0690e8a5263776c3fbf5b47bd85253e8
14 Source2: %{name}-lighttpd.conf
15 Patch0: %{name}-config.patch
16 Patch1: %{name}-ServerSelectDisplayName.patch
17 Patch2: %{name}-ServerSelectDisplayName-config.patch
18 URL: https://www.phpmyadmin.net/
19 BuildRequires: rpmbuild(macros) >= 1.268
20 BuildRequires: tar >= 1:1.22
22 Requires: php(core) >= 5.2
26 Requires: php(mbstring)
30 Requires: php(session)
31 Requires: php(simplexml)
33 Requires: webserver(access)
34 Requires: webserver(alias)
35 Requires(triggerpostun): sed >= 4.0
37 Suggests: webserver(indexfile)
38 Suggests: webserver(php)
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _appdir %{_datadir}/%{name}
43 %define _webapps /etc/webapps
44 %define _webapp %{name}
45 %define _sysconfdir %{_webapps}/%{_webapp}
48 phpMyAdmin can administer a whole MySQL-server (needs a super-user)
49 but also a single database. To accomplish the latter you'll need a
50 properly set up MySQL-user who can read/write only the desired
51 database. It's up to you to look up the appropiate part in the MySQL
52 manual. Currently phpMyAdmin can:
53 - create and drop databases
54 - create, copy, drop and alter tables
55 - delete, edit and add fields
56 - execute any SQL-statement, even batch-queries
57 - manage keys on fields
58 - load text files into tables
59 - create and read dumps of tables
60 - export and import data to CSV values
61 - administer multiple servers and single databases
62 - check referencial integrity
63 - create complex queries automatically connecting required tables
64 - create PDF graphics of your database layout
65 - communicate in more than 72 different languages
67 This is older version compatible with PHP 5.2 and MySQL 5. Supported
68 for security fixes only, until Jan 1, 2017.
70 %description -l pl.UTF-8
71 phpMyAdmin potrafi zarządzać całymi bazami MySQL (potrzebne
72 uprawnienia superużytkownika) jak i pojedynczymi bazami danych.
73 Potrzebny jest użytkownik, który ma prawa zapisu/odczytu tylko tych
74 baz, którymi chcemy administrować (więcej informacji w odpowiedniej
75 podręcznika MySQL). Aktualnie phpMyAdmin potrafi:
76 - tworzyć i usuwać bazy
77 - wykonywać create, copy, drop oraz alter na tabelach
78 - dodawać, usuwać i modyfikować pola
79 - wykonywać dowolne zapytania SQL
80 - zarządzać kluczami na rekordach
81 - wczytywać tekst z plików do tabel
82 - obsługiwać ponad 72 języków
83 - zarządzać wieloma serwerami i pojedynczymi bazami danych
84 - eksportować i importować dane do wartości CSV
85 - tworzyć i czytać zrzuty tabel
88 %setup -q -n %{name}-%{version}-all-languages
93 # cleanup backups after patching
94 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
97 %{__rm} composer.json phpunit.xml*
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
102 cp -a . $RPM_BUILD_ROOT%{_appdir}
104 cp -p libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
105 ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
107 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
108 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
109 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
112 %{__rm} $RPM_BUILD_ROOT%{_appdir}/{ChangeLog,LICENSE,README,RELEASE-DATE-*}
113 # cleanup not packaged stuff
114 %{__rm} -r $RPM_BUILD_ROOT%{_appdir}/{doc,examples,setup,scripts}
117 rm -rf $RPM_BUILD_ROOT
119 %triggerin -- apache1 < 1.3.37-3, apache1-base
120 %webapp_register apache %{_webapp}
122 %triggerun -- apache1 < 1.3.37-3, apache1-base
123 %webapp_unregister apache %{_webapp}
125 %triggerin -- apache < 2.2.0, apache-base
126 %webapp_register httpd %{_webapp}
128 %triggerun -- apache < 2.2.0, apache-base
129 %webapp_unregister httpd %{_webapp}
131 %triggerin -- lighttpd
132 %webapp_register lighttpd %{_webapp}
134 %triggerun -- lighttpd
135 %webapp_unregister lighttpd %{_webapp}
138 %defattr(644,root,root,755)
139 %doc ChangeLog LICENSE README examples/
140 %dir %attr(750,root,http) %{_sysconfdir}
141 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
142 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
143 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
144 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
152 %{_appdir}/favicon.ico
153 %{_appdir}/robots.txt