2011-02-25 15:41:08 +01:00
|
|
|
#
|
2011-02-25 15:41:19 +01:00
|
|
|
# spec file for package phpMyAdmin
|
2011-02-25 15:41:08 +01:00
|
|
|
#
|
2015-03-04 01:04:17 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-02-25 15:41:08 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-02-23 13:47:47 +01:00
|
|
|
|
2011-02-25 15:41:08 +01:00
|
|
|
Name: phpMyAdmin
|
|
|
|
|
|
|
|
%define apxs %{_sbindir}/apxs2
|
|
|
|
%define ap_sysconfdir %(%{apxs} -q SYSCONFDIR)
|
|
|
|
%define ap_serverroot %(%{apxs} -q PREFIX)
|
|
|
|
%define ap_docroot %(%{apxs} -q PREFIX)/htdocs
|
|
|
|
%define pma_config %{_sysconfdir}/%{name}/config.inc.php
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%define ap_usr wwwrun
|
|
|
|
%define ap_grp www
|
|
|
|
%else
|
|
|
|
%define ap_usr nobody
|
|
|
|
%define ap_grp nogroup
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Summary: Administration of MySQL over the web
|
2011-12-13 15:45:36 +01:00
|
|
|
License: GPL-2.0+
|
2011-02-25 15:41:08 +01:00
|
|
|
Group: Productivity/Networking/Web/Frontends
|
2015-05-05 17:58:02 +02:00
|
|
|
Version: 4.4.5
|
2011-12-13 15:45:36 +01:00
|
|
|
Release: 0
|
2011-02-25 15:41:08 +01:00
|
|
|
Url: http://www.phpMyAdmin.net
|
2014-01-01 18:18:20 +01:00
|
|
|
Source0: http://sourceforge.net/projects/phpmyadmin/files/%{name}-%{version}-all-languages.tar.bz2
|
2011-02-25 15:41:08 +01:00
|
|
|
Source1: %{name}.http
|
2014-07-18 19:43:37 +02:00
|
|
|
Source100: %{name}-rpmlintrc
|
2015-01-06 00:47:56 +01:00
|
|
|
# Fix-SuSE: provide useful default config
|
2012-06-04 00:09:36 +02:00
|
|
|
Patch0: %{name}-config.patch
|
2015-01-06 00:47:56 +01:00
|
|
|
# Fix-SUSE: auto config for pma storage
|
|
|
|
Patch1: %{name}-pma.patch
|
2011-02-25 15:41:08 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
PreReq: pwgen coreutils sed grep
|
|
|
|
BuildRequires: apache2-devel
|
2014-01-01 16:38:50 +01:00
|
|
|
BuildRequires: python-devel
|
2011-02-25 15:41:08 +01:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
|
|
|
#
|
2011-07-04 16:05:23 +02:00
|
|
|
Requires: mod_php_any
|
|
|
|
Requires: php-bz2
|
|
|
|
Requires: php-gd
|
|
|
|
Requires: php-iconv
|
|
|
|
Requires: php-mbstring
|
|
|
|
Requires: php-mcrypt
|
|
|
|
Requires: php-mysql
|
|
|
|
Requires: php-session
|
|
|
|
Requires: php-zlib
|
2011-02-25 15:41:08 +01:00
|
|
|
Recommends: php5-zip
|
|
|
|
|
|
|
|
%description
|
|
|
|
phpMyAdmin can manage a whole MySQL server (needs a super-user) as well as 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 appropriate part in the MySQL manual.
|
|
|
|
|
|
|
|
Currently phpMyAdmin can:
|
|
|
|
|
|
|
|
* browse and drop databases, tables, views, fields and indexes
|
|
|
|
* create, copy, drop, rename and alter databases, tables, fields and indexes
|
|
|
|
* maintenance server, databases and tables, with proposals on server
|
|
|
|
configuration
|
|
|
|
* execute, edit and bookmark any SQL-statement, even batch-queries
|
|
|
|
* load text files into tables
|
|
|
|
* create^1 and read dumps of tables
|
|
|
|
* export^1 data to various formats: CSV, XML, PDF, ISO/IEC 26300 -
|
|
|
|
OpenDocument Text and Spreadsheet, Word, Excel and L^AT[E]X formats
|
|
|
|
* import data and MySQL structures from Microsoft Excel and OpenDocument
|
|
|
|
spreadsheets, as well as XML, CSV, and SQL files
|
|
|
|
* administer multiple servers
|
|
|
|
* manage MySQL users and privileges
|
|
|
|
* check referential integrity in MyISAM tables
|
|
|
|
* using Query-by-example (QBE), create complex queries automatically
|
|
|
|
connecting required tables
|
|
|
|
* create PDF graphics of your Database layout
|
|
|
|
* search globally in a database or a subset of it
|
|
|
|
* transform stored data into any format using a set of predefined functions,
|
|
|
|
like displaying BLOB-data as image or download-link
|
|
|
|
* track changes on databases, tables and views
|
|
|
|
* support InnoDB tables and foreign keys (see FAQ 3.6)
|
|
|
|
* support mysqli, the improved MySQL extension (see FAQ 1.17)
|
|
|
|
* communicate in 57 different languages
|
|
|
|
* synchronize two databases residing on the same as well as remote servers
|
|
|
|
(see FAQ 9.1)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}-all-languages
|
2012-11-05 13:36:01 +01:00
|
|
|
## rpmlint:
|
|
|
|
# wrong-file-end-of-line-encoding
|
|
|
|
%{__perl} -p -i -e 's|\r\n|\n|' examples/config.manyhosts.inc.php
|
2015-01-06 00:47:56 +01:00
|
|
|
%patch0
|
|
|
|
%patch1
|
2011-02-25 15:41:08 +01:00
|
|
|
|
2015-04-03 23:53:53 +02:00
|
|
|
# rpmlint: fix incorrect-fsf-address
|
|
|
|
find . -type f | xargs sed -i -e 's:59 Temple Place\, Suite 330\, Boston\, MA 02111-1307 USA:51 Franklin Street\, Fifth Floor\, Boston\, MA 02110-1301 USA:g'
|
|
|
|
|
2011-02-25 15:41:08 +01:00
|
|
|
find . -type d -exec chmod 755 {} \;
|
|
|
|
find . -type f -exec chmod 644 {} \;
|
|
|
|
find . -type f -name '*.orig' -exec rm {} \;
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2013-04-09 12:04:03 +02:00
|
|
|
#%%{__install} -d -m0750 $RPM_BUILD_ROOT%%{_sysconfdir}/%%{name}
|
2011-02-25 15:41:08 +01:00
|
|
|
%{__install} -d -m0755 $RPM_BUILD_ROOT%{ap_docroot}/%{name}
|
2013-05-17 10:03:09 +02:00
|
|
|
%{__cp} -dR *.css *.php *.ico js libraries locale themes \
|
2011-02-25 15:41:08 +01:00
|
|
|
$RPM_BUILD_ROOT%{ap_docroot}/%{name}
|
|
|
|
# install config to config dir
|
|
|
|
%{__install} -D -m0640 $RPM_BUILD_ROOT%{ap_docroot}/%{name}/config.sample.inc.php \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.inc.php
|
|
|
|
|
|
|
|
# fix libraries/vendor_config.php
|
|
|
|
%{__sed} -i -e "s,@docdir@,%{_docdir}/%{name},g" -e "s,@sysconfdir@,%{_sysconfdir}/%{name},g" \
|
|
|
|
$RPM_BUILD_ROOT%{ap_docroot}/%{name}/libraries/vendor_config.php
|
|
|
|
# fix libraries/common.inc.php
|
2013-04-09 12:04:03 +02:00
|
|
|
#%%{__sed} -i -e "s,@PMA_Config@,%%{_sysconfdir}/%%{name}/config.inc.php,g" \
|
|
|
|
# $RPM_BUILD_ROOT%%{ap_docroot}/%%{name}/libraries/common.inc.php
|
2011-02-25 15:41:08 +01:00
|
|
|
|
|
|
|
# generate file list
|
|
|
|
find $RPM_BUILD_ROOT%{ap_docroot}/%{name} -mindepth 1 -maxdepth 1 -type d | sed -e "s@$RPM_BUILD_ROOT@@" > FILELIST
|
|
|
|
find $RPM_BUILD_ROOT%{ap_docroot}/%{name} -maxdepth 1 -type f | grep -v 'config.inc.php' | sed -e "s@$RPM_BUILD_ROOT@@" >> FILELIST
|
|
|
|
%{__install} -D -m0644 %{S:1} $RPM_BUILD_ROOT%{ap_sysconfdir}/conf.d/%{name}.conf
|
|
|
|
# fix paths in http config
|
|
|
|
%{__sed} -i -e "s,@ap_docroot@,%{ap_docroot},g" -e "s,@name@,%{name},g" \
|
|
|
|
-e "s,@docdir@,%{_docdir},g" $RPM_BUILD_ROOT%{ap_sysconfdir}/conf.d/%{name}.conf
|
|
|
|
|
|
|
|
# rpmlint stuff
|
|
|
|
%if 0%{?suse_version} > 1020
|
2011-12-16 09:38:49 +01:00
|
|
|
%fdupes ${RPM_BUILD_ROOT}%{ap_docroot}/%{name}/libraries
|
|
|
|
%fdupes ${RPM_BUILD_ROOT}%{ap_docroot}/%{name}/themes
|
2011-02-25 15:41:08 +01:00
|
|
|
%endif
|
|
|
|
|
2014-01-01 16:38:50 +01:00
|
|
|
# Fix python-bytecode-inconsistent-mtime
|
|
|
|
rm -rf doc/_ext/configext.pyc
|
|
|
|
pushd doc/_ext
|
|
|
|
%py_compile ./
|
|
|
|
popd
|
|
|
|
|
2011-02-25 15:41:08 +01:00
|
|
|
%post
|
|
|
|
# on `rpm -ivh` PARAM is 1
|
|
|
|
# on `rpm -Uvh` PARAM is 2
|
|
|
|
# set PmaAbsoluteUri ### generate blowfish secret
|
|
|
|
%{__sed} -i -e "s,@FQDN@,$(cat /etc/HOSTNAME)," \
|
|
|
|
-e "s/\\\$cfg\['blowfish_secret'\] = ''/\$cfg['blowfish_secret'] = '`pwgen -s -1 46`'/" %{pma_config}
|
2015-01-06 00:47:56 +01:00
|
|
|
%if 0%{?suse_version} < 1310
|
2011-07-04 16:05:23 +02:00
|
|
|
%restart_on_update apache2
|
2015-01-17 10:41:54 +01:00
|
|
|
#%%else
|
2015-01-06 01:36:11 +01:00
|
|
|
#systemctl try-restart apache2 &>/dev/null
|
2015-01-06 00:47:56 +01:00
|
|
|
%endif
|
2011-02-25 15:41:08 +01:00
|
|
|
|
|
|
|
%postun
|
2015-01-06 00:47:56 +01:00
|
|
|
%if 0%{?suse_version} < 1310
|
2011-02-25 15:41:08 +01:00
|
|
|
%restart_on_update apache2
|
2015-01-17 10:41:54 +01:00
|
|
|
#%%else
|
2015-01-06 01:36:11 +01:00
|
|
|
#systemctl try-restart apache2 &>/dev/null
|
2015-01-06 00:47:56 +01:00
|
|
|
%endif
|
2011-02-25 15:41:08 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
%{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files -f FILELIST
|
|
|
|
%defattr(644,root,root,755)
|
2013-05-17 10:03:09 +02:00
|
|
|
%doc ChangeLog
|
2012-06-04 00:09:36 +02:00
|
|
|
%doc LICENSE README RELEASE-DATE*
|
2013-05-17 10:03:09 +02:00
|
|
|
%doc examples doc
|
2011-02-25 15:41:08 +01:00
|
|
|
%dir %attr(0750,root,%{ap_grp}) %{_sysconfdir}/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/config.inc.php
|
|
|
|
%dir %{ap_docroot}/%{name}
|
|
|
|
%config(noreplace) %{ap_sysconfdir}/conf.d/%{name}.conf
|
|
|
|
|
|
|
|
%changelog
|