summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2010-04-30 03:18:26 +0000
committersbd <sbd@pkgsrc.org>2010-04-30 03:18:26 +0000
commit5531fcfe04b71751799a497da086aad9ecd97f1e (patch)
treebc88eeef988f50f79af58f2c4b7bcadc14e487fb /pkgtools
parent8d7b79d3324b096670f70a2f7d7dbe2a85f88133 (diff)
downloadpkgsrc-5531fcfe04b71751799a497da086aad9ecd97f1e.tar.gz
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).
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/osabi/DESCR7
-rw-r--r--pkgtools/osabi/INSTALL44
-rw-r--r--pkgtools/osabi/Makefile16
3 files changed, 67 insertions, 0 deletions
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"