1 |
# $Id$ |
# $Id: smeserver-phpmyadmin-multiuser.spec,v 1.2 2008/04/02 15:03:59 slords Exp $ |
2 |
# Authority: nocvs |
# Authority: nocvs |
3 |
# Name: Michel Van hees |
# Name: Michel Van hees |
4 |
|
|
6 |
%define name smeserver-phpmyadmin-multiuser |
%define name smeserver-phpmyadmin-multiuser |
7 |
Name: %{name} |
Name: %{name} |
8 |
%define version 2.11.3 |
%define version 2.11.3 |
9 |
%define release 1 |
%define release 2 |
10 |
Version: %{version} |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
12 |
License: Freely distributable |
License: Freely distributable |
13 |
Group: Apache |
Group: Apache |
14 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
15 |
#Patch0: %{name}-%{version}.patch.yyyymmddnn |
Patch0: smeserver-phpmyadmin-multiuser-2.11.3-RemoveCreatelinks.patch |
16 |
|
Patch1: smeserver-phpmyadmin-multiuser-2.11.3-RemoveLicense.patch |
17 |
|
Patch2: smeserver-phpmyadmin-multiuser-2.11.3-initDB.patch |
18 |
|
Patch3: smeserver-phpmyadmin-multiuser-2.11.3-Relocate.patch |
19 |
|
Patch4: smeserver-phpmyadmin-multiuser-2.11.3-Alias.patch |
20 |
|
|
21 |
BuildRoot: /var/tmp/e-smith-buildroot |
BuildRoot: /var/tmp/e-smith-buildroot |
22 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
23 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
24 |
Requires: smeserver-release >= 7 |
Requires: smeserver-release >= 7 |
25 |
|
Requires: phpmyadmin |
26 |
AutoReqProv: no |
AutoReqProv: no |
27 |
|
|
28 |
%changelog |
%changelog |
29 |
|
* Thu May 15 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 2.11.3-2 |
30 |
|
- Move database entries out of spec file |
31 |
|
- Removed phpmyadmin core from contrib |
32 |
|
- Removed createlinks script as it is not used |
33 |
|
- Removed GPL license from the package |
34 |
|
- Removed warning messages from SPEC file |
35 |
|
- Removed MySQL commands from SPEC file |
36 |
|
|
37 |
* Wed Dec 13 2007 Michel Van hees <michel@vanhees.cc> |
* Wed Dec 13 2007 Michel Van hees <michel@vanhees.cc> |
38 |
- update contrib to phpmyadmin 2.11.3 |
- update contrib to phpmyadmin 2.11.3 |
39 |
|
|
97 |
|
|
98 |
%prep |
%prep |
99 |
%setup |
%setup |
100 |
#%patch0 -p1 |
rm -rf root/opt |
101 |
#%patch1 -p1 |
%patch0 -p1 -E |
102 |
|
%patch1 -p1 -E |
103 |
|
%patch2 -p1 |
104 |
|
%patch3 -p1 |
105 |
|
%patch4 -p1 |
106 |
|
|
107 |
%build |
%build |
|
perl createlinks |
|
108 |
|
|
109 |
%install |
%install |
110 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
116 |
%clean |
%clean |
117 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
118 |
|
|
|
%pre |
|
|
/sbin/e-smith/db accounts set phpmyadminmulti reserved |
|
|
|
|
|
%preun |
|
|
|
|
|
%post |
|
|
/sbin/e-smith/db configuration set phpmyadminmulti service |
|
|
/sbin/e-smith/db configuration setprop phpmyadminmulti access private |
|
|
|
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
|
|
service httpd-e-smith sigusr1 |
|
|
|
|
|
if [ $1 = 1 ] ; then |
|
|
mysql --execute="grant all privileges on *.* to admin@localhost identified by 'admin' WITH GRANT OPTION" |
|
|
mysql --execute="flush privileges" |
|
|
fi |
|
|
|
|
|
case "${LANG:0:2}" in |
|
|
fr) |
|
|
echo "" |
|
|
echo "Vous pouvez maintenant acceder à phpmyadmin via un browser web de la maniere suivante https://nom_server/myadmin" |
|
|
echo "Vous pourrez vous loger sous admin avec comme mot de pass admin. N'oublier pas de le changer!" |
|
|
echo "Si vous mettez à jour une version 2.1 ou supérieur, le mot de passe admin n'aura pas changer!" |
|
|
echo "" |
|
|
echo "Attention !!!!!" |
|
|
echo "PHPMyadmin est limité en accès au réseau interne, donc pas depuis internet" |
|
|
echo "Vous pouvez changer cette option avec les commandes :" |
|
|
echo "db configuration setprop phpmyadminmulti access public" |
|
|
echo "signal-events console-save" |
|
|
echo "" |
|
|
;; |
|
|
*) |
|
|
echo "" |
|
|
echo "Now you can access phpmyadmin though your browser at https://server_name/myadmin" |
|
|
echo "You can connect using login admin and password admin. Don't forget to change it" |
|
|
echo "If you update a 2.1 version of this contribs, admin password don't change!" |
|
|
echo "" |
|
|
echo "BEWARE !!!" |
|
|
echo "PHPMyadmin is now limited to internal network, so it couldn't be access from internet" |
|
|
echo "You can change this with the following command :" |
|
|
echo "db configuration setprop phpmyadminmulti access public" |
|
|
echo "signal-events console-save" |
|
|
echo "" |
|
|
;; |
|
|
esac |
|
|
|
|
|
%postun |
|
|
/sbin/e-smith/db configuration delete phpmyadminmulti |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
|
|
/sbin/e-smith/db accounts delete phpmyadminmulti |
|
|
service httpd-e-smith sigusr1 |
|
|
if [ $1 = 0 ] ; then |
|
|
mysql --execute="delete from mysql.user where User='admin'" |
|
|
mysql --execute="flush privileges" |
|
|
fi |
|
|
|
|
119 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
120 |
%defattr(-,root,root) |
%defattr(-,root,root) |