#
-# Copyright (C) 2008 OpenWrt.org
+# Copyright (C) 2008-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id$
include $(TOPDIR)/rules.mk
define Build/Configure
# this is *NOT* GNU configure
( cd $(PKG_BUILD_DIR); \
- CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
- LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS) -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
./configure \
$(CP) $(PKG_INSTALL_DIR)/etc/ushare.conf $(1)/etc/
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ushare $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
endef
$(eval $(call BuildPackage,ushare))