- clean up old macros
OBS-URL: https://build.opensuse.org/package/show/games:tools/mumble?expand=0&rev=38
This commit is contained in:
parent
65056caac1
commit
a8349d2b88
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 1 09:23:58 UTC 2013 - lnussel@suse.de
|
||||
|
||||
- clean up old macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 18:19:15 UTC 2013 - pascal.bleser@opensuse.org
|
||||
|
||||
|
63
mumble.spec
63
mumble.spec
@ -152,14 +152,6 @@ Provides: mumble = %version
|
||||
#
|
||||
%endif
|
||||
#
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%if 0%{?suse_version} > 1220
|
||||
%define _unitdir /usr/lib/systemd
|
||||
%else
|
||||
%define _unitdir /lib/systemd
|
||||
%endif
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
|
||||
%description
|
||||
Low-latency, high-quality voice communication for gamers. Includes game
|
||||
@ -177,9 +169,7 @@ PreReq: /usr/sbin/useradd
|
||||
Conflicts: mumble-server < %version
|
||||
Provides: mumble-server = %version
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%description server
|
||||
Low-latency, high-quality voice communication for gamers. Includes game
|
||||
@ -336,7 +326,10 @@ install -D -m 0755 release/mumble11x %{buildroot}%{_bindir}/mumble11x
|
||||
#
|
||||
# server
|
||||
install -D -m 0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd"
|
||||
%if 0%{?suse_version} < 1310
|
||||
install -D -m 0755 %{SOURCE2} %{buildroot}/etc/init.d/mumble-server
|
||||
ln -s /etc/init.d/mumble-server %{buildroot}%{_sbindir}/rcmumble-server
|
||||
%endif
|
||||
install -D -m 0644 %{SOURCE3} %{buildroot}/etc/apparmor.d/usr.sbin.murmurd
|
||||
%if 0%{?suse_version} < 1220
|
||||
sed -i -e 's,/usr/bin/grep,/bin/grep,;s,/usr/bin/sed,/bin/sed,' %{buildroot}/etc/apparmor.d/usr.sbin.murmurd
|
||||
@ -345,7 +338,6 @@ install -d -m 0755 %{buildroot}%{_bindir}
|
||||
# can be launched as user too but apparmor profile doesn't make
|
||||
# sense in that case. So use link to avoid the profile.
|
||||
ln -s %{_sbindir}/murmurd %{buildroot}%{_bindir}/murmurd
|
||||
ln -s /etc/init.d/mumble-server %{buildroot}%{_sbindir}/rcmumble-server
|
||||
install -D -m 0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/mumble-server.conf
|
||||
install -D -m 0644 scripts/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini
|
||||
# fix up config file
|
||||
@ -377,28 +369,12 @@ sed -e '/^Name=/s/$/ 1.1.x/;/^Exec=/s/$/11x/' \
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp -a scripts LICENSE README README.Linux %{buildroot}%{_docdir}/%{name}
|
||||
#
|
||||
%if 0%{?suse_version} >= 1130
|
||||
%if 0%{?suse_version} == 1130
|
||||
mkdir %buildroot/etc/tmpdirs.d/
|
||||
cat >> %buildroot/etc/tmpdirs.d/50_mumble-server <<EOF
|
||||
#!/bin/sh
|
||||
while read t f m o g xxx; do
|
||||
[ "$t" = d ] || continue
|
||||
install -d -m $m -o $o -g $g $f
|
||||
done < /usr/lib/tmpfiles.d/mumble-server.conf
|
||||
EOF
|
||||
%endif
|
||||
mkdir -p %buildroot/usr/lib/tmpfiles.d
|
||||
cat >> %buildroot/usr/lib/tmpfiles.d/mumble-server.conf <<EOF
|
||||
d /var/run/mumble-server 0755 mumble-server mumble-server -
|
||||
EOF
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1140
|
||||
# service file
|
||||
install -d "%{buildroot}%{_unitdir}/system"
|
||||
install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/system/mumble-server.service
|
||||
%endif
|
||||
#
|
||||
install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/mumble-server.service
|
||||
|
||||
%clean
|
||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||
@ -409,27 +385,23 @@ getent passwd mumble-server >/dev/null || \
|
||||
/usr/sbin/useradd -r -d /var/lib/mumble-server -s /bin/false -c "Mumble VoIP Server" -g mumble-server mumble-server 2> /dev/null || :
|
||||
|
||||
%preun server
|
||||
%if 0%{?suse_version}
|
||||
%if 0%{?suse_version} < 1310
|
||||
%stop_on_removal mumble-server
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_del_preun mumble-server.service
|
||||
%endif
|
||||
|
||||
%post server
|
||||
%if 0%{?suse_version} < 1310
|
||||
%fillup_and_insserv mumble-server
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_add_post mumble-server.service
|
||||
%endif
|
||||
%service_add_post mumble-server.service
|
||||
|
||||
%postun server
|
||||
%if 0%{?suse_version}
|
||||
%if 0%{?suse_version} < 1310
|
||||
%restart_on_update mumble-server
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1140
|
||||
%service_del_postun mumble-server.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
@ -456,10 +428,12 @@ getent passwd mumble-server >/dev/null || \
|
||||
%doc %{_docdir}/%{name}/scripts/murmur.ini
|
||||
%config %{_sysconfdir}/dbus-1/system.d/mumble-server.conf
|
||||
%config(noreplace) %{_sysconfdir}/mumble-server.ini
|
||||
%if 0%{?suse_version} < 1310
|
||||
/etc/init.d/mumble-server
|
||||
%{_sbindir}/rcmumble-server
|
||||
%endif
|
||||
%dir /etc/apparmor.d
|
||||
/etc/apparmor.d/usr.sbin.murmurd
|
||||
%{_sbindir}/rcmumble-server
|
||||
%{_sbindir}/murmurd
|
||||
%{_bindir}/murmurd
|
||||
%{_bindir}/murmur-user-wrapper
|
||||
@ -467,17 +441,8 @@ getent passwd mumble-server >/dev/null || \
|
||||
%{_mandir}/man1/murmur-user-wrapper.*
|
||||
%dir %attr(-,mumble-server,mumble-server) /var/lib/mumble-server
|
||||
%dir /var/log/mumble-server
|
||||
%if 0%{?suse_version} < 1130
|
||||
%dir %attr(-,mumble-server,mumble-server) /var/run/mumble-server
|
||||
%else
|
||||
%if 0%{?suse_version} == 1130
|
||||
%config /etc/tmpdirs.d/50_mumble-server
|
||||
%endif
|
||||
%dir /usr/lib/tmpfiles.d
|
||||
%config /usr/lib/tmpfiles.d/mumble-server.conf
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%config %{_unitdir}/system/mumble-server.service
|
||||
%endif
|
||||
/usr/lib/tmpfiles.d/mumble-server.conf
|
||||
%{_unitdir}/mumble-server.service
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user