1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=gmediaserver
13 PKG_MD5SUM
:=93de0f8dcbc1353a0d0dd5b5ab4b3142
15 PKG_SOURCE_URL
:=http
://savannah.nongnu.org
/download
/gmediaserver
/
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/gmediaserver
27 DEPENDS
:=+id3lib
+libupnp
28 TITLE
:=An UPnP music media server
29 DESCRIPTION
:=An UPnP music media server.
30 URL
:=http
://www.nongnu.org
/gmediaserver
/
34 define Build
/Configure
35 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
36 $(TARGET_CONFIGURE_OPTS
) \
37 CFLAGS
="$(TARGET_CFLAGS)" \
38 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 LIBS
=" -lixml -lthreadutil -lupnp -luClibc++ -lz" \
43 --target
=$(GNU_TARGET_NAME
) \
44 --host
=$(GNU_TARGET_NAME
) \
45 --build
=$(GNU_HOST_NAME
) \
51 --datadir=/usr
/share \
52 --includedir=/usr
/include \
53 --infodir=/usr
/share
/info \
55 --libexecdir
=/usr
/lib \
56 --localstatedir
=/var \
57 --mandir=/usr
/share
/man \
60 $(DISABLE_LARGEFILE
) \
66 --with-id3lib
="$(STAGING_DIR)/usr" \
67 --with-libupnp
="$(STAGING_DIR)/usr" \
72 rm -rf
$(PKG_INSTALL_DIR
)
73 mkdir
-p
$(PKG_INSTALL_DIR
)
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 DESTDIR
="$(PKG_INSTALL_DIR)" \
79 define Package
/gmediaserver
/install
80 install -m0755
-d
$(1)/etc
/default
81 install -m0644 .
/files
/gmediaserver.default
$(1)/etc
/default
/gmediaserver
82 install -m0755
-d
$(1)/etc
/init.d
83 install -m0755 .
/files
/gmediaserver.init
$(1)/etc
/init.d
/gmediaserver
84 install -m0755
-d
$(1)/usr
/sbin
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gmediaserver
$(1)/usr
/sbin
/
87 $(IPKG_BUILD
) $(1) $(PACKAGE_DIR
)
90 $(eval
$(call BuildPackage
,gmediaserver
))