replace lots of manual install commands with INSTALL_* variables
[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.9.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:=93de0f8dcbc1353a0d0dd5b5ab4b3142
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 +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 --with-id3lib="$(STAGING_DIR)/usr" \
37 --with-libupnp="$(STAGING_DIR)/usr" \
38 , \
39 LIBS=" -lixml -lthreadutil -lupnp -luClibc++ -lz" \
40 am_cv_func_iconv=no \
41 )
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Package/gmediaserver/install
51 $(INSTALL_DIR) $(1)/usr/sbin
52 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gmediaserver $(1)/usr/sbin/
53 $(INSTALL_DIR) $(1)/etc/default
54 $(INSTALL_DATA) ./files/gmediaserver.default $(1)/etc/default/gmediaserver
55 $(INSTALL_DIR) $(1)/etc/init.d
56 $(INSTALL_BIN) ./files/gmediaserver.init $(1)/etc/init.d/gmediaserver
57 endef
58
59 $(eval $(call BuildPackage,gmediaserver))