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