Makefile (4014B)
1 # 2 # Copyright (C) 2015-2016 OpenWrt.org 3 # 4 # This is free software, licensed under the GNU General Public License v2. 5 # See /LICENSE for more information. 6 # 7 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=squeezelite 11 PKG_VERSION:=1.8.4-743 12 PKG_RELEASE=1 13 14 PKG_LICENSE:=GPL-3.0 15 PKG_LICENSE_FILES:=LICENSE.txt 16 PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net> 17 18 PKG_SOURCE_PROTO:=git 19 PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git 20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 21 PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e 22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz 23 24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) 25 26 PKG_BUILD_DEPENDS:=libflac libvorbis libmad libfaad2 SQUEEZELITE_WMA:libffmpeg-audio-dec 27 28 include $(INCLUDE_DIR)/package.mk 29 30 define Package/squeezelite/default 31 SECTION:=sound 32 CATEGORY:=Sound 33 TITLE:=Headless squeezebox emulator 34 PROVIDES:=squeezelite 35 URL:=https://github.com/ralph-irving/squeezelite 36 DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr 37 MENU:=1 38 endef 39 40 define Package/squeezelite-full 41 $(call Package/squeezelite/default) 42 TITLE+= (full) 43 DEPENDS+= +libflac +libvorbis +libmad +libfaad2 \ 44 +SQUEEZELITE_WMA:libffmpeg-audio-dec 45 VARIANT:=full 46 endef 47 48 define Package/squeezelite-mini 49 $(call Package/squeezelite/default) 50 TITLE+= (minimal) 51 VARIANT:=mini 52 endef 53 54 define Package/squeezelite/config/default 55 56 config SQUEEZELITE_WMA 57 bool "WMA/ALAC decode support" 58 help 59 Include WMA and ALAC decoding using ffmpeg 60 default n 61 62 config SQUEEZELITE_RESAMPLE 63 bool "Resample support" 64 help 65 Include support for resampling using libsoxr 66 default n 67 68 config SQUEEZELITE_DSD 69 bool "DSD playback over PCM (DoP)" 70 help 71 Include support for DSD over PCM for compatible DAC" 72 default n 73 endef 74 75 define Package/squeezelite-full/config 76 if PACKAGE_squeezelite-full 77 $(call Package/squeezelite/config/default) 78 endif 79 endef 80 81 define Package/squeezelite-mini/config 82 if PACKAGE_squeezelite-mini 83 $(call Package/squeezelite/config/default) 84 endif 85 endef 86 87 define Package/squeezelite/description/default 88 Squeezelite is a small headless squeezebox emulator for linux using alsa audio output 89 It is aimed at supporting high quality audio at multiple sample rates including 90 44.1/48/88.2/96/176.4/192k/352.8/384kHz 91 Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg) 92 Native support for PCM builtin 93 Optional support of DSD playback via PCM for DoP capable DAC 94 Optional resampling to match sound device 95 endef 96 97 define Package/squeezelite/description 98 $(call Package/squeezelite/description/default) 99 . 100 This package has all the audio codecs compiled in. 101 endef 102 103 define Package/squeezelite-mini/description 104 $(call Package/squeezelite/description/default) 105 . 106 This package will dynamically load installed codecs. 107 endef 108 109 #ifeq ($(CONFIG_SQUEEZELITE_WMA),y) 110 # PKG_BUILD_DEPENDS+= libffmpeg-audio-dec 111 #endif 112 113 TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE 114 115 ifeq ($(CONFIG_SQUEEZELITE_WMA),y) 116 TARGET_CFLAGS+= -DFFMPEG 117 endif 118 119 ifeq ($(CONFIG_SQUEEZELITE_DSD),y) 120 TARGET_CFLAGS+= -DDSD 121 endif 122 123 ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y) 124 TARGET_CFLAGS+= -DRESAMPLE 125 endif 126 127 TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt 128 129 ifeq ($(BUILD_VARIANT),full) 130 TARGET_CFLAGS+= -DLINKALL 131 TARGET_LDFLAGS+= -lvorbis -logg 132 endif 133 134 define Package/squeezelite/install 135 $(INSTALL_DIR) $(1)/usr/bin 136 $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin 137 $(INSTALL_DIR) $(1)/etc/init.d 138 $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite 139 $(INSTALL_DIR) $(1)/etc/config 140 $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite 141 endef 142 143 Package/squeezelite-mini/install=$(Package/squeezelite/install) 144 Package/squeezelite-full/install=$(Package/squeezelite/install) 145 146 $(eval $(call BuildPackage,squeezelite-mini)) 147 $(eval $(call BuildPackage,squeezelite-full))