moth/packages/ircd/ircd.mk

39 lines
1.0 KiB
Makefile
Raw Normal View History

2010-11-02 16:29:34 -06:00
IRCD_PKGDIR = $(TARGET)/ircd
IRCD_BUILDDIR = $(BUILD)/ircd
2011-09-23 16:04:25 -06:00
IRCD_VERSION = 18
2010-11-02 16:29:34 -06:00
IRCD_TAR = $(CACHE)/ngircd-$(IRCD_VERSION).tar.gz
IRCD_URL = ftp://ftp.berlios.de/pub/ngircd/ngircd-$(IRCD_VERSION).tar.gz
IRCD_SRCDIR = $(IRCD_BUILDDIR)/ngircd-$(IRCD_VERSION)
# Prevents automake from mangling cross-compiled binary names
2011-01-04 12:35:15 -07:00
IRCD_CC_HOST := $(shell $(CC) -v 2>&1 | awk '/Target:/{print $$2}')
2010-11-02 16:29:34 -06:00
ircd-install: ircd-build
$(IRCD_TAR):
@ mkdir -p $(@D)
wget -O $@ $(IRCD_URL)
ircd-source: $(IRCD_BUILDDIR)/source
$(IRCD_BUILDDIR)/source: $(IRCD_TAR)
mkdir -p $(IRCD_BUILDDIR)
zcat $(IRCD_TAR) | (cd $(IRCD_BUILDDIR) && tar xf -)
touch $@
ircd-build: $(IRCD_BUILDDIR)/built
$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source
2011-09-23 16:57:26 -06:00
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS) --enable-ipv6
2010-11-02 16:29:34 -06:00
$(MAKE) -C $(IRCD_SRCDIR)
touch $@
ircd-install: ircd-build
mkdir -p $(IRCD_PKGDIR)/bin
cp $(IRCD_SRCDIR)/src/ngircd/ngircd $(IRCD_PKGDIR)/bin
2011-01-04 12:35:15 -07:00
$(call COPYTREE, packages/ircd/service, $(IRCD_PKGDIR)/service)
2010-11-02 16:29:34 -06:00
ircd-clean:
rm -rf $(IRCD_BUILDDIR)
2011-09-23 16:04:25 -06:00
PACKAGES += ircd