Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/kyua-atf-compat Add reachover build files for k...
details: https://anonhg.NetBSD.org/src/rev/1b1a0bd3c440
branches: trunk
changeset: 785122:1b1a0bd3c440
user: jmmv <jmmv%NetBSD.org@localhost>
date: Mon Feb 25 00:20:08 2013 +0000
description:
Add reachover build files for kyua-atf-compat.
diffstat:
external/bsd/kyua-atf-compat/Makefile | 10 +
external/bsd/kyua-atf-compat/Makefile.inc | 14 +
external/bsd/kyua-atf-compat/prepare-import.sh | 103 ++++++++++
external/bsd/kyua-atf-compat/share/Makefile | 5 +
external/bsd/kyua-atf-compat/share/Makefile.inc | 3 +
external/bsd/kyua-atf-compat/share/doc/Makefile | 5 +
external/bsd/kyua-atf-compat/share/doc/Makefile.inc | 3 +
external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile | 11 +
external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile | 9 +
external/bsd/kyua-atf-compat/tests/Makefile | 5 +
external/bsd/kyua-atf-compat/tests/Makefile.inc | 3 +
external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile | 22 ++
external/bsd/kyua-atf-compat/usr.bin/Makefile | 5 +
external/bsd/kyua-atf-compat/usr.bin/Makefile.inc | 3 +
external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile | 17 +
external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile | 17 +
external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile | 17 +
17 files changed, 252 insertions(+), 0 deletions(-)
diffs (truncated from 320 to 300 lines):
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/Makefile.inc Mon Feb 25 00:20:08 2013 +0000
@@ -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}
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/prepare-import.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/prepare-import.sh Mon Feb 25 00:20:08 2013 +0000
@@ -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 "${@}"
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/Makefile.inc Mon Feb 25 00:20:08 2013 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:08 jmmv Exp $
+
+.include "../Makefile.inc"
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/doc/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/doc/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/doc/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/doc/Makefile.inc Mon Feb 25 00:20:08 2013 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/doc/kyua-atf-compat/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/share/kyua-atf-compat/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/tests/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/tests/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/tests/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/tests/Makefile.inc Mon Feb 25 00:20:08 2013 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/tests/kyua-atf-compat/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/usr.bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/usr.bin/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/usr.bin/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/usr.bin/Makefile.inc Mon Feb 25 00:20:08 2013 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/02/25 00:20:09 jmmv Exp $
+
+.include "../Makefile.inc"
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/usr.bin/atf-report/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/usr.bin/atf-run/Makefile Mon Feb 25 00:20:08 2013 +0000
@@ -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>
diff -r 056b14972cf7 -r 1b1a0bd3c440 external/bsd/kyua-atf-compat/usr.bin/atf2kyua/Makefile
Home |
Main Index |
Thread Index |
Old Index