1
0
forked from pool/glusterfs

Systemd service file

OBS-URL: https://build.opensuse.org/package/show/filesystems/glusterfs?expand=0&rev=16
This commit is contained in:
Jan Engelhardt 2012-11-15 00:51:48 +00:00 committed by Git OBS Bridge
parent b71c647f86
commit ea25762b6b
2 changed files with 19 additions and 6 deletions

View File

@ -4,6 +4,7 @@ Fri Nov 9 21:47:11 UTC 2012 - jengelh@inai.de
- Update to new upstream release 3.4.0qa2
* No changelog provided by upstream
- Remove glusterfs-init.diff, merged upstream
- Provide systemd service file
-------------------------------------------------------------------
Wed Oct 31 12:19:47 UTC 2012 - jengelh@inai.de

View File

@ -31,6 +31,7 @@ Url: http://gluster.org/
#Git-Clone: git://github.com/gluster/glusterfs
Source: %name-%rversion.tar.xz
Source3: glusterd.service
Patch1: glusterfs-date.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: automake
@ -53,6 +54,9 @@ BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(uuid)
%endif
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%endif
Requires: python
%description
@ -161,19 +165,24 @@ find "$b/%_libdir" -maxdepth 1 -type f -name "*.la" -delete;
# W: wrong-file-end-of-line-encoding
perl -i -pe 's{\x0d\x0a}{\x0a}gs' %_docdir/%name/glusterfs-mode.el;
%if 0%{?_unitdir:1}
mkdir -p "$b/%_unitdir";
install -pm0644 "%{S:3}" "$b/%_unitdir/";
%endif
%fdupes %buildroot
%pre
%service_add_pre glusterd.service
%post
/sbin/ldconfig
%insserv_cleanup
%restart_on_update glusterd
%service_add_post glusterd.service
%preun
%stop_on_removal glusterd
%service_del_preun glusterd.service
%postun
/sbin/ldconfig
%insserv_cleanup
%service_del_postun glusterd.service
%post -n %lname_api -p /sbin/ldconfig
%postun -n %lname_api -p /sbin/ldconfig
@ -199,6 +208,9 @@ perl -i -pe 's{\x0d\x0a}{\x0a}gs' %_docdir/%name/glusterfs-mode.el;
%_docdir/%name
%_localstatedir/lib/glusterd
%_localstatedir/log/%name
%if 0%{?_unitdir:1}
%_unitdir/glusterd.service
%endif
%files -n %lname_api
%defattr(-,root,root)