Accepting request 204920 from home:posophe:branches:devel:languages:erlang:Factory
Add systemd support for openSUSE >= 12.3 OBS-URL: https://build.opensuse.org/request/show/204920 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang:Factory/erlang?expand=0&rev=6
This commit is contained in:
parent
a50687532e
commit
702959bda8
11
epmd.service
Normal file
11
epmd.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Erlang Port Mapper Daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=/etc/sysconfig/epmd
|
||||||
|
ExecStart=/usr/bin/epmd -daemon $EPMD_OPTS
|
||||||
|
ExecStop=/usr/bin/epmd -kill
|
||||||
|
Type=forking
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
epmd.socket
Normal file
9
epmd.socket
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Conflicts=epmd.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=4369
|
||||||
|
Accept=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 27 17:07:46 UTC 2013 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Add systemd support for openSUSE >= 12.3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 19 06:13:18 UTC 2013 - matwey.kornilov@gmail.com
|
Thu Sep 19 06:13:18 UTC 2013 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
34
erlang.spec
34
erlang.spec
@ -33,6 +33,8 @@ Source3: %{name}-rpmlintrc
|
|||||||
Source4: epmd.init
|
Source4: epmd.init
|
||||||
Source5: erlang.sysconfig
|
Source5: erlang.sysconfig
|
||||||
Source6: macros.erlang
|
Source6: macros.erlang
|
||||||
|
Source7: epmd.service
|
||||||
|
Source8: epmd.socket
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch0: otp-R16B-rpath.patch
|
Patch0: otp-R16B-rpath.patch
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
@ -54,12 +56,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
BuildRequires: Mesa-devel
|
BuildRequires: Mesa-devel
|
||||||
BuildRequires: java-devel >= 1.6.0
|
BuildRequires: java-devel >= 1.6.0
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
%if 0%{?sles_version} >= 10
|
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1020
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
BuildRequires: wxWidgets
|
BuildRequires: wxWidgets
|
||||||
@ -70,6 +68,11 @@ BuildRequires: wxWidgets-wxcontainer-devel
|
|||||||
BuildRequires: wxGTK-devel >= 2.8
|
BuildRequires: wxGTK-devel >= 2.8
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
%define epmd_home %{_var}/lib/epmd
|
%define epmd_home %{_var}/lib/epmd
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -383,11 +386,17 @@ find . -name "start_erl*" | xargs chmod 755
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -d -m 0750 %{buildroot}%{epmd_home}
|
install -d -m 0750 %{buildroot}%{epmd_home}
|
||||||
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
install -D -m 0755 %{S:7} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
|
install -D -m 0755 %{S:8} %{buildroot}%{_unitdir}/%{name}.socket
|
||||||
|
ln -s %{_unitdir}/%{name}.service %{buildroot}%{_sbindir}/rcepmd
|
||||||
|
%else
|
||||||
install -D -m 0755 %{S:4} %{buildroot}/etc/init.d/epmd
|
install -D -m 0755 %{S:4} %{buildroot}/etc/init.d/epmd
|
||||||
|
ln -s /etc/init.d/epmd %{buildroot}%{_sbindir}/rcepmd
|
||||||
|
%endif
|
||||||
install -D -m 0644 %{S:5} %{buildroot}/var/adm/fillup-templates/sysconfig.erlang
|
install -D -m 0644 %{S:5} %{buildroot}/var/adm/fillup-templates/sysconfig.erlang
|
||||||
install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/rpm/macros.erlang
|
install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/rpm/macros.erlang
|
||||||
install -d -m 0755 %{buildroot}%{_sbindir}
|
|
||||||
ln -s /etc/init.d/epmd %{buildroot}%{_sbindir}/rcepmd
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r epmd &>/dev/null || :
|
/usr/sbin/groupadd -r epmd &>/dev/null || :
|
||||||
@ -398,11 +407,19 @@ ln -s /etc/init.d/epmd %{buildroot}%{_sbindir}/rcepmd
|
|||||||
%fillup_only erlang
|
%fillup_only erlang
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_del_preun %{name}.service %{name}.socket
|
||||||
|
%else
|
||||||
%stop_on_removal epmd
|
%stop_on_removal epmd
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_del_postun %{name}.service %{name}.socket
|
||||||
|
%else
|
||||||
%restart_on_update epmd
|
%restart_on_update epmd
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -472,7 +489,12 @@ ln -s /etc/init.d/epmd %{buildroot}%{_sbindir}/rcepmd
|
|||||||
%{_libdir}/erlang/Install
|
%{_libdir}/erlang/Install
|
||||||
%{_datadir}/emacs/site-lisp/erlang.el
|
%{_datadir}/emacs/site-lisp/erlang.el
|
||||||
%dir %attr(-,epmd,epmd) %{epmd_home}
|
%dir %attr(-,epmd,epmd) %{epmd_home}
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
|
%{_unitdir}/%{name}.socket
|
||||||
|
%else
|
||||||
/etc/init.d/epmd
|
/etc/init.d/epmd
|
||||||
|
%endif
|
||||||
%{_sbindir}/rcepmd
|
%{_sbindir}/rcepmd
|
||||||
/var/adm/fillup-templates/sysconfig.erlang
|
/var/adm/fillup-templates/sysconfig.erlang
|
||||||
%config %{_sysconfdir}/rpm/macros.erlang
|
%config %{_sysconfdir}/rpm/macros.erlang
|
||||||
|
Loading…
x
Reference in New Issue
Block a user