lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (5470B)


      1 #
      2 # Copyright (C) 2015-2016 Ted Hess
      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:=mpd
     11 PKG_VERSION:=0.19.19
     12 PKG_RELEASE:=2
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     15 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
     16 PKG_MD5SUM:=6e4fca9a9c26dad08b61bac9a91802db
     17 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
     18 
     19 PKG_LICENSE:=GPL-2.0
     20 PKG_LICENSE_FILES:=COPYING
     21 
     22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
     23 PKG_BUILD_PARALLEL:=1
     24 
     25 PKG_CONFIG_DEPENDS:= \
     26 	CONFIG_IPV6 \
     27 
     28 PKG_INSTALL:=1
     29 
     30 include $(INCLUDE_DIR)/package.mk
     31 include $(INCLUDE_DIR)/nls.mk
     32 
     33 define Package/mpd/Default
     34   SECTION:=sound
     35   CATEGORY:=Sound
     36   TITLE:=Music Player Daemon
     37   URL:=http://www.musicpd.org/
     38   DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
     39 	    +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
     40             +boost +boost-container +libexpat
     41 endef
     42 
     43 define Package/mpd/Default/description
     44  Music Player Daemon (MPD) is a flexible, powerful, server-side
     45  application for playing music. It is typically controlled over a
     46  network using one of it's many clients including mpc (console),
     47  gmpc (gnome), phpmp (php), etc...
     48 endef
     49 
     50 define Package/mpd-full
     51 $(call Package/mpd/Default)
     52   TITLE+= (full)
     53   DEPENDS+= \
     54 	+libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
     55 	+libmms +libogg +libsndfile +libvorbis +libupnp
     56   PROVIDES:=mpd
     57   VARIANT:=full
     58 endef
     59 
     60 define Package/mpd-full/description
     61 $(call Package/mpd/Default/description)
     62  .
     63  This package contains a full-blown Music Player Daemon.
     64 endef
     65 
     66 define Package/mpd-full/conffiles
     67 /etc/mpd.conf
     68 endef
     69 
     70 define Package/mpd-mini
     71 $(call Package/mpd/Default)
     72   TITLE+= (mini)
     73   PROVIDES:=mpd
     74   VARIANT:=mini
     75 endef
     76 
     77 define Package/mpd-mini/description
     78 $(call Package/mpd/Default/description)
     79  .
     80  This package contains a minimal Music Player Daemon, with support for
     81  only Flac, MP3 & OGG media types & only file: & http: protocols.
     82 endef
     83 
     84 define Package/mpd-mini/conffiles
     85 /etc/mpd.conf
     86 endef
     87 
     88 define Package/mpd-avahi-service
     89 $(call Package/mpd/Default)
     90   TITLE+= (Avahi service)
     91   DEPENDS+=+avahi-daemon
     92 endef
     93 
     94 define Package/mpd-avahi-service/description
     95 $(call Package/mpd/Default/description)
     96  .
     97  This package contains the service definition for announcing the
     98  Music Player Daemon service via mDNS/DNS-SD.
     99 endef
    100 
    101 define Package/mpd-avahi-service/conffiles
    102 /etc/avahi/services/mpd.service
    103 endef
    104 
    105 CONFIGURE_ARGS += \
    106 	$(call autoconf_bool,CONFIG_IPV6,ipv6) \
    107 	--disable-debug \
    108 	--disable-documentation \
    109 	--disable-test \
    110 	--disable-werror \
    111 	\
    112 	--disable-ao \
    113 	--disable-bzip2 \
    114 	--disable-fluidsynth \
    115 	--disable-wildmidi \
    116 	--disable-gme \
    117 	--enable-inotify \
    118 	--disable-icu \
    119 	--disable-eventfd \
    120 	--disable-iso9660 \
    121 	--disable-jack \
    122 	--disable-roar \
    123 	--disable-libwrap \
    124 	--disable-lsr \
    125 	--disable-mikmod \
    126 	--disable-modplug \
    127 	--disable-mpc \
    128 	--disable-mpg123 \
    129 	--disable-openal \
    130 	--disable-opus \
    131 	--disable-pulse \
    132 	--disable-sidplay \
    133 	--disable-solaris-output \
    134 	--disable-sqlite \
    135 	--disable-lame-encoder \
    136 	--disable-twolame-encoder \
    137 	--disable-shine-encoder \
    138 	--enable-wave-encoder \
    139 	--disable-wavpack \
    140 	--disable-wildmidi \
    141 	--disable-zzip \
    142 	--with-zeroconf=no \
    143 	--disable-soxr \
    144 	\
    145 	--enable-curl \
    146 	--enable-flac \
    147 	--enable-httpd-output \
    148 	$(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
    149 	$(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
    150 	--enable-tcp \
    151 	--enable-un \
    152 
    153 CONFIGURE_VARS += \
    154 	FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
    155 	FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
    156 	$(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
    157 	$(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
    158 
    159 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
    160 
    161 ifeq ($(BUILD_VARIANT),full)
    162 
    163   CONFIGURE_ARGS += \
    164 	--enable-upnp \
    165 	$(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
    166 	--enable-audiofile \
    167 	--enable-fifo \
    168 	--enable-ffmpeg \
    169 	--enable-id3 \
    170 	--enable-lastfm \
    171 	--enable-mms \
    172 	--enable-oggflac \
    173 	--enable-pipe-output \
    174 	--enable-recorder-output \
    175 	--disable-shout \
    176 	--enable-sndfile \
    177 	--enable-vorbis \
    178 	--disable-vorbis-encoder \
    179 	--with-faad="$(STAGING_DIR)/usr" \
    180 	--with-tremor=yes \
    181 
    182 endif
    183 
    184 ifeq ($(BUILD_VARIANT),mini)
    185 
    186   # oggflac is not compatible with tremor
    187   CONFIGURE_ARGS += \
    188 	--disable-upnp \
    189 	--disable-aac \
    190 	--disable-audiofile \
    191 	--disable-fifo \
    192 	--disable-ffmpeg \
    193 	--disable-id3 \
    194 	--disable-mms \
    195 	--disable-pipe-output \
    196 	--disable-recorder-output \
    197 	--disable-shout \
    198 	--disable-sndfile \
    199 	--disable-vorbis \
    200 	--disable-vorbis-encoder \
    201 	--with-tremor=yes \
    202 
    203 endif
    204 
    205 define Package/mpd/install
    206 	$(INSTALL_DIR) $(1)/usr/bin
    207 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
    208 	$(INSTALL_DIR) $(1)/etc
    209 	$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
    210 	$(INSTALL_DIR) $(1)/etc/init.d
    211 	$(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
    212 endef
    213 
    214 define Package/mpd-full/install
    215 $(call Package/mpd/install,$1)
    216 endef
    217 
    218 define Package/mpd-mini/install
    219 $(call Package/mpd/install,$1)
    220 endef
    221 
    222 define Package/mpd-avahi-service/install
    223 	$(INSTALL_DIR) $(1)/etc/avahi/services
    224 	$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
    225 endef
    226 
    227 $(eval $(call BuildPackage,mpd-full))
    228 $(eval $(call BuildPackage,mpd-mini))
    229 $(eval $(call BuildPackage,mpd-avahi-service))