1 |
Summary: smeserver specific mysql57 configuration and templates. |
2 |
%define name smeserver-mysql57 |
3 |
Name: %{name} |
4 |
%define version 2.0.0 |
5 |
%define release 1 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Networking/Daemons |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
12 |
BuildArchitectures: noarch |
13 |
Requires: mysql57-mysql-server |
14 |
Requires: mysql57-mysql |
15 |
Requires: mysql57-runtime |
16 |
Requires: mysql57-mysql-libs |
17 |
Requires: mysql57 |
18 |
Requires: e-smith-base |
19 |
Requires: e-smith-lib >= 1.15.1-19 |
20 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
21 |
AutoReqProv: no |
22 |
|
23 |
%changelog |
24 |
* Sun Feb 19 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-1.sme |
25 |
- first version forked from smeserver-mysql57-2.0.0-5 |
26 |
|
27 |
|
28 |
%description |
29 |
This package adds necessary startup and configuration items for |
30 |
mysql57. |
31 |
|
32 |
%prep |
33 |
%setup |
34 |
|
35 |
|
36 |
%build |
37 |
mkdir -p root/etc/e-smith/sql/init57 |
38 |
perl createlinks |
39 |
|
40 |
# add this for mysql.com rpm compatibility |
41 |
#mkdir -p root/var/run/mysql57-mysqld |
42 |
# we hould we rather link to the actual dir in opt , done in createlinks |
43 |
|
44 |
mkdir -p root/etc/rc.d/init.d/supervise |
45 |
ln -s ../daemontools root/etc/rc.d/init.d/supervise/mysql57-mysqld |
46 |
|
47 |
mkdir -p root/etc/rc.d/rc7.d |
48 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S50mysql57-mysqld |
49 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S99mysql57-mysql.init |
50 |
|
51 |
mkdir -p root/service |
52 |
ln -s /var/service/mysql57-mysqld root/service |
53 |
touch root/var/service/mysql57-mysqld/down |
54 |
|
55 |
mkdir -p root/var/log/mysql57-mysqld |
56 |
mkdir -p root/home/e-smith/db/mysql57 |
57 |
|
58 |
|
59 |
%install |
60 |
rm -rf $RPM_BUILD_ROOT |
61 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
62 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
63 |
--dir /var/run/mysql57-mysqld 'attr(0757,mysql,mysql)' \ |
64 |
--file /var/service/mysql57-mysqld/run 'attr(0757,root,root)' \ |
65 |
--file /var/service/mysql57-mysqld/control/t 'attr(0750,root,root)' \ |
66 |
--file /var/service/mysql57-mysqld/control/d 'attr(0750,root,root)' \ |
67 |
--file /var/service/mysql57-mysqld/control/i 'attr(0750,root,root)' \ |
68 |
--file /var/service/mysql57-mysqld/control/q 'attr(0750,root,root)' \ |
69 |
--file /var/service/mysql57-mysqld/log/run 'attr(0757,root,root)' \ |
70 |
--dir '/var/log/mysql57-mysqld' 'attr(2750,smelog,smelog)' \ |
71 |
--dir '/home/e-smith/db/mysql57' 'attr(0750,root,root)' \ |
72 |
> %{name}-%{version}-filelist |
73 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
74 |
|
75 |
%clean |
76 |
rm -rf $RPM_BUILD_ROOT |
77 |
|
78 |
%pre |
79 |
%preun |
80 |
|
81 |
%post |
82 |
## mysql.com compatibility |
83 |
#[ -e /etc/rc.d/init.d/mysql57-mysqld ] || ln -s ./mysql /etc/rc.d/init.d/mysql57-mysqld |
84 |
|
85 |
%postun |
86 |
#if [ "$1" == 0 ]; then |
87 |
# [ -L /etc/rc.d/init.d/mysql57-mysqld ] && rm /etc/rc.d/init.d/mysql57-mysqld || : |
88 |
#fi |
89 |
|
90 |
%files -f %{name}-%{version}-filelist |
91 |
%defattr(-,root,root) |