e4fa26f5b5d73d8264cfd9d9c1bcd9bf42efff13
[openwrt/svn-archive/archive.git] / net / gmediaserver / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gmediaserver
12 PKG_VERSION:=0.12.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://savannah.nongnu.org/download/gmediaserver/
17 PKG_MD5SUM:=7f99a9b2e32c41acf7e71eb0bc0840e9
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/gmediaserver
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+id3lib +libiconv +libmagic +libupnp
29 TITLE:=An UPnP music media server
30 URL:=http://www.nongnu.org/gmediaserver/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --disable-rpath \
36 --enable-threads=posix \
37 --with-libiconv-prefix="$(STAGING_DIR)/usr/lib/libiconv" \
38 --without-libintl-prefix \
39 --with-id3lib="$(STAGING_DIR)/usr" \
40 --with-libupnp="$(STAGING_DIR)/usr" \
41 , \
42 LIBS=" -luClibc++ -lz" \
43 )
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 AR="$(TARGET_CROSS)ar" \
49 LTLIBICONV="" \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 all install
52 endef
53
54 define Package/gmediaserver/install
55 $(INSTALL_DIR) $(1)/usr/sbin
56 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gmediaserver $(1)/usr/sbin/
57 $(INSTALL_DIR) $(1)/etc/default
58 $(INSTALL_DATA) ./files/gmediaserver.default $(1)/etc/default/gmediaserver
59 $(INSTALL_DIR) $(1)/etc/init.d
60 $(INSTALL_BIN) ./files/gmediaserver.init $(1)/etc/init.d/gmediaserver
61 endef
62
63 $(eval $(call BuildPackage,gmediaserver))