1 |
unnilennium |
1.1 |
Summary: smeserver specific mysql55 configuration and templates. |
2 |
|
|
%define name smeserver-mysql55 |
3 |
|
|
Name: %{name} |
4 |
|
|
%define version 1.0.0 |
5 |
|
|
%define release 4 |
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: mysql55-mysql-server |
14 |
|
|
Requires: mysql55-mysql |
15 |
|
|
Requires: mysql55-runtime |
16 |
|
|
Requires: mysql55-mysql-libs |
17 |
|
|
Requires: mysql55 |
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 |
|
|
* Mon May 19 2014 JP Pialasse <tests@pialasse.com> 1.0.0-4.sme |
25 |
|
|
- initial release from e-smith-mysql 2.0.0-4 |
26 |
|
|
|
27 |
|
|
%description |
28 |
|
|
This package adds necessary startup and configuration items for |
29 |
|
|
mysql55. |
30 |
|
|
|
31 |
|
|
%prep |
32 |
|
|
%setup |
33 |
|
|
#%patch0 -p1 |
34 |
|
|
|
35 |
|
|
%build |
36 |
|
|
mkdir -p root/etc/e-smith/sql/init55 |
37 |
|
|
perl createlinks |
38 |
|
|
|
39 |
|
|
# add this for mysql.com rpm compatibility |
40 |
|
|
#mkdir -p root/var/run/mysql55-mysqld |
41 |
|
|
# we hould we rather link to the actual dir in opt , done in createlinks |
42 |
|
|
|
43 |
|
|
mkdir -p root/etc/rc.d/init.d/supervise |
44 |
|
|
ln -s ../daemontools root/etc/rc.d/init.d/supervise/mysql55-mysqld |
45 |
|
|
|
46 |
|
|
mkdir -p root/etc/rc.d/rc7.d |
47 |
|
|
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S50mysql55-mysqld |
48 |
|
|
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S99mysql55-mysql.init |
49 |
|
|
|
50 |
|
|
mkdir -p root/service |
51 |
|
|
ln -s /var/service/mysql55-mysqld root/service |
52 |
|
|
touch root/var/service/mysql55-mysqld/down |
53 |
|
|
|
54 |
|
|
mkdir -p root/var/log/mysql55-mysqld |
55 |
|
|
mkdir -p root/home/e-smith/db/mysql55 |
56 |
|
|
|
57 |
|
|
|
58 |
|
|
%install |
59 |
|
|
rm -rf $RPM_BUILD_ROOT |
60 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
61 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
62 |
|
|
--dir /var/run/mysql55-mysqld 'attr(0755,mysql,mysql)' \ |
63 |
|
|
--file /var/service/mysql55-mysqld/run 'attr(0755,root,root)' \ |
64 |
|
|
--file /var/service/mysql55-mysqld/control/t 'attr(0750,root,root)' \ |
65 |
|
|
--file /var/service/mysql55-mysqld/control/d 'attr(0750,root,root)' \ |
66 |
|
|
--file /var/service/mysql55-mysqld/control/i 'attr(0750,root,root)' \ |
67 |
|
|
--file /var/service/mysql55-mysqld/control/q 'attr(0750,root,root)' \ |
68 |
|
|
--file /var/service/mysql55-mysqld/log/run 'attr(0755,root,root)' \ |
69 |
|
|
--dir '/var/log/mysql55-mysqld' 'attr(2750,smelog,smelog)' \ |
70 |
|
|
--dir '/home/e-smith/db/mysql55' 'attr(0750,root,root)' \ |
71 |
|
|
> %{name}-%{version}-filelist |
72 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
73 |
|
|
|
74 |
|
|
%clean |
75 |
|
|
rm -rf $RPM_BUILD_ROOT |
76 |
|
|
|
77 |
|
|
%pre |
78 |
|
|
%preun |
79 |
|
|
|
80 |
|
|
%post |
81 |
|
|
## mysql.com compatibility |
82 |
|
|
#[ -e /etc/rc.d/init.d/mysql55-mysqld ] || ln -s ./mysql /etc/rc.d/init.d/mysql55-mysqld |
83 |
|
|
|
84 |
|
|
%postun |
85 |
|
|
#if [ "$1" == 0 ]; then |
86 |
|
|
# [ -L /etc/rc.d/init.d/mysql55-mysqld ] && rm /etc/rc.d/init.d/mysql55-mysqld || : |
87 |
|
|
#fi |
88 |
|
|
|
89 |
|
|
%files -f %{name}-%{version}-filelist |
90 |
|
|
%defattr(-,root,root) |