add mpd from dave, thx
[openwrt.git] / openwrt / package / mpd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=mpd
6 PKG_VERSION:=-uclinux--1--patch-10.normalperson-05
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=c707bb24a4acaa7c6a07fd6e4cda1f7c
9
10 PKG_SOURCE_URL:=http://mpd.bogomips.org/mpd--uclinux
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 PKG_CONFIGURE_OPTIONS := \
18 --disable-http \
19 --with-audio=oss \
20 --disable-alsa \
21 --disable-shout \
22 --disable-id3 \
23 --disable-mod \
24 --disable-audiofile \
25 --enable-static --disable-shared \
26 --enable-flac --enable-mpd-flac \
27 --disable-sse --disable-3dnow \
28 --enable-uclinux
29
30 ifneq ($(BR2_PACKAGE_MPD_MP3),)
31 PKG_CONFIGURE_OPTIONS += \
32 --enable-mp3 --enable-mpd-mad
33 else
34 PKG_CONFIGURE_OPTIONS += --disable-mp3
35 endif
36
37 ifneq ($(BR2_PACKAGE_MPD_OGG),)
38 PKG_CONFIGURE_OPTIONS += \
39 --enable-ogg --enable-mpd-ivorbis
40 else
41 PKG_CONFIGURE_OPTIONS += --disable-ogg
42 endif
43
44 include $(TOPDIR)/package/rules.mk
45
46 $(eval $(call PKG_template,MPD,mpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
47
48 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
49 (cd $(PKG_BUILD_DIR); \
50 $(TARGET_CONFIGURE_OPTS) \
51 CFLAGS="$(TARGET_CFLAGS)" \
52 ./configure \
53 --target=$(GNU_TARGET_NAME) \
54 --host=$(GNU_TARGET_NAME) \
55 --build=$(GNU_HOST_NAME) \
56 --prefix=/usr \
57 --sysconfdir=/etc \
58 $(PKG_CONFIGURE_OPTIONS) \
59 );
60 touch $@
61
62 $(PKG_BUILD_DIR)/.built:
63 rm -rf $(PKG_INSTALL_DIR)
64 mkdir -p $(PKG_INSTALL_DIR)
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 $(TARGET_CONFIGURE_OPTS) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 touch $@
70
71 $(IPKG_MPD):
72 install -d -m0755 $(IDIR_MPD)/usr/bin
73 install -d -m0755 $(IDIR_MPD)/etc
74 cp -fp $(PKG_INSTALL_DIR)/usr/bin/mpd $(IDIR_MPD)/usr/bin
75 cp -fp $(PKG_BUILD_DIR)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf
76 $(RSTRIP) $(IDIR_MPD)
77 $(IPKG_BUILD) $(IDIR_MPD) $(PACKAGE_DIR)
78
79 mostlyclean:
80 make -C $(PKG_BUILD_DIR) clean
81 rm $(PKG_BUILD_DIR)/.built
This page took 0.039034 seconds and 5 git commands to generate.