mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
Merge pull request #856 from thess/shairplay-move
shairplay: Move to sound menu and sub-directory
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shairplay
|
||||
PKG_VERSION:=2014-10-27
|
||||
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=64d59e3087f829006d091fa0d114efb50972a2bf
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
|
||||
define Package/shairplay
|
||||
SECTION:=multimedia
|
||||
CATEGORY:=Multimedia
|
||||
DEPENDS:=+libao +libavahi-compat-libdnssd +libltdl +libpthread
|
||||
TITLE:=Shairplay
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
|
||||
./autogen.sh;)
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Package/shairplay/description
|
||||
Free portable AirPlay server implementation similar to ShairPort.
|
||||
endef
|
||||
|
||||
define Package/shairplay/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/shairplay $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/share/shairplay
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/airport.key $(1)/usr/share/shairplay/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) files/shairplay.init $(1)/etc/init.d/shairplay
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) files/shairplay.config $(1)/etc/config/shairplay
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,shairplay))
|
||||
@@ -1,10 +0,0 @@
|
||||
config shairplay main
|
||||
option disabled '1'
|
||||
option respawn '1'
|
||||
option apname 'AirPlay'
|
||||
option port '5000'
|
||||
option password ''
|
||||
option hwaddr ''
|
||||
option ao_driver 'oss'
|
||||
option ao_devicename ''
|
||||
option ao_deviceid ''
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
|
||||
START=90
|
||||
USE_PROCD=1
|
||||
|
||||
append_arg() {
|
||||
local cfg="$1"
|
||||
local var="$2"
|
||||
local opt="$3"
|
||||
local def="$4"
|
||||
local val
|
||||
|
||||
config_get val "$cfg" "$var"
|
||||
[ -n "$val" -o -n "$def" ] && procd_append_param command $opt="${val:-$def}"
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local cfg="$1"
|
||||
local aux
|
||||
|
||||
config_get_bool aux "$cfg" 'disabled' '0'
|
||||
[ "$aux" = 1 ] && return 1
|
||||
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command /usr/bin/shairplay
|
||||
|
||||
append_arg "$cfg" apname "--apname" "AirPlay"
|
||||
append_arg "$cfg" port "--server_port"
|
||||
append_arg "$cfg" password "--password"
|
||||
append_arg "$cfg" hwaddr "--hwaddr"
|
||||
|
||||
append_arg "$cfg" ao_driver "--ao_driver"
|
||||
append_arg "$cfg" ao_devicename "--ao_devicename"
|
||||
append_arg "$cfg" ao_deviceid "--ao_deviceid"
|
||||
|
||||
config_get_bool aux "$cfg" 'respawn' '0'
|
||||
[ "$aux" = 1 ] && procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "shairplay"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load shairplay
|
||||
config_foreach start_instance shairplay
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/shairplay.c
|
||||
+++ b/src/shairplay.c
|
||||
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
|
||||
raop_cbs.audio_destroy = audio_destroy;
|
||||
raop_cbs.audio_set_volume = audio_set_volume;
|
||||
|
||||
- raop = raop_init_from_keyfile(10, &raop_cbs, "airport.key", NULL);
|
||||
+ raop = raop_init_from_keyfile(10, &raop_cbs, "/usr/share/shairplay/airport.key", NULL);
|
||||
if (raop == NULL) {
|
||||
fprintf(stderr, "Could not initialize the RAOP service\n");
|
||||
fprintf(stderr, "Please make sure the airport.key file is in the current directory.\n");
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/lib/dnssd.c
|
||||
+++ b/src/lib/dnssd.c
|
||||
@@ -167,7 +167,7 @@ dnssd_init(int *error)
|
||||
return NULL;
|
||||
}
|
||||
#elif USE_LIBDL
|
||||
- dnssd->module = dlopen("libdns_sd.so", RTLD_LAZY);
|
||||
+ dnssd->module = dlopen("libdns_sd.so.1", RTLD_LAZY);
|
||||
if (!dnssd->module) {
|
||||
if (error) *error = DNSSD_ERROR_LIBNOTFOUND;
|
||||
free(dnssd);
|
||||
@@ -1,24 +0,0 @@
|
||||
--- a/src/lib/alac/alac.c
|
||||
+++ b/src/lib/alac/alac.c
|
||||
@@ -29,11 +29,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#ifdef __BIG_ENDIAN__
|
||||
-static const int host_bigendian = 1;
|
||||
-#else
|
||||
-static const int host_bigendian = 0;
|
||||
-#endif
|
||||
+static int host_bigendian = 0;
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
|
||||
{
|
||||
alac_file *newfile = malloc(sizeof(alac_file));
|
||||
|
||||
+ host_bigendian = (htonl(42) == 42);
|
||||
+
|
||||
newfile->samplesize = samplesize;
|
||||
newfile->numchannels = numchannels;
|
||||
newfile->bytespersample = (samplesize / 8) * numchannels;
|
||||
Reference in New Issue
Block a user