1 # $Id: jack.spec.in,v 1.5 2003/11/15 22:52:13 trutkin Exp $
2 # set to 0 to build rpms without capabilities support
3 %define enable_capabilities 1
4 # set to 1 to enable alternate jack temporary directory
5 # mounted as tmpfs
6 %define enable_tmpdir 1
7 %if %{enable_tmpdir}
8 %define jack_tmpdir /var/lib/tmp
9 %endif
10 # use port audio
11 %define port_audio 1
12 # strip binaries
13 %define strip_jackd 1
14
15
16 Summary: the Jack Audio Connection Kit
17 Name: jack-audio-connection-kit
18 Version: @JACK_VERSION@
19 Release: 1
20 License: GPL
21 Group: System Environment/Daemons
22 Source0: %{name}-%{version}.tar.gz
23 URL: http://jackit.sourceforge.net
24 BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
25
26 BuildRequires: automake >= 1.6 libsndfile-devel >= 1.0.0
27
28 %if %{port_audio}
29 BuildRequires: portaudio >= 18.1
30 %endif
31
32 %description
33 JACK is a low-latency audio server, written primarily for the Linux
34 operating system. It can connect a number of different applications to
35 an audio device, as well as allowing them to share audio between
36 themselves. Its clients can run in their own processes (ie. as a
37 normal application), or can they can run within a JACK server (ie. a
38 "plugin").
39
40 JACK is different from other audio server efforts in that it has been
41 designed from the ground up to be suitable for professional audio
42 work. This means that it focuses on two key areas: synchronous
43 execution of all clients, and low latency operation.
44
45 %package devel
46 Summary: Header files for Jack
47 Group: Development/Libraries
48 Requires: %{name} = %{version}
49
50 %description devel
51 Header files for the Jack Audio Connection Kit.
52
53 %package example-clients
54 Summary: Example clients that use Jack
55 Group: Applications/Multimedia
56 Requires: %{name} = %{version}
57
58 %description example-clients
59 Small example clients that use the Jack Audio Connection Kit.
60
61 %prep
62 %setup -q
63
64 %build
65 %configure --enable-optimize \
66 %if %{enable_tmpdir}
67 --with-default-tmpdir=%{jack_tmpdir} \
68 %endif
69 %if %{enable_capabilities}
70 --enable-capabilities \
71 %endif
72 %if ! %{port_audio}
73 --disable-portaudio \
74 %endif
75 %if %{strip_jackd}
76 --enable-stripped-jackd
77 %endif
78 make
79
80
81 %install
82 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
83 make install DESTDIR=$RPM_BUILD_ROOT
84
85 %if %{enable_capabilities}
86 # make jackstart suid root
87 chmod 04755 $RPM_BUILD_ROOT%{_bindir}/jackstart
88 %endif
89
90 %if %{enable_tmpdir}
91 # create jack temporary directory
92 mkdir -p $RPM_BUILD_ROOT%{jack_tmpdir}
93 %endif
94
95 # remove extra install of the documentation
96 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/*
97
98 %if %{enable_tmpdir}
99 %preun
100 if [ "$1" = "0" ] ; then
101 # try to unmount the tmpfs filesystem
102 umount %{jack_tmpdir} >/dev/null 2>&1
103 # remove any leftover files after the mount is gone
104 rm -rf %{jack_tmpdir}/* >/dev/null 2>&1
105 fi
106 %endif
107
108 %post
109 /sbin/ldconfig
110 %if %{enable_tmpdir}
111 # add jack temporary directory mount point to fstab
112 if [ -f /etc/fstab ] ; then
113 if grep 'jack' /etc/fstab >/dev/null 2>&1 ; then
114 if ! grep '%{jack_tmpdir}' /etc/fstab >/dev/null 2>&1 ; then
115 echo
116 echo "A line containing \"jack\" was found in /etc/fstab. The mount point"
117 echo "does not match the one needed by this package, so the tmpfs mount line"
118 echo "was not automatically added. Edit /etc/fstab (be very careful!) and"
119 echo "add the following line:"
120 echo " \"none %{jack_tmpdir} tmpfs defaults 0 0\""
121 echo
122 fi
123 else
124 # add the mount point
125 echo "Adding jack tmpfs entry to /etc/fstab..."
126 NEWLINES=$(wc -l /etc/fstab|awk '{print $1}' 2> /dev/null)
127 LINES=$(grep -c '^.*$' /etc/fstab 2> /dev/null)
128 if [ $NEWLINES -lt $LINES ] ; then
129 echo '' >> /etc/fstab || \
130 { echo "failed to add jack tmpfs entry to /etc/fstab" 1>&2 ; exit 0 ; }
131 fi
132 echo 'none %{jack_tmpdir} tmpfs defaults 0 0' \
133 >> /etc/fstab || \
134 { echo "failed to add jack tmpfs entry to /etc/fstab" 1>&2 ; exit 0 ; }
135 echo "Mounting jack tmpfs temporary directory..."
136 mount %{jack_tmpdir} >/dev/null 2>&1 || \
137 { echo "failed to mount jack tmpfs temporary directory" 1>&2 ; exit 0 ; }
138 fi
139 fi
140 %endif
141
142 %postun
143 /sbin/ldconfig
144 %if %{enable_tmpdir}
145 if [ "$1" = "0" ] ; then
146 if grep "%{jack_tmpdir}" /etc/fstab >/dev/null 2>&1 ; then
147 echo "Deleting jack tmpfs fstab entry..."
148 TMP=$(mktemp /tmp/fstab.XXXXXX)
149 grep -v "%{jack_tmpdir}" /etc/fstab > $TMP
150 if [ "$?" == "0" -a -f $TMP -a -s $TMP ] ; then
151 cat $TMP > /etc/fstab
152 else
153 echo "failed to erase jack tmpfs entry from /etc/fstab"
154 fi
155 rm -f $TMP
156 fi
157 fi
158 %endif
159
160 %clean
161 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
162
163 %files
164 %defattr(-,root,root)
165 %doc AUTHORS TODO COPYING* doc/reference
166 %if %{enable_capabilities}
167 %attr(4755, root, root) %{_bindir}/jackstart
168 %endif
169 %{_bindir}/jackd
170 %{_bindir}/jack_load
171 %{_bindir}/jack_unload
172 %{_bindir}/jack_bufsize
173 %{_bindir}/jack_freewheel
174 %{_bindir}/jack_transport
175 %{_libdir}/libjack.so
176 %{_libdir}/libjack.so.0
177 %{_libdir}/libjack.so.0.0.*
178 %{_libdir}/jack/inprocess.so
179 %{_libdir}/jack/intime.so
180 %{_libdir}/jack/jack_alsa.so
181 %{_libdir}/jack/jack_dummy.so
182 %if %{port_audio}
183 %{_libdir}/jack/jack_portaudio.so
184 %endif
185 %{_mandir}/man1/*
186 %if %{enable_tmpdir}
187 %dir %{jack_tmpdir}
188 %attr(0777, root, root) %{jack_tmpdir}
189 %endif
190
191 %files devel
192 %defattr(-,root,root)
193 %{_libdir}/libjack.la
194 %{_libdir}/jack/inprocess.la
195 %{_libdir}/jack/intime.la
196 %{_libdir}/jack/jack_alsa.la
197 %{_libdir}/jack/jack_dummy.la
198 %if %{port_audio}
199 %{_libdir}/jack/jack_portaudio.la
200 %endif
201 %{_includedir}/jack/jack.h
202 %{_includedir}/jack/ringbuffer.h
203 %{_includedir}/jack/timestamps.h
204 %{_includedir}/jack/transport.h
205 %{_includedir}/jack/types.h
206 %{_libdir}/pkgconfig/jack.pc
207
208
209 %files example-clients
210 %defattr(-,root,root)
211 %{_bindir}/jackrec
212 %{_bindir}/jack_connect
213 %{_bindir}/jack_disconnect
214 %{_bindir}/jack_impulse_grabber
215 %{_bindir}/jack_lsp
216 %{_bindir}/jack_metro
217 %{_bindir}/jack_monitor_client
218 %{_bindir}/jack_showtime
219 %{_bindir}/jack_simple_client
220
221
222 %changelog
223
224 * Mon Nov 13 2003 Lawrie Abbott <lawrieabbott@iinet.net.au>
225 - update based on Planet CCRMA 0.80.0 release
226
227 * Thu May 23 2002 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
228 - added configuration variable to build with/without capabilities
229
230 * Tue May 21 2002 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
231 - split the examples into a different package so that the base
232 package does not depend on, for example, fltk.
233 - disable stripping of binaries
234
235 * Mon May 13 2002 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
236 - do not compress documentation, added doxygen docs directory
237 - changed defattr directives
238 - added libdir/jack*, libdir/*.a and libdir/*.so.* to files
239 - moved all so's to libs, jack will not start without jack_alsa.so
240 - merged base and libs packages
241
242 * Sat May 4 2002 Christian Fredrik Kalager Schaller <uraeus@linuxrising.org>
243 - initial release of jack sound server package for GStreamer
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.