2005-09-11 14:40:58 +03:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mpd
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_VERSION:=0.12.0
|
2005-09-11 14:40:58 +03:00
|
|
|
PKG_RELEASE:=1
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_MD5SUM:=65e62cc813f2186dff0f96f164a853f8
|
2005-09-11 14:40:58 +03:00
|
|
|
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/
|
2005-09-11 14:40:58 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
|
|
|
PKG_CONFIGURE_OPTIONS := \
|
|
|
|
--disable-alsa \
|
|
|
|
--disable-shout \
|
|
|
|
--disable-mod \
|
|
|
|
--disable-audiofile \
|
2005-10-18 03:03:12 +03:00
|
|
|
--disable-iconv \
|
|
|
|
--disable-mpc \
|
|
|
|
--disable-aac \
|
2005-09-11 14:40:58 +03:00
|
|
|
|
2005-11-05 04:16:36 +02:00
|
|
|
ifneq ($(BR2_COMPILE_MPD_WITH_MP3),)
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_DEPENDS += libid3tag libmad
|
2005-09-11 14:40:58 +03:00
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
2005-10-18 03:03:12 +03:00
|
|
|
--with-id3tag-includes=$(STAGING_DIR)/usr/include \
|
|
|
|
--with-id3tag-libraries=$(STAGING_DIR)/usr/lib \
|
|
|
|
--with-mad-includes=$(STAGING_DIR)/usr/include \
|
|
|
|
--with-mad-libraries=$(STAGING_DIR)/usr/lib
|
2005-09-11 14:40:58 +03:00
|
|
|
else
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_CONFIGURE_OPTIONS += --disable-id3 --disable-mp3
|
2005-09-11 14:40:58 +03:00
|
|
|
endif
|
|
|
|
|
2005-11-05 04:16:36 +02:00
|
|
|
ifneq ($(BR2_COMPILE_MPD_WITH_OGG),)
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_DEPENDS += libvorbisidec
|
2005-09-11 14:40:58 +03:00
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
2005-10-18 03:03:12 +03:00
|
|
|
--with-tremor \
|
|
|
|
--with-tremor-includes=$(STAGING_DIR)/usr/include \
|
|
|
|
--with-tremor-libraries=$(STAGING_DIR)/usr/lib
|
2005-09-11 14:40:58 +03:00
|
|
|
else
|
|
|
|
PKG_CONFIGURE_OPTIONS += --disable-ogg
|
|
|
|
endif
|
|
|
|
|
2005-11-05 04:16:36 +02:00
|
|
|
ifneq ($(BR2_COMPILE_MPD_WITH_FLAC),)
|
2005-10-18 03:03:12 +03:00
|
|
|
PKG_DEPENDS += libflac
|
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
|
|
|
--with-libFLAC-includes=$(STAGING_DIR)/usr/include \
|
|
|
|
--with-libFLAC-libraries=$(STAGING_DIR)/usr/lib
|
|
|
|
else
|
|
|
|
PKG_CONFIGURE_OPTIONS += --disable-flac
|
|
|
|
endif
|
|
|
|
|
|
|
|
COMMA:= ,
|
|
|
|
EMPTY:=
|
|
|
|
SPACE:= $(EMPTY) $(EMPTY)
|
|
|
|
PKG_DEPENDS:=$(subst $(SPACE),$(COMMA)$(SPACE),$(sort $(PKG_DEPENDS)))
|
|
|
|
|
2005-09-11 14:40:58 +03:00
|
|
|
include $(TOPDIR)/package/rules.mk
|
|
|
|
|
|
|
|
$(eval $(call PKG_template,MPD,mpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
|
2005-10-22 15:12:59 +03:00
|
|
|
$(PKG_BUILD_DIR)/.configured:
|
2005-09-11 14:40:58 +03:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2005-10-18 03:03:12 +03:00
|
|
|
CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|
|
|
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|
|
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
2005-09-11 14:40:58 +03:00
|
|
|
./configure \
|
2005-10-18 03:03:12 +03:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--program-prefix="" \
|
|
|
|
--program-suffix="" \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--includedir=/usr/include \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--libdir=/usr/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
$(PKG_CONFIGURE_OPTIONS) \
|
2005-09-11 14:40:58 +03:00
|
|
|
);
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built:
|
|
|
|
rm -rf $(PKG_INSTALL_DIR)
|
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(IPKG_MPD):
|
|
|
|
install -d -m0755 $(IDIR_MPD)/usr/bin
|
|
|
|
install -d -m0755 $(IDIR_MPD)/etc
|
2006-02-02 01:53:19 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(IDIR_MPD)/usr/bin
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf
|
2005-10-18 03:03:12 +03:00
|
|
|
echo "Depends: $(PKG_DEPENDS)" >> $(IDIR_MPD)/CONTROL/control
|
2005-09-11 14:40:58 +03:00
|
|
|
$(RSTRIP) $(IDIR_MPD)
|
|
|
|
$(IPKG_BUILD) $(IDIR_MPD) $(PACKAGE_DIR)
|
|
|
|
|
|
|
|
mostlyclean:
|
|
|
|
make -C $(PKG_BUILD_DIR) clean
|
|
|
|
rm $(PKG_BUILD_DIR)/.built
|