Noux: add noux-pkg/etc

This package provides files in /etc which are needed for domain
resolving etc. pp.
This commit is contained in:
Josef Söntgen 2012-07-02 15:40:28 +02:00 committed by Norman Feske
parent 3e952f4e49
commit 42c259d9f0
2 changed files with 60 additions and 0 deletions

31
ports/ports/etc.mk Normal file
View File

@ -0,0 +1,31 @@
ETC := etc-8.2.0
#
# Interface to top-level prepare Makefile
#
PORTS += $(ETC)
#
# Check for tools
#
$(call check_tool,svn)
#
# Subdirectories to check out from FreeBSD's Subversion repository
#
ETC_SVN_BASE = http://svn.freebsd.org/base/release/8.2.0
$(CONTRIB_DIR)/$(ETC):
$(ECHO) "checking out 'etc' to '$@'"
$(VERBOSE)svn export $(ETC_SVN_BASE)/etc $@
checkout-etc: $(CONTRIB_DIR)/$(ETC)
apply_patches-etc: checkout-etc
$(VERBOSE)find ./src/noux-pkg/etc/patches/ -name "*.patch" |\
xargs -ixxx sh -c "patch -p0 -r - -N -d $(CONTRIB_DIR)/$(ETC) < xxx" || true
prepare:: apply_patches-etc
clean-etc:
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(ETC)

View File

@ -0,0 +1,29 @@
#
# This is no actual noux-pkg but a collection of files
# which are essential for noux/net.
#
BUILD_BIN_DIR = ../../bin
TARGET_DIR = $(BUILD_BIN_DIR)/noux-etc/etc
ETC_CONTRIB_DIR = $(REP_DIR)/contrib/etc-8.2.0
ETC_FILES = hosts \
nsswitch.conf \
protocols \
services
TARGET = noux-etc.build
copy-contrib-files:
$(VERBOSE)mkdir -p $(TARGET_DIR)
$(VERBOSE)for i in $(ETC_FILES); do \
cp $(ETC_CONTRIB_DIR)/$$i $(TARGET_DIR) ; \
done
generate-files:
$(VERBOSE)echo 'nameserver 8.8.8.8' > $(TARGET_DIR)/resolv.conf
$(BUILD_BIN_DIR)/$(TARGET): copy-contrib-files generate-files
$(TARGET): $(BUILD_BIN_DIR)/$(TARGET)