Module Name: src
Committed By: jmmv
Date: Mon Feb 25 00:20:10 UTC 2013
Added Files:
src/external/bsd/kyua-atf-compat: Makefile Makefile.inc
prepare-import.sh
src/external/bsd/kyua-atf-compat/share: Makefile Makefile.inc
src/external/bsd/kyua-atf-compat/share/doc: Makefile Makefile.inc
src/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat: Makefile
src/external/bsd/kyua-atf-compat/share/kyua-atf-compat: Makefile
src/external/bsd/kyua-atf-compat/tests: Makefile Makefile.inc
src/external/bsd/kyua-atf-compat/tests/kyua-atf-compat: Makefile
src/external/bsd/kyua-atf-compat/usr.bin: Makefile Makefile.inc
src/external/bsd/kyua-atf-compat/usr.bin/atf-report: Makefile
src/external/bsd/kyua-atf-compat/usr.bin/atf-run: Makefile
src/external/bsd/kyua-atf-compat/usr.bin/atf2kyua: Makefile
Log Message:
Add reachover build files for kyua-atf-compat.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-atf-compat/Makefile \
src/external/bsd/kyua-atf-compat/Makefile.inc \
src/external/bsd/kyua-atf-compat/prepare-import.sh
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-atf-compat/share/Makefile \
src/external/bsd/kyua-atf-compat/share/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-atf-compat/share/doc/Makefile \
src/external/bsd/kyua-atf-compat/share/doc/Makefile.inc
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-atf-compat/tests/Makefile \
src/external/bsd/kyua-atf-compat/tests/Makefile.inc
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-atf-compat/usr.bin/Makefile \
src/external/bsd/kyua-atf-compat/usr.bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: src/external/bsd/kyua-atf-compat/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/Makefile Mon Feb 25 00:20:08 2013
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+
+SUBDIR= share tests usr.bin
+
+.for dir in share tests usr.bin
+includes-${dir}: .PHONY
+ @true
+.endfor
+
+.include <bsd.subdir.mk>
Index: src/external/bsd/kyua-atf-compat/Makefile.inc
diff -u /dev/null src/external/bsd/kyua-atf-compat/Makefile.inc:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/Makefile.inc Mon Feb 25 00:20:08 2013
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+
+SRCDIR= ${NETBSDSRCDIR}/external/bsd/kyua-atf-compat/dist
+.PATH: ${SRCDIR}
+
+BUILD_SCRIPT = \
+ sed -e 's,__ATF_CONFDIR__,/etc/atf,g' \
+ -e 's,__ATF_SH__,/usr/bin/atf-sh,g' \
+ -e 's,__BINDIR__,/usr/bin,g' \
+ -e 's,__PKGDATADIR__,/usr/share/kyua-atf-compat,g' \
+ -e 's,__SH__,/bin/sh,g' \
+ ${SRCDIR}/$${src} >$${dst}.new && \
+ chmod +x $${dst}.new && \
+ mv $${dst}.new $${dst}
Index: src/external/bsd/kyua-atf-compat/prepare-import.sh
diff -u /dev/null src/external/bsd/kyua-atf-compat/prepare-import.sh:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/prepare-import.sh Mon Feb 25 00:20:08 2013
@@ -0,0 +1,103 @@
+#!/bin/sh
+# $NetBSD: prepare-import.sh,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+#
+# Use this script to recreate the 'dist' subdirectory from a newly released
+# distfile. The script takes care of unpacking the distfile, removing any
+# files that are not relevant to NetBSD and checking if there are any new
+# files in the new release that need to be addressed.
+#
+
+set -e
+
+ProgName=${0##*/}
+
+CLEAN_PATTERNS=
+CLEAN_PATTERNS="${CLEAN_PATTERNS} *.m4"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} INSTALL TODO"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} Makefile*"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} admin"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} configure*"
+
+err() {
+ echo "${ProgName}:" "${@}" 1>&2
+ exit 1
+}
+
+log() {
+ echo "${ProgName}:" "${@}"
+}
+
+backup_dist() {
+ if [ -d dist.old ]; then
+ log "Removing dist; dist.old exists"
+ rm -rf dist
+ else
+ log "Backing up dist as dist.old"
+ mv dist dist.old
+ fi
+}
+
+extract_distfile() {
+ local distfile="${1}"; shift
+ local distname="${1}"; shift
+
+ log "Extracting ${distfile}"
+ tar -xzf "${distfile}"
+ [ -d "${distname}" ] || err "Distfile did not create ${distname}"
+ log "Renaming ${distname} to dist"
+ mv "${distname}" dist
+}
+
+get_distname() {
+ local distfile="${1}"; shift
+ basename "${distfile}" | sed -e 's,\.tar.*,,'
+}
+
+cleanup_dist() {
+ log "Removing unnecessary files from dist"
+ ( cd dist && rm -rf ${CLEAN_PATTERNS} )
+}
+
+diff_dirs() {
+ local old_dir="${1}"; shift
+ local new_dir="${1}"; shift
+
+ local old_list=$(mktemp -t kyua-atf-compat-import.XXXXXX)
+ local new_list=$(mktemp -t kyua-atf-compat-import.XXXXXX)
+ local diff=$(mktemp -t kyua-atf-compat-import.XXXXXX)
+ trap "rm -f '${old_list}' '${new_list}' '${diff}'; exit 1" \
+ HUP INT QUIT TERM
+
+ ( cd "${old_dir}" && find . | sort >>"${old_list}" )
+ ( cd "${new_dir}" && find . | sort >>"${new_list}" )
+
+ diff -u "${old_list}" "${new_list}" | grep '^+\.' >>"${diff}" || true
+ if [ -s "${diff}" ]; then
+ log "New files found"
+ diff -u "${old_list}" "${new_list}" | grep '^+\.'
+ log "Check if any files have to be cleaned up and update" \
+ "the prepare-import.sh script accordingly"
+ else
+ log "No new files; all good!"
+ fi
+
+ rm -f "${old_list}" "${new_list}" "${diff}"
+}
+
+main() {
+ [ ${#} -eq 1 ] || err "Must provide a distfile name"
+ local distfile="${1}"; shift
+
+ [ -f Makefile -a -f prepare-import.sh ] || \
+ err "Must be run from the src/external/bsd/kyua-atf-compat" \
+ "subdirectory"
+
+ local distname="$(get_distname ${distfile})"
+
+ backup_dist
+ extract_distfile "${distfile}" "${distname}"
+ cleanup_dist
+ diff_dirs dist.old dist
+}
+
+main "${@}"
Index: src/external/bsd/kyua-atf-compat/share/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/Makefile Mon Feb 25 00:20:08 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+
+SUBDIR= doc kyua-atf-compat
+
+.include <bsd.subdir.mk>
Index: src/external/bsd/kyua-atf-compat/share/Makefile.inc
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/Makefile.inc:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/Makefile.inc Mon Feb 25 00:20:08 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+
+.include "../Makefile.inc"
Index: src/external/bsd/kyua-atf-compat/share/doc/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/doc/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/doc/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+SUBDIR= kyua-atf-compat
+
+.include <bsd.subdir.mk>
Index: src/external/bsd/kyua-atf-compat/share/doc/Makefile.inc
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/doc/Makefile.inc:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/doc/Makefile.inc Mon Feb 25 00:20:09 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
Index: src/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include <bsd.init.mk>
+
+.if ${MKSHARE} != "no"
+FILESDIR= /usr/share/doc/kyua-atf-compat
+FILESMODE= 444
+FILES= AUTHORS COPYING NEWS README
+.endif
+
+.include <bsd.files.mk>
Index: src/external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include <bsd.init.mk>
+
+FILES= lib.subr tests_lib.subr
+FILESDIR= /usr/share/kyua-atf-compat
+FILESMODE= 444
+
+.include <bsd.files.mk>
Index: src/external/bsd/kyua-atf-compat/tests/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/tests/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/tests/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+SUBDIR= kyua-atf-compat
+
+.include <bsd.subdir.mk>
Index: src/external/bsd/kyua-atf-compat/tests/Makefile.inc
diff -u /dev/null src/external/bsd/kyua-atf-compat/tests/Makefile.inc:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/tests/Makefile.inc Mon Feb 25 00:20:09 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
Index: src/external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include <bsd.init.mk>
+
+TESTSDIR= ${TESTSBASE}/kyua-atf-compat
+
+.for test in atf-report_test atf-run_test atf2kyua_test
+TESTS_SH+= ${test}
+TESTS_SH_SRC_${test}= ${test}.tmp.sh
+${test}.tmp.sh: ${test}.sh
+ src=${test}.sh dst=${test}.tmp.sh; ${BUILD_SCRIPT}
+CLEANFILES+= ${test}.tmp.sh ${test}.tmp.sh.new
+.endfor
+
+FILES= helpers
+FILESDIR_helpers= ${TESTSDIR}
+realall: helpers
+helpers: helpers.sh
+ src=helpers.sh dst=helpers; ${BUILD_SCRIPT}
+CLEANFILES+= helpers helpers.new
+
+.include <bsd.test.mk>
Index: src/external/bsd/kyua-atf-compat/usr.bin/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/usr.bin/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/usr.bin/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+SUBDIR= atf-report atf-run atf2kyua
+
+.include <bsd.subdir.mk>
Index: src/external/bsd/kyua-atf-compat/usr.bin/Makefile.inc
diff -u /dev/null src/external/bsd/kyua-atf-compat/usr.bin/Makefile.inc:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/usr.bin/Makefile.inc Mon Feb 25 00:20:09 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
Index: src/external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile Mon Feb 25 00:20:09 2013
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include <bsd.init.mk>
+
+FILES= atf-report
+FILESDIR= /usr/bin
+FILESMODE= ${BINMODE}
+
+realall: atf-report
+atf-report: atf-report.sh
+ src=atf-report.sh dst=atf-report; ${BUILD_SCRIPT}
+CLEANFILES+= atf-report atf-report.new
+
+MAN= atf-report.1
+
+.include <bsd.prog.mk>
+.include <bsd.files.mk>
Index: src/external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile Mon Feb 25 00:20:10 2013
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:10 jmmv Exp $
+
+.include <bsd.init.mk>
+
+FILES= atf-run
+FILESDIR= /usr/bin
+FILESMODE= ${BINMODE}
+
+realall: atf-run
+atf-run: atf-run.sh
+ src=atf-run.sh dst=atf-run; ${BUILD_SCRIPT}
+CLEANFILES+= atf-run atf-run.new
+
+MAN= atf-run.1
+
+.include <bsd.prog.mk>
+.include <bsd.files.mk>
Index: src/external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile
diff -u /dev/null src/external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile:1.1
--- /dev/null Mon Feb 25 00:20:10 2013
+++ src/external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile Mon Feb 25 00:20:10 2013
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2013/02/25 00:20:10 jmmv Exp $
+
+.include <bsd.init.mk>
+
+FILES= atf2kyua
+FILESDIR= /usr/bin
+FILESMODE= ${BINMODE}
+
+realall: atf2kyua
+atf2kyua: atf2kyua.sh
+ src=atf2kyua.sh dst=atf2kyua; ${BUILD_SCRIPT}
+CLEANFILES+= atf2kyua atf2kyua.new
+
+MAN= atf2kyua.1
+
+.include <bsd.prog.mk>
+.include <bsd.files.mk>