jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
7.9KB

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