summaryrefslogtreecommitdiffstats
path: root/package/udpcast/udpcast.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-04-13 21:50:46 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-04-13 21:50:46 +0200
commitb827af3bb41afcf34ac3f6d667e46d902b4731d8 (patch)
tree65b343da905832dd85940bca98b03f981e9cf6fe /package/udpcast/udpcast.mk
parent9554403ad0b81f29dd4ee1404de755aa5b72cac5 (diff)
parent157526cb051ef24de552082c3444bde1a81a40e4 (diff)
downloadbuildroot-novena-b827af3bb41afcf34ac3f6d667e46d902b4731d8.tar.gz
buildroot-novena-b827af3bb41afcf34ac3f6d667e46d902b4731d8.zip
Merge branch 'autotools-conversion' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/udpcast/udpcast.mk')
-rw-r--r--package/udpcast/udpcast.mk93
1 files changed, 14 insertions, 79 deletions
diff --git a/package/udpcast/udpcast.mk b/package/udpcast/udpcast.mk
index 3e0823ad3..d290cc9be 100644
--- a/package/udpcast/udpcast.mk
+++ b/package/udpcast/udpcast.mk
@@ -6,90 +6,25 @@
UDPCAST_VERSION:=20071228
UDPCAST_SOURCE:=udpcast-$(UDPCAST_VERSION).tar.gz
UDPCAST_SITE:=http://www.udpcast.linux.lu/download
-UDPCAST_CAT:=$(ZCAT)
-UDPCAST_DIR:=$(BUILD_DIR)/udpcast-$(UDPCAST_VERSION)
+UDPCAST_INSTALL_TARGET_OPT=DESTDIR=$(TARGET_DIR) install
+UDPCAST_CONF_ENV = $(if $(BR_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no)
-BR2_UDPCAST_CFLAGS:=
-
-$(DL_DIR)/$(UDPCAST_SOURCE):
- $(call DOWNLOAD,$(UDPCAST_SITE),$(UDPCAST_SOURCE))
-
-udpcast-source: $(DL_DIR)/$(UDPCAST_SOURCE)
-
-$(UDPCAST_DIR)/.unpacked: $(DL_DIR)/$(UDPCAST_SOURCE)
- $(UDPCAST_CAT) $(DL_DIR)/$(UDPCAST_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(UDPCAST_DIR) package/udpcast udpcast\*.patch
- $(CONFIG_UPDATE) $(UDPCAST_DIR)
- touch $(UDPCAST_DIR)/.unpacked
-
-$(UDPCAST_DIR)/.configured: $(UDPCAST_DIR)/.unpacked
- (cd $(UDPCAST_DIR); rm -rf config.cache; \
- $(if $(BR_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- CFLAGS="$(TARGET_CFLAGS) $(BR2_UDPCAST_CFLAGS)" \
- ./configure $(QUIET) \
- --target=$(REAL_GNU_TARGET_NAME) \
- --host=$(REAL_GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- $(DISABLE_NLS) \
- )
- touch $(UDPCAST_DIR)/.configured
-
-UDPCAST_BINARIES:=udp-sender udp-receiver
-
-UDPCAST_BUILD_TARGETS:=$(addprefix $(UDPCAST_DIR)/,$(UDPCAST_BINARIES))
-
-$(UDPCAST_BUILD_TARGETS): $(UDPCAST_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(UDPCAST_DIR)
-
-UDPCAST_PROGS:=$(addprefix $(TARGET_DIR)/usr/sbin/,$(UDPCAST_BINARIES))
-
-UDPCAST_INSTALL_MANPAGES=$(addprefix $(TARGET_DIR)/usr/man/, $(addsuffix .1,$(UDPCAST_BINARIES)))
-
-UDPCAST_INSTALL_FILES:=$(UDPCAST_PROGS) $(UDPCAST_INSTALL_MANPAGES)
-
-$(UDPCAST_PROGS): $(UDPCAST_BUILD_TARGETS)
- $(MAKE) -C $(UDPCAST_DIR) DESTDIR=$(TARGET_DIR) install
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(REMOVE_SECTION_COMMENT) \
- $(REMOVE_SECTION_NOTE) \
- $(UDPCAST_PROGS)
-ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y)
+define UDPCAST_REMOVE_UDP_SENDER
rm -f $(TARGET_DIR)/usr/sbin/udp-sender
rm -f $(TARGET_DIR)/usr/sbin/udp-sender.1
+endef
+
+ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y)
+UDPCAST_HOOK_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER
endif
-ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y)
+
+define UDPCAST_REMOVE_UDP_RECEIVER
rm -f $(TARGET_DIR)/usr/sbin/udp-receiver
rm -f $(TARGET_DIR)/usr/sbin/udp-receiver.1
-endif
-
-udpcast: $(UDPCAST_PROGS)
-
-udpcast-clean:
- rm -f $(UDPCAST_INSTALL_FILES)
- $(MAKE) -C $(UDPCAST_DIR) clean
- rm -f $(UDPCAST_DIR)/.configured
-
-udpcast-dirclean:
- rm -rf $(UDPCAST_DIR)
-
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_UDPCAST),y)
-TARGETS+=udpcast
+ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y)
+UDPCAST_HOOK_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER
endif
+
+$(eval $(call AUTOTARGETS,package,udpcast))