[packages/rsound] - new

qboosh qboosh at pld-linux.org
Fri Feb 21 08:21:06 CET 2014


commit 34c51b84a9a8c2e92698eb2d0f196f185853f2b1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Feb 21 08:23:17 2014 +0100

    - new

 rsound-libdir.patch | 103 ++++++++++++++++++++++++++++++++
 rsound.spec         | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 271 insertions(+)
---
diff --git a/rsound.spec b/rsound.spec
new file mode 100644
index 0000000..283ec37
--- /dev/null
+++ b/rsound.spec
@@ -0,0 +1,168 @@
+# TODO: roar, muroar, binds/cs
+#
+# Conditional build:
+%bcond_without	alsa		# ALSA support in rsd
+%bcond_without	ao		# libao support in rsd
+%bcond_without	jack		# JACK support in rsd
+%bcond_with	muroar		# muRoar support in rsd
+%bcond_without	openal		# OpenAL support in rsd
+%bcond_without	oss		# OSS support in rsd
+%bcond_without	portaudio	# PortAudio support in rsd
+%bcond_without	pulseaudio	# PulseAudio support in rsd
+%bcond_with	roar		# RoarAudio support in rsd
+
+Summary:	RSound - a portable networked audio system
+Summary(pl.UTF-8):	RSound - przenośny, sieciowy system dźwięku
+Name:		rsound
+Version:	1.1
+Release:	1
+License:	GPL v3+
+Group:		Applications/Sound
+Source0:	https://github.com/Themaister/RSound/archive/v%{version}/RSound-%{version}.tar.gz
+# Source0-md5:	d416ecd6d1ca39af78c7626ed1b3833e
+Patch0:		%{name}-libdir.patch
+URL:		http://themaister.net/rsound.html
+%{?with_openal:BuildRequires:	OpenAL-devel}
+%{?with_alsa:BuildRequires:	alsa-lib-devel >= 0.9}
+%{?with_jack:BuildRequires:	jack-audio-connection-kit-devel}
+%{?with_ao:BuildRequires:	libao-devel}
+%{?with_roar:BuildRequires:	libroar-devel}
+BuildRequires:	libsamplerate-devel
+%{?with_muroar:BuildRequires:	muroar-devel}
+%{?with_portaudio:BuildRequires:	portaudio-devel}
+%{?with_pulseaudio:BuildRequires:	pulseaudio-devel}
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+Requires:	%{name}-libs = %{version}-%{release}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+RSound is a portable networked audio system. It allows you to send
+audio from an application and transfer it directly to a different
+computer on your LAN network. It is an audio daemon with a much
+different focus than most other audio daemons.
+
+%description -l pl.UTF-8
+RSound to przenośny, sieciowy system dźwięku. Pozwala na przesyłanie
+dźwięku z aplikacji i wysyłanie go bezpośrednio do innego komputera w
+sieci lokalnej. Jest to demon dźwięku skupiający się na innych
+elementach, niż większość innych demonów.
+
+%package libs
+Summary:	RSound shared library
+Summary(pl.UTF-8):	Biblioteka współdzielona RSound
+Group:		Libraries
+
+%description libs
+RSound audio library, designed for seamless networked transfer of
+audio streams.
+
+%description libs -l pl.UTF-8
+Biblioteka dźwiękowa RSound, zaprojektowana do przezroczystego
+przesyłania strumieni dźwiękowych przez sieć.
+
+%package devel
+Summary:	Header files for RSound library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki RSound
+Group:		Development/Libraries
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description devel
+Header files for RSound library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki RSound.
+
+%package static
+Summary:	Static RSound library
+Summary(pl.UTF-8):	Statyczna biblioteka RSound
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static RSound library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka RSound.
+
+%package -n python-rsound
+Summary:	Python binding for RSound
+Summary(pl.UTF-8):	Wiązanie Pythona do biblioteki RSound
+Group:		Libraries/Python
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description -n python-rsound
+Python binding for RSound.
+
+%description -n python-rsound -l pl.UTF-8
+Wiązanie Pythona do biblioteki RSound.
+
+%prep
+%setup -q -n RSound-%{version}
+%patch0 -p1
+
+%build
+# not autoconf configure
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+./configure \
+	--prefix=%{_prefix} \
+	%{!?with_alsa:--disable-alsa} \
+	%{!?with_jack:--disable-jack} \
+	%{!?with_ao:--disable-libao} \
+	%{!?with_muroar:--disable-muroar} \
+	%{!?with_openal:--disable-openal} \
+	%{!?with_oss:--disable-oss} \
+	%{!?with_portaudio:--disable-portaudio} \
+	%{!?with_pulseaudio:--disable-pulse} \
+	%{!?with_roar:--disable-roar}
+
+# not supported by configure
+echo "LIBDIR = %{_libdir}" >> src/config.mk
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+install -D binds/python/rsound.py $RPM_BUILD_ROOT%{py_sitescriptdir}/rsound.py
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	libs -p /sbin/ldconfig
+%postun	libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README
+%attr(755,root,root) %{_bindir}/rsd
+%attr(755,root,root) %{_bindir}/rsdplay
+%{_mandir}/man1/rsd.1*
+%{_mandir}/man1/rsdplay.1*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/librsound.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/librsound.so.3
+
+%files devel
+%defattr(644,root,root,755)
+%doc DOCUMENTATION
+%attr(755,root,root) %{_libdir}/librsound.so
+%{_includedir}/rsound.h
+%{_pkgconfigdir}/rsound.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/librsound.a
+
+%files -n python-rsound
+%defattr(644,root,root,755)
+%{py_sitescriptdir}/rsound.py[co]
diff --git a/rsound-libdir.patch b/rsound-libdir.patch
new file mode 100644
index 0000000..00958a6
--- /dev/null
+++ b/rsound-libdir.patch
@@ -0,0 +1,103 @@
+--- RSound-1.1/src/Makefile.orig	2011-03-12 21:12:53.000000000 +0100
++++ RSound-1.1/src/Makefile	2014-02-18 20:29:09.133326981 +0100
+@@ -17,7 +17,7 @@
+ TARGET_LIB_OBJ = librsound/librsound.o librsound/buffer.o
+ TARGET_LIB_OBJ_STATIC = librsound/librsound.a
+ 
+-PKGCONF_PATH = $(PREFIX)/lib/pkgconfig/rsound.pc
++PKGCONF_PATH = $(LIBDIR)/pkgconfig/rsound.pc
+ 
+ TARGET_SERVER_LIBS = -lpthread
+ TARGET_LIB_LIBS = -lpthread
+@@ -107,40 +107,40 @@
+ 
+ $(TARGET_CLIENT): $(TARGET_CLIENT_OBJ)
+ 	@echo "LD $@"
+-	@$(CC) $(CFLAGS) -o $(TARGET_CLIENT) $(TARGET_CLIENT_OBJ) $(TARGET_LIB_LIBS)
++	$(CC) $(CFLAGS) -o $(TARGET_CLIENT) $(TARGET_CLIENT_OBJ) $(TARGET_LIB_LIBS)
+ 
+ 
+ $(TARGET_LIB): $(TARGET_LIB_OBJ) $(TARGET_LIB_OBJ_STATIC)
+ 	@echo "LD $@"
+ ifeq ($(PLATFORM),OSX)
+-	@$(CC) -shared -dynamiclib -o $(TARGET_LIB) $(CFLAGS) $(TARGET_LIB_OBJ) $(TARGET_LIB_LIBS) -install_name $(PREFIX)/lib/librsound.dylib
++	$(CC) -shared -dynamiclib -o $(TARGET_LIB) $(CFLAGS) $(TARGET_LIB_OBJ) $(TARGET_LIB_LIBS) -install_name $(PREFIX)/lib/librsound.dylib
+ else
+-	@$(CC) -shared -Wl,-soname,librsound.so.3 -o $(TARGET_LIB) $(CFLAGS) $(TARGET_LIB_OBJ) $(TARGET_LIB_LIBS) -fPIC
+-	@ln -sf librsound.so.3.0.0 librsound/librsound.so.3
+-	@ln -sf librsound.so.3.0.0 librsound/librsound.so
++	$(CC) -shared -Wl,-soname,librsound.so.3 -o $(TARGET_LIB) $(CFLAGS) $(TARGET_LIB_OBJ) $(TARGET_LIB_LIBS) -fPIC
++	ln -sf librsound.so.3.0.0 librsound/librsound.so.3
++	ln -sf librsound.so.3.0.0 librsound/librsound.so
+ endif
+ 
+ $(TARGET_SERVER): $(TARGET_SERVER_OBJ)
+ 	@echo "LD $@"
+-	@$(CC) -o $(TARGET_SERVER) $(TARGET_SERVER_OBJ) $(TARGET_SERVER_LIBS) $(CFLAGS)
++	$(CC) -o $(TARGET_SERVER) $(TARGET_SERVER_OBJ) $(TARGET_SERVER_LIBS) $(CFLAGS)
+ 
+ 
+ librsound/librsound.o: librsound/librsound.c config.h
+ 	@echo "CC $<"
+-	@$(CC) $(CFLAGS) -fPIC -c -o $@ $<
++	$(CC) $(CFLAGS) -fPIC -c -o $@ $<
+ 
+ librsound/buffer.o: librsound/buffer.c
+ 	@echo "CC $<"
+-	@$(CC) $(CFLAGS) -fPIC -c -o $@ $<
++	$(CC) $(CFLAGS) -fPIC -c -o $@ $<
+ 
+ $(TARGET_LIB_OBJ_STATIC): $(TARGET_LIB_OBJ)
+ 	@echo "AR $@"
+-	@$(AR) rcs $(TARGET_LIB_OBJ_STATIC) $(TARGET_LIB_OBJ) >/dev/null 2>/dev/null
++	$(AR) rcs $(TARGET_LIB_OBJ_STATIC) $(TARGET_LIB_OBJ) >/dev/null 2>/dev/null
+ 
+ 	
+ %.o: %.c
+ 	@echo "CC $<"
+-	@$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) -c -o $@ $<
+ 
+ rsound-common.o: config.h
+ 
+@@ -164,14 +164,14 @@
+ 
+ 
+ install-lib: $(TARGET_LIB) $(TARGET_LIB_OBJ_STATIC) install-pkgconf
+-	mkdir -p $(DESTDIR)$(PREFIX)/{lib/pkgconfig,include,share/man/man1}
+-	install -m755 $(TARGET_LIB) $(DESTDIR)$(PREFIX)/lib
++	mkdir -p $(DESTDIR){$(LIBDIR)/pkgconfig,$(PREFIX)/{include,share/man/man1}}
++	install -m755 $(TARGET_LIB) $(DESTDIR)$(LIBDIR)
+ ifneq ($(PLATFORM),OSX)
+-	cp -P librsound/librsound.so librsound/librsound.so.3 $(DESTDIR)$(PREFIX)/lib
++	cp -P librsound/librsound.so librsound/librsound.so.3 $(DESTDIR)$(LIBDIR)
+ endif
+-	install -m644 $(TARGET_LIB_OBJ_STATIC) $(DESTDIR)$(PREFIX)/lib
++	install -m644 $(TARGET_LIB_OBJ_STATIC) $(DESTDIR)$(LIBDIR)
+ 	install -m644 librsound/rsound.h $(DESTDIR)$(PREFIX)/include
+-	install -m644 rsound.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig
++	install -m644 rsound.pc $(DESTDIR)$(LIBDIR)/pkgconfig
+ 	install -m644 ../doc/rsd.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ 	install -m644 ../doc/rsdplay.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ 
+@@ -186,7 +186,7 @@
+ install-pkgconf:
+ 	@echo "prefix=$(PREFIX)" > rsound.pc
+ 	@echo "exec_prefix=\$${prefix}" >> rsound.pc
+-	@echo "libdir=\$${prefix}/lib" >> rsound.pc
++	@echo "libdir=$(LIBDIR)" >> rsound.pc
+ 	@echo "includedir=\$${prefix}/include" >> rsound.pc
+ 	@echo "" >> rsound.pc
+ 	@echo "Name: RSound" >> rsound.pc
+@@ -199,9 +199,9 @@
+ uninstall:
+ 	rm -rf $(PREFIX)/bin/rsd
+ 	rm -rf $(PREFIX)/bin/rsdplay
+-	rm -rf $(PREFIX)/lib/librsound.*
++	rm -rf $(LIBDIR)/librsound.*
+ 	rm -rf $(PREFIX)/include/rsound.h
+-	rm -rf $(PREFIX)/lib/pkgconfig/rsound.pc
++	rm -rf $(LIBDIR)/pkgconfig/rsound.pc
+ 	rm -rf $(PREFIX)/share/man/man1/rsd.1
+ 	rm -rf $(PREFIX)/share/man/man1/rsdplay.1
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rsound.git/commitdiff/34c51b84a9a8c2e92698eb2d0f196f185853f2b1



More information about the pld-cvs-commit mailing list