forked from 3Hren/cocaine-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cocaine-bf.spec
169 lines (130 loc) · 4.82 KB
/
cocaine-bf.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
%define cocaine_runtime_name cocaine-runtime
Summary: Cocaine - Core Libraries
Name: libcocaine-core3
Version: 0.12.0.9
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.github.com/cocaine
Source0: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: boost-devel, boost-iostreams, boost-thread, boost-system
BuildRequires: libmhash-devel, libtool-ltdl-devel, libuuid-devel, libcgroup-devel
BuildRequires: msgpack-devel, libarchive-devel, binutils-devel
%if %{defined rhel} && 0%{?rhel} < 7
BuildRequires: cmake28
%else
BuildRequires: cmake
%endif
Obsoletes: srw
%description
Cocaine is an open application cloud platform.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: boost-devel, libtool-ltdl-devel, msgpack-devel
%description devel
Cocaine development headers package.
%package -n %{cocaine_runtime_name}
Summary: Cocaine - Runtime
Group: Development/Libraries
%description -n %{cocaine_runtime_name}
Cocaine runtime components package.
%prep
%setup -q
%build
%if %{defined rhel}
%if 0%{?rhel} == 6
%{cmake28} -DCOCAINE_LIBDIR=%{_libdir} .
%endif
%if 0%{?rhel} > 6
%{cmake} -DCOCAINE_LIBDIR=%{_libdir} .
%endif
%else
%{cmake} -DCOCAINE_LIBDIR=%{_libdir} .
%endif
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
%if 0%{?fedora} >= 19
# Install systemd unit
install -p -D -m 644 fedora/cocaine-runtime.service %{buildroot}/%{_unitdir}/%{cocaine_runtime_name}.service
%else
install -dD %{buildroot}%{_sysconfdir}/init.d/
install -m 755 debian/cocaine-runtime.init %{buildroot}%{_sysconfdir}/init.d/%{cocaine_runtime_name}
%endif
install -d -m 755 %{buildroot}%{_localstatedir}/run/cocaine
%if 0%{?fedora} >= 19
mkdir -p %{buildroot}%{_tmpfilesdir}
# Install systemd tmpfiles config
install -p -D -m 644 fedora/cocaine-runtime.tmpfiles %{buildroot}%{_tmpfilesdir}/%{cocaine_runtime_name}.conf
%endif
install -d %{buildroot}%{_sysconfdir}/cocaine
install -m644 debian/cocaine-runtime.conf %{buildroot}%{_sysconfdir}/cocaine/cocaine-default.conf
%post -p /sbin/ldconfig
%post -n %{cocaine_runtime_name}
%if 0%{?fedora} >= 19
if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%endif
%postun -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.md
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libcocaine-core.so
%files -n %{cocaine_runtime_name}
%defattr(-,root,root,-)
%{_bindir}/cocaine-runtime
%if 0%{?fedora} >= 19
%{_tmpfilesdir}/%{cocaine_runtime_name}.conf
%{_unitdir}/%{cocaine_runtime_name}.service
%attr(0775,root,zabbix) %dir %{_localstatedir}/run/cocaine
%else
%{_sysconfdir}/init.d/*
%endif
%{_sysconfdir}/cocaine/cocaine-default.conf
%changelog
* Wed Apr 22 2015 Andrey Sibiryov <[email protected]> 0.12.0.9-1
- Native external services support. Standalone native services can now
attach themselves to the Locators to be announced.
- 'Bootstrap is complete' core signal. Services can listen for this signal
to hook into bootstrapping process.
- Blackhole v0.5.
- Bugfix: wrong lock held for certain Locator operations.
- Bugfix: routing streams are now also closed on Locator shutdown.
- Some optimizations and cleanup.
* Fri Apr 17 2015 Evgeny Safronov <[email protected]> 0.12.0.8-1
- Bugfix: fixed app vs. published services list inconsistency.
* Wed Apr 08 2015 Andrey Sibiryov <[email protected]> 0.12.0.7-1
- Remote connections are now retried on failure.
- Bugfix: endpoints while connecting remotes were corrupted in logs.
* Tue Apr 07 2015 Andrey Sibiryov <[email protected]> 0.12.0.6-1
- External service support. Non-native services can now be exposed via the
Cocaine service discovery mechanics, including gateway setup and stuff.
- External routers can now hook up into RG path in Locator and sync all the
routing group changes in realtime.
- Bugfix: multiple versions of the same service in the cluster won't render
such services unusable anymore.
* Fri Apr 03 2015 Andrey Sibiryov <[email protected]> 0.12.0.5-1
- Bugfix: sometimes new Sessions weren't properly registered with Engines.
* Fri Apr 03 2015 Andrey Sibiryov <[email protected]> 0.12.0.4-1
- Multiple thread-safety fixes for Actor, Locator and others.
- Refactored Sessions to enable verbose error logging, at last.
- Reverted setting of TCP_NODELAY option on client sockets.
* Fri Mar 20 2015 Evgeny Safronov <[email protected]> 0.12.0.3-1
- Bugfix: do not read/write from/to already deleted channel.
* Wed Mar 18 2015 Anton Tiurin <[email protected]> 0.12.0.2-1
- Bugfix: pass a valid local hostname in --locator arg for slaves.
* Tue Mar 17 2015 Andrey Sibiryov <[email protected]> 0.12.0.1-1
- Release 0.12.