Improve pulseaudio support. Fix postinstall script again (#456830)

epel8
Andy Shevchenko 17 years ago
parent 84586aebcd
commit 6e8b94cc7e

@ -11,7 +11,7 @@ Install the required packages:
Add yourself to the pulse-rt and jackuser groups. Add yourself to the pulse-rt and jackuser groups.
usermod -a -G pulse-rt,jackaudio "<your username>" usermod -a -G pulse-rt,jackaudio "<your username>"
Edit /etc/security/limits.conf: Check /etc/security/limits.conf (our package should provide these changes):
@jackuser - rtprio 20 @jackuser - rtprio 20
@jackuser - memlock 4194304 @jackuser - memlock 4194304
@ -23,28 +23,9 @@ Switch to your normal user account.
Create ~/bin subdirectory if absent: Create ~/bin subdirectory if absent:
mkdir -p ~/bin mkdir -p ~/bin
Create the pulseaudio start file ~/bin/jack.pa: Copy the pulseaudio start file:
cp /usr/share/doc/jack-audio-connection-kit-*/jack-audio-connection-kit.pa ~/bin/jack.pa
#!/usr/bin/pulseaudio -nF chmod 755 ~/bin/jack.pa
load-module module-jack-sink
load-module module-jack-source
load-module module-native-protocol-unix
load-module module-volume-restore
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-suspend-on-idle
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
.ifexists module-x11-publish.so
.nofail
load-module module-x11-publish
.fail
.endif
Close all your sessions and relogin to get the new group permissions and Close all your sessions and relogin to get the new group permissions and
limits. limits.

@ -0,0 +1,20 @@
#!/usr/bin/pulseaudio -nF
load-module module-jack-sink
load-module module-jack-source
load-module module-native-protocol-unix
load-module module-volume-restore
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-suspend-on-idle
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
.ifexists module-x11-publish.so
.nofail
load-module module-x11-publish
.fail
.endif

@ -1,11 +1,12 @@
Summary: The Jack Audio Connection Kit Summary: The Jack Audio Connection Kit
Name: jack-audio-connection-kit Name: jack-audio-connection-kit
Version: 0.109.2 Version: 0.109.2
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2 and LGPLv2 License: GPLv2 and LGPLv2
Group: System Environment/Daemons Group: System Environment/Daemons
Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz
Source1: %{name}-README.Fedora Source1: %{name}-README.Fedora
Source2: %{name}-script.pa
Patch0: jack-audio-connection-kit-0.109.2-bz451531.patch Patch0: jack-audio-connection-kit-0.109.2-bz451531.patch
URL: http://www.jackaudio.org URL: http://www.jackaudio.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -18,9 +19,11 @@ BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool
BuildRequires: libfreebob-devel >= 1.0.0 BuildRequires: libfreebob-devel >= 1.0.0
%define groupname jackuser %define groupname jackuser
%define pagroup pulse-rt
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): /sbin/ldconfig Requires(post): /sbin/ldconfig
Requires(post): pam
%description %description
JACK is a low-latency audio server, written primarily for the Linux JACK is a low-latency audio server, written primarily for the Linux
@ -80,6 +83,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
# prepare README.Fedora for documentation including # prepare README.Fedora for documentation including
install -p -m644 %{SOURCE1} README.Fedora install -p -m644 %{SOURCE1} README.Fedora
# install pulseaudio script for jack (as documentation part)
install -p -m644 %{SOURCE2} jack-audio-connection-kit.pa
# remove extra install of the documentation # remove extra install of the documentation
rm -fr $RPM_BUILD_ROOT%{_docdir} rm -fr $RPM_BUILD_ROOT%{_docdir}
@ -108,12 +114,21 @@ grep -q %groupname /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/sec
@%groupname - memlock 4194304 @%groupname - memlock 4194304
EOF EOF
# Add default limits for pulse-rt group
grep -q %pagroup /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/security/limits.conf << EOF
## Automatically appended by jack-audio-connection-kit
@%pagroup - rtprio 20
@%pagroup - nice -20
EOF
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS TODO COPYING* %doc AUTHORS TODO COPYING*
%doc README.Fedora %doc README.Fedora
%doc jack-audio-connection-kit.pa
%{_bindir}/jackd %{_bindir}/jackd
%{_bindir}/jack_load %{_bindir}/jack_load
%{_bindir}/jack_unload %{_bindir}/jack_unload
@ -148,6 +163,13 @@ EOF
%{_bindir}/jack_midisine %{_bindir}/jack_midisine
%changelog %changelog
* Mon Jul 28 2008 Andy Shevchenko <andy@smile.org.ua> 0.109.2-3
- add a new requirement to be ensure we have /etc/security for postinstall
script (#359291, #456830)
- provide a pulseaudio start script from README.Fedora
- append values for pulse-rt group to the limits.conf
- update README.Fedora regarding to the recent changes
* Sun Jul 20 2008 Andy Shevchenko <andy@smile.org.ua> 0.109.2-2 * Sun Jul 20 2008 Andy Shevchenko <andy@smile.org.ua> 0.109.2-2
- apply patch to be work on ppc64 (#451531) - apply patch to be work on ppc64 (#451531)
- update README.Fedora to describe integration jack with pulseaudio (#455193) - update README.Fedora to describe integration jack with pulseaudio (#455193)

Loading…
Cancel
Save