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