Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / pkgtools / osabi / INSTALL
blobe11da6c74366c67096724b6fb1afc4ca36877b90
1 # $NetBSD: INSTALL,v 1.2 2011/02/05 13:21:13 obache Exp $
3 UNAME="@UNAME@"
4 case ${STAGE} in
5 PRE-INSTALL)
6         OS_VERSION=`${UNAME} -r`
7         PKG_VERSION="${PKGNAME##*-}"
8         case `${UNAME} -s` in
9         AIX)
10                 if ${TEST} -f /usr/bin/oslevel ;then
11                         OS_VERSION=`/usr/bin/oslevel | \
12                                         sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
13                 else
14                         OS_VERSION="`${UNAME} -v`.`${UNAME} -r`"
15                         OS_VERSION=`echo "${OS_VERSION}" | \
16                                         sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
17                 fi
18                 ;;
19         DragonFly|FreeBSD|Linux)
20                 OS_VERSION=`echo "${OS_VERSION}" | sed -e's/-.*$//'`
21                 ;;
22         OSF1)
23                 OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^V//'`
24                 ;;
25         HPUX)
26                 OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^B.//'`
27                 ;;
28         CYGWIN_*)
29                 OS_VERSION=`echo "${OS_VERSION}" | sed -e's/(.*)//'`
30                 ;;
31         esac
33         if ${TEST} "${OS_VERSION}" != "${PKG_VERSION}" ;then 
34                 echo "The Operating System version (${OS_VERSION}) does not match ${PKG_VERSION}"
35                 exit 1
36         fi
37         ;;
38 esac