From 5531fcfe04b71751799a497da086aad9ecd97f1e Mon Sep 17 00:00:00 2001 From: sbd Date: Fri, 30 Apr 2010 03:18:26 +0000 Subject: Import the 'osabi-${OPSYS}-${OS_VERSION}' as pkgtools/osabi This is a dummy-package which is made a dependence for packages which are tightly bound to a specific version of an operating system, e.g. LKMs or sysutils/lsof. Such binary packages are not backwards compatible with other versions of the OS. The version number of this package should be similar to the operating system version (`uname -r' output). --- pkgtools/osabi/DESCR | 7 +++++++ pkgtools/osabi/INSTALL | 44 ++++++++++++++++++++++++++++++++++++++++++++ pkgtools/osabi/Makefile | 16 ++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 pkgtools/osabi/DESCR create mode 100644 pkgtools/osabi/INSTALL create mode 100644 pkgtools/osabi/Makefile (limited to 'pkgtools') diff --git a/pkgtools/osabi/DESCR b/pkgtools/osabi/DESCR new file mode 100644 index 00000000000..1d7323be9f6 --- /dev/null +++ b/pkgtools/osabi/DESCR @@ -0,0 +1,7 @@ +This is a dummy-package which is made a dependence for packages which are +tightly bound to a specific version of an operating system, e.g. LKMs or +sysutils/lsof. Such binary packages are not backwards compatible with other +versions of the OS. + +The version number of this package should be similar to the operating system +version (`uname -r' output). diff --git a/pkgtools/osabi/INSTALL b/pkgtools/osabi/INSTALL new file mode 100644 index 00000000000..4f4cf9642c6 --- /dev/null +++ b/pkgtools/osabi/INSTALL @@ -0,0 +1,44 @@ +# $NetBSD: INSTALL,v 1.1.1.1 2010/04/30 03:18:26 sbd Exp $ + +UNAME="@UNAME@" +case ${STAGE} in +PRE-INSTALL) + OS_VERSION=`${UNAME} -r` + PKG_VERSION="${PKGNAME##*-}" + case `${UNAME} -s` in + AIX) + if ${TEST} -f /usr/bin/oslevel ;then + OS_VERSION=`/usr/bin/oslevel | \ + sed -e's/\([0-9]*\.[0-9]*\).*/\1/'` + else + OS_VERSION="`${UNAME} -v`.`${UNAME} -r`" + OS_VERSION=`echo "${OS_VERSION}" | \ + sed -e's/\([0-9]*\.[0-9]*\).*/\1/'` + fi + ;; + DragonFly|FreeBSD|Linux) + OS_VERSION=`echo "${OS_VERSION}" | sed -e's/-.*$//'` + ;; + Interix) + if ${TEST} -f /usr/lib/libc.so.3.5 ;then + OS_VERSION="3.5" + elif ${TEST} -f /usr/lib/libc.so.3.1 ;then + OS_VERSION="3.1" + else + OS_VERSION="3.0" + fi + ;; + OSF1) + OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^V//'` + ;; + HPUX) + OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^B.//'` + ;; + esac + + if ${TEST} "${OS_VERSION}" != "${PKG_VERSION}" ;then + echo "The Operating System version (${OS_VERSION}) does not match ${PKG_VERSION}" + exit 1 + fi + ;; +esac diff --git a/pkgtools/osabi/Makefile b/pkgtools/osabi/Makefile new file mode 100644 index 00000000000..f8268fdee69 --- /dev/null +++ b/pkgtools/osabi/Makefile @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/04/30 03:18:26 sbd Exp $ +# + +DISTNAME= osabi-${OPSYS}-${OS_VERSION} +CATEGORIES= pkgtools +MASTER_SITES= # empty +DISTFILES= # empty + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.pkgsrc.org/ +COMMENT= Operating System version dummy-package + +META_PACKAGE= yes +FILES_SUBST+= UNAME=${UNAME:Q} + +.include "../../mk/bsd.pkg.mk" -- cgit v1.2.3