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