spec-cleaner
OBS-URL: https://build.opensuse.org/package/show/server:php:applications/phpMyAdmin?expand=0&rev=220
This commit is contained in:
parent
cbf35392a6
commit
65d4285cb9
@ -16,8 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
Name: phpMyAdmin
|
||||
|
||||
%define apxs %{_sbindir}/apxs2
|
||||
%define ap_sysconfdir %(%{apxs} -q SYSCONFDIR)
|
||||
%define ap_serverroot %(%{apxs} -q PREFIX)
|
||||
@ -30,12 +28,12 @@ Name: phpMyAdmin
|
||||
%define ap_usr nobody
|
||||
%define ap_grp nogroup
|
||||
%endif
|
||||
|
||||
Name: phpMyAdmin
|
||||
Version: 4.4.10
|
||||
Release: 0
|
||||
Summary: Administration of MySQL over the web
|
||||
License: GPL-2.0+
|
||||
Group: Productivity/Networking/Web/Frontends
|
||||
Version: 4.4.10
|
||||
Release: 0
|
||||
Url: https://www.phpMyAdmin.net/
|
||||
Source0: https://files.phpmyadmin.net/phpMyAdmin/4.4.10/%{name}-%{version}-all-languages.tar.bz2
|
||||
Source1: https://files.phpmyadmin.net/phpMyAdmin/4.4.10/%{name}-%{version}-all-languages.tar.bz2.asc
|
||||
@ -46,14 +44,8 @@ Source100: %{name}-rpmlintrc
|
||||
Patch0: %{name}-config.patch
|
||||
# Fix-SUSE: auto config for pma storage
|
||||
Patch1: %{name}-pma.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: pwgen coreutils sed grep
|
||||
BuildRequires: apache2-devel
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
#
|
||||
Requires: mod_php_any
|
||||
Requires: php-bz2
|
||||
@ -64,7 +56,17 @@ Requires: php-mcrypt
|
||||
Requires: php-mysql
|
||||
Requires: php-session
|
||||
Requires: php-zlib
|
||||
# FIXME: use proper Requires(pre/post/preun/...)
|
||||
PreReq: coreutils
|
||||
PreReq: grep
|
||||
PreReq: pwgen
|
||||
PreReq: sed
|
||||
Recommends: php5-zip
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
|
||||
%description
|
||||
phpMyAdmin can manage a whole MySQL server (needs a super-user) as well as a
|
||||
@ -105,7 +107,7 @@ Currently phpMyAdmin can:
|
||||
%setup -q -n %{name}-%{version}-all-languages
|
||||
## rpmlint:
|
||||
# wrong-file-end-of-line-encoding
|
||||
%{__perl} -p -i -e 's|\r\n|\n|' examples/config.manyhosts.inc.php
|
||||
perl -p -i -e 's|\r\n|\n|' examples/config.manyhosts.inc.php
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
@ -120,32 +122,32 @@ find . -type f -name '*.orig' -exec rm {} \;
|
||||
|
||||
%install
|
||||
#%%{__install} -d -m0750 $RPM_BUILD_ROOT%%{_sysconfdir}/%%{name}
|
||||
%{__install} -d -m0755 $RPM_BUILD_ROOT%{ap_docroot}/%{name}
|
||||
%{__cp} -dR *.css *.php *.ico js libraries locale themes \
|
||||
$RPM_BUILD_ROOT%{ap_docroot}/%{name}
|
||||
install -d -m0755 %{buildroot}%{ap_docroot}/%{name}
|
||||
cp -dR *.css *.php *.ico js libraries locale themes \
|
||||
%{buildroot}%{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
|
||||
install -D -m0640 %{buildroot}%{ap_docroot}/%{name}/config.sample.inc.php \
|
||||
%{buildroot}%{_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
|
||||
sed -i -e "s,@docdir@,%{_docdir}/%{name},g" -e "s,@sysconfdir@,%{_sysconfdir}/%{name},g" \
|
||||
%{buildroot}%{ap_docroot}/%{name}/libraries/vendor_config.php
|
||||
# fix libraries/common.inc.php
|
||||
#%%{__sed} -i -e "s,@PMA_Config@,%%{_sysconfdir}/%%{name}/config.inc.php,g" \
|
||||
# $RPM_BUILD_ROOT%%{ap_docroot}/%%{name}/libraries/common.inc.php
|
||||
|
||||
# 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:3} $RPM_BUILD_ROOT%{ap_sysconfdir}/conf.d/%{name}.conf
|
||||
find %{buildroot}%{ap_docroot}/%{name} -mindepth 1 -maxdepth 1 -type d | sed -e "s@$RPM_BUILD_ROOT@@" > FILELIST
|
||||
find %{buildroot}%{ap_docroot}/%{name} -maxdepth 1 -type f | grep -v 'config.inc.php' | sed -e "s@$RPM_BUILD_ROOT@@" >> FILELIST
|
||||
install -D -m0644 %{SOURCE3} %{buildroot}%{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
|
||||
sed -i -e "s,@ap_docroot@,%{ap_docroot},g" -e "s,@name@,%{name},g" \
|
||||
-e "s,@docdir@,%{_docdir},g" %{buildroot}%{ap_sysconfdir}/conf.d/%{name}.conf
|
||||
|
||||
# rpmlint stuff
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes ${RPM_BUILD_ROOT}%{ap_docroot}/%{name}/libraries
|
||||
%fdupes ${RPM_BUILD_ROOT}%{ap_docroot}/%{name}/themes
|
||||
%fdupes %{buildroot}%{ap_docroot}/%{name}/libraries
|
||||
%fdupes %{buildroot}%{ap_docroot}/%{name}/themes
|
||||
%endif
|
||||
|
||||
# Fix python-bytecode-inconsistent-mtime
|
||||
@ -158,7 +160,7 @@ popd
|
||||
# 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)," \
|
||||
sed -i -e "s,@FQDN@,$(cat %{_sysconfdir}/HOSTNAME)," \
|
||||
-e "s/\\\$cfg\['blowfish_secret'\] = ''/\$cfg['blowfish_secret'] = '`pwgen -s -1 46`'/" %{pma_config}
|
||||
%if 0%{?suse_version} < 1310
|
||||
%restart_on_update apache2
|
||||
@ -173,9 +175,6 @@ popd
|
||||
#systemctl try-restart apache2 &>/dev/null
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f FILELIST
|
||||
%defattr(644,root,root,755)
|
||||
%doc ChangeLog
|
||||
|
Loading…
Reference in New Issue
Block a user