| 1 |
# $FreeWRT$ |
| 2 |
#- |
| 3 |
# This file is part of the FreeWRT project. FreeWRT is copyrighted |
| 4 |
# material, please see the LICENCE file in the top-level directory |
| 5 |
# or at http://www.freewrt.org/licence for details. |
| 6 |
|
| 7 |
include $(TOPDIR)/rules.mk |
| 8 |
|
| 9 |
PKG_NAME:= peercast |
| 10 |
PKG_VERSION:= 0.1214 |
| 11 |
PKG_RELEASE:= 3 |
| 12 |
PKG_MD5SUM:= 4e8449cde7135ad97f788e67e1bd64ee |
| 13 |
PKG_INIT:= 60 |
| 14 |
PKG_SOURCE_URL:= http://www.freewrt.org/distfiles |
| 15 |
|
| 16 |
include $(TOPDIR)/mk/package.mk |
| 17 |
|
| 18 |
$(eval $(call PKG_template,PEERCAST,peercast,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) |
| 19 |
|
| 20 |
$(WRKBUILD)/.configured: |
| 21 |
(cd $(WRKBUILD); rm -rf config.{cache,status} ; \ |
| 22 |
BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ |
| 23 |
$(TARGET_CONFIGURE_OPTS) \ |
| 24 |
CFLAGS="$(TARGET_CFLAGS)" \ |
| 25 |
CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -nodefaultlibs" \ |
| 26 |
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ |
| 27 |
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ |
| 28 |
LIBS="-nodefaultlibs -luClibc++ -lpthread" \ |
| 29 |
./configure \ |
| 30 |
--target=$(GNU_TARGET_NAME) \ |
| 31 |
--host=$(GNU_TARGET_NAME) \ |
| 32 |
--build=$(GNU_HOST_NAME) \ |
| 33 |
--program-prefix="" \ |
| 34 |
--program-suffix="" \ |
| 35 |
--prefix=/usr \ |
| 36 |
--exec-prefix=/usr \ |
| 37 |
--bindir=/usr/bin \ |
| 38 |
--datadir=/usr/share \ |
| 39 |
--includedir=/usr/include \ |
| 40 |
--infodir=/usr/share/info \ |
| 41 |
--libdir=/usr/lib \ |
| 42 |
--libexecdir=/usr/lib \ |
| 43 |
--localstatedir=/var \ |
| 44 |
--mandir=/usr/share/man \ |
| 45 |
--sbindir=/usr/sbin \ |
| 46 |
--sysconfdir=/etc \ |
| 47 |
--disable-nls \ |
| 48 |
--enable-shared \ |
| 49 |
--disable-static \ |
| 50 |
--with-gnu-ld \ |
| 51 |
--enable-staticbin \ |
| 52 |
); |
| 53 |
touch $@ |
| 54 |
|
| 55 |
$(WRKBUILD)/.built: |
| 56 |
rm -rf $(WRKINST) |
| 57 |
mkdir -p $(WRKINST) |
| 58 |
$(MAKE) -C $(WRKBUILD) \ |
| 59 |
DESTDIR="$(WRKINST)" \ |
| 60 |
all install |
| 61 |
touch $@ |
| 62 |
|
| 63 |
$(IPKG_PEERCAST): |
| 64 |
install -m0755 -d $(IDIR_PEERCAST)/usr/sbin |
| 65 |
$(CP) $(WRKINST)/usr/sbin/peercast $(IDIR_PEERCAST)/usr/sbin/ |
| 66 |
install -m0755 -d $(IDIR_PEERCAST)/usr/share/peercast/html |
| 67 |
$(CP) $(WRKINST)/usr/share/peercast/html/en $(IDIR_PEERCAST)/usr/share/peercast/html/ |
| 68 |
install -m0755 -d $(IDIR_PEERCAST)/etc |
| 69 |
install -m0644 ./files/peercast.ini $(IDIR_PEERCAST)/etc/ |
| 70 |
install -m0755 -d $(IDIR_PEERCAST)/etc/init.d |
| 71 |
install -m0755 ./files/peercast.init \ |
| 72 |
$(IDIR_PEERCAST)/etc/init.d/S$(PKG_INIT)peercast |
| 73 |
$(RSTRIP) $(IDIR_PEERCAST) |
| 74 |
$(IPKG_BUILD) $(IDIR_PEERCAST) $(PACKAGE_DIR) |