macos next support
authorDerrick Brashear <shadow@dementia.org>
Wed, 23 Mar 2011 18:16:10 +0000 (14:16 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 24 Mar 2011 16:19:47 +0000 (09:19 -0700)
first brush at supporting next macos. totally not lion about it.

Change-Id: I4d2e05f68266ea82de710717c5340f16425f897e
Reviewed-on: http://gerrit.openafs.org/4290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/config/afs_sysnames.h
src/config/param.x86_darwin_110.h [new file with mode: 0644]
src/libafs/MakefileProto.DARWIN.in
src/libafs/afs.x86_darwin_110.plist.in [new file with mode: 0644]
src/packaging/MacOS/InstallationCheck.11 [new file with mode: 0644]
src/packaging/MacOS/InstallationCheck.strings.11 [new file with mode: 0644]
src/packaging/MacOS/ReadMe.rtf.11 [new file with mode: 0644]
src/packaging/MacOS/buildpkg.sh.in

index 29c688b..1c8d6c5 100644 (file)
@@ -67,6 +67,9 @@
 #define SYS_NAME_ID_x86_darwin_100       514
 #define SYS_NAME_ID_amd64_darwin_100     515
 #define SYS_NAME_ID_arm_darwin_100       516
+#define SYS_NAME_ID_x86_darwin_110       517
+#define SYS_NAME_ID_amd64_darwin_110     518
+#define SYS_NAME_ID_arm_darwin_110       519
 
 #define SYS_NAME_ID_next_mach20                 601
 #define SYS_NAME_ID_next_mach30                 602
diff --git a/src/config/param.x86_darwin_110.h b/src/config/param.x86_darwin_110.h
new file mode 100644 (file)
index 0000000..8fa8ebf
--- /dev/null
@@ -0,0 +1,240 @@
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_ENV                 1
+#define AFS_64BIT_ENV           1      /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT        1
+#define AFS_64BIT_IOPS_ENV     1
+#if defined(__ppc__)
+#define AFS_PPC_ENV            1
+#elif defined(__i386__) || defined(__amd64__)
+#define AFS_X86_ENV            1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_VFSINCL_ENV                1
+#ifdef __amd64__
+#define AFS_64BITUSERPOINTER_ENV 1
+#endif
+#define AFS_64BIT_SIZEOF 1 /* seriously? */
+#include <afs/afs_sysnames.h>
+
+#define AFS_DARWIN_ENV
+#define AFS_DARWIN70_ENV
+#define AFS_DARWIN80_ENV
+#define AFS_DARWIN90_ENV
+#define AFS_DARWIN100_ENV
+#define AFS_DARWIN110_ENV
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define AFS_NAMEI_ENV 1
+#define DARWIN_REFBASE 3
+#define AFS_WARNUSER_MARINER_ENV 1
+#define AFS_CACHE_VNODE_PATH
+#define NEED_IOCTL32
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#define sys_ppc_darwin_12      1
+#define sys_ppc_darwin_13      1
+#define sys_ppc_darwin_14      1
+#define sys_ppc_darwin_60      1
+#define sys_ppc_darwin_70      1
+#define sys_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define SYS_NAME               "ppc_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__ppc64__)
+#define sys_ppc_darwin_12      1
+#define sys_ppc_darwin_13      1
+#define sys_ppc_darwin_14      1
+#define sys_ppc_darwin_60      1
+#define sys_ppc_darwin_70      1
+#define sys_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define sys_ppc64_darwin_100   1
+#define SYS_NAME               "ppc64_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc64_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__i386__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_90      1
+#define sys_x86_darwin_100     1
+#define sys_x86_darwin_110      1
+#define SYS_NAME               "x86_darwin_110"
+#define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_110
+#define AFSLITTLE_ENDIAN       1
+#elif defined(__amd64__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_90      1
+#define sys_x86_darwin_100     1
+#define sys_amd64_darwin_100   1
+#define sys_amd64_darwin_110      1
+#define SYS_NAME               "amd64_darwin_110"
+#define SYS_NAME_ID            SYS_NAME_ID_amd64_darwin_110
+#define AFSLITTLE_ENDIAN       1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_HAVE_FFS    1      /* Use system's ffs. */
+
+#define AFS_GCPAGS               0
+#define RXK_UPCALL_ENV         1
+#define RXK_TIMEDSLEEP_ENV       1
+
+#ifdef KERNEL
+#undef MACRO_BEGIN
+#undef MACRO_END
+#include <kern/macro_help.h>
+#define AFS_GLOBAL_SUNLOCK        1
+#define AFS_VFS34       1      /* What is VFS34??? */
+#define afsio_iov       uio_iov
+#define afsio_iovcnt    uio_iovcnt
+#define afsio_offset    uio_offset
+#define afsio_seg       uio_segflg
+#define afsio_resid     uio_resid
+#define AFS_UIOSYS      UIO_SYSSPACE
+#define AFS_UIOUSER     UIO_USERSPACE
+#define AFS_CLBYTES     CLBYTES
+#define osi_GetTime(x)  microtime(x)
+#define AFS_KALLOC(x)   _MALLOC(x, M_TEMP, M_WAITOK)
+#define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+#define v_count         v_usecount
+#define v_vfsp          v_mount
+#define vfs_bsize       mnt_stat.f_bsize
+#define vfs_fsid        mnt_stat.f_fsid
+#define va_nodeid       va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct          dirent
+
+#define BIND_8_COMPAT
+
+#endif
+#endif /* AFS_PARAM_H */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFSINCL_ENV 1      /* NOBODY uses this.... */
+#define AFS_ENV                 1
+#define AFS_64BIT_ENV           1      /* Defines afs_int32 as int, not long. */
+#if defined(__ppc__)
+#define AFS_PPC_ENV            1
+#elif defined(__i386__) || defined(__amd64__)
+#define AFS_X86_ENV            1
+#else
+#error Unsupported architecture
+#endif
+#ifdef __amd64__
+#define AFS_64BITUSERPOINTER_ENV 1
+#endif
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_ENV
+#define AFS_USR_DARWIN_ENV
+#define AFS_USR_DARWIN70_ENV
+#define AFS_USR_DARWIN80_ENV
+#define AFS_USR_DARWIN90_ENV
+#define AFS_USR_DARWIN100_ENV
+#define AFS_USR_DARWIN110_ENV
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define DARWIN_REFBASE 0
+#define AFS_WARNUSER_MARINER_ENV 1
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#define sys_ppc_darwin_12      1
+#define sys_ppc_darwin_13      1
+#define sys_ppc_darwin_14      1
+#define sys_ppc_darwin_60      1
+#define sys_ppc_darwin_70      1
+#define sys_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define SYS_NAME               "ppc_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__i386__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_100     1
+#define sys_x86_darwin_110     1
+#define SYS_NAME               "x86_darwin_110"
+#define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_110
+#define AFSLITTLE_ENDIAN       1
+#elif defined(__amd64__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_100     1
+#define sys_amd64_darwin_100   1
+#define sys_amd64_darwin_110   1
+#define SYS_NAME               "amd64_darwin_110"
+#define SYS_NAME_ID            SYS_NAME_ID_amd64_darwin_110
+#define AFSLITTLE_ENDIAN       1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_HAVE_FFS    1      /* Use system's ffs. */
+
+#define AFS_UIOSYS      UIO_SYSSPACE
+#define AFS_UIOUSER     UIO_USERSPACE
+
+#define AFS_GCPAGS                0    /* if nonzero, garbage collect PAGs */
+#define RXK_LISTENER_ENV          1
+
+#define AFS_VFS34       1      /* What is VFS34??? */
+#define afsio_iov       uio_iov
+#define afsio_iovcnt    uio_iovcnt
+#define afsio_offset    uio_offset
+#define afsio_seg       uio_segflg
+#define afsio_resid     uio_resid
+#define AFS_UIOSYS      UIO_SYSSPACE
+#define AFS_UIOUSER     UIO_USERSPACE
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#define BIND_8_COMPAT
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
index 3141931..322ad58 100644 (file)
@@ -44,11 +44,11 @@ KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
 
 <ppc_darwin_80 x86_darwin_80>
 KOPTS_DBUG=-g
-<ppc_darwin_90 x86_darwin_90
+<ppc_darwin_90 x86_darwin_90>
 KOPTS_DBUG=-ggdb
-< x86_darwin_100>
+<x86_darwin_100 x86_darwin_110>
 KOPTS_DBUG=-gdwarf-2
-<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
 KOPTS_ppc=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns -force_cpusubtype_ALL
 KOPTS_x86=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
 KOPTS_amd64=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch x86_64 -Damd64 -DAMD64 -D__AMD64__ -DPAGE_SIZE_FIXED -march=x86-64 -mpreferred-stack-boundary=4 -falign-functions=4 -m64 -mkernel -mno-red-zone
@@ -59,9 +59,9 @@ OBJ_ppc=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "$@.ppc")
 OBJ_x86=$(shell echo "${ARCH_x86}" | grep -q -w yes && echo "$@.x86")
 OBJ_amd64=$(shell echo "${ARCH_amd64}" | grep -q -w yes && echo "$@.amd64")
 
-<x86_darwin_100>
+<x86_darwin_100 x86_darwin_110>
 MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS) -Xlinker -kext
-<all -x86_darwin_100>
+<all -x86_darwin_100 -x86_darwin_110>
 MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS)
 <all>
 
@@ -80,7 +80,7 @@ DESTDIRS = single_destdir
 
 include Makefile.common
 
-<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
 # override suffix rule; unfortunately, this causes a warning message
 .c.o:
        if [ "$(ARCH_ppc)" = "yes" ]; then \
@@ -104,7 +104,7 @@ CRULE_OPT_x86=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(
 CRULE_OPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? 
 CRULE_OPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_OPT_ppc} && "; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_OPT_x86} && "; echo "${ARCH_amd64}" | grep -q -w yes && echo "${CRULE_OPT_amd64} && ";echo "lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@")
 
-<all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90 -x86_darwin_100>
+<all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90 -x86_darwin_100 -x86_darwin_110>
 MODLD=$(LD)
 CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
 <ppc_darwin_70>
@@ -134,14 +134,14 @@ INST_LIBAFS = ${DESTDIR}${afskerneldir}/afs-nfs.kext
 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/afs.kext
 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/afs-nfs.kext
 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/afs.kext
-<all -ppc_darwin_90 -x86_darwin_90 -x86_darwin_100>
+<all -ppc_darwin_90 -x86_darwin_90 -x86_darwin_100 -x86_darwin_110>
 LIBAFSDSYM =
 LIBAFSNONFSDSYM =
 INST_LIBAFSDSYM =
 INST_LIBAFSNONFSDSYM =
 DEST_LIBAFSDSYM =
 DEST_LIBAFSNONFSDSYM =
-<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
 LIBAFSDSYM = libafs.o.dSYM
 LIBAFSNONFSDSYM = libafs.nonfs.o.dSYM
 INST_LIBAFSDSYM = ${DESTDIR}${afskerneldir}/afs-nfs.kext.dSYM
@@ -157,7 +157,7 @@ install_libafs: $(LIBAFSNONFS) $(LIBAFSNONFSDSYM) ;
        $(INSTALL) -m 644 ../${DARWIN_INFOFILE} ${INST_LIBAFSNONFS}/Contents/Info.plist
        -mkdir -p ${INST_LIBAFSNONFS}/Contents/MacOS
        $(INSTALL) -m 644 ${LIBAFSNONFS} ${INST_LIBAFSNONFS}/Contents/MacOS/afs
-<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
        -mkdir -p ${INST_LIBAFSNONFSDSYM}/Contents/Resources/DWARF
        $(INSTALL) ${LIBAFSNONFSDSYM}/Contents/Info.plist ${INST_LIBAFSNONFSDSYM}/Contents
        $(INSTALL) ${LIBAFSNONFSDSYM}/Contents/Resources/DWARF/${LIBAFSNONFS} ${INST_LIBAFSNONFSDSYM}/Contents/Resources/DWARF
@@ -169,7 +169,7 @@ dest_libafs: $(LIBAFSNONFS) $(LIBAFSNONFSDSYM) ;
        $(INSTALL) -m 644 ../${DARWIN_INFOFILE} ${DEST_LIBAFSNONFS}/Contents/Info.plist
        -mkdir -p ${DEST_LIBAFSNONFS}/Contents/MacOS
        $(INSTALL) -m 644 ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}/Contents/MacOS/afs
-<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
        -mkdir -p ${DEST_LIBAFSNONFSDSYM}/Contents/Resources/DWARF
        $(INSTALL) ${LIBAFSNONFSDSYM}/Contents/Info.plist ${DEST_LIBAFSNONFSDSYM}/Contents
        $(INSTALL) ${LIBAFSNONFSDSYM}/Contents/Resources/DWARF/${LIBAFSNONFS} ${DEST_LIBAFSNONFSDSYM}/Contents/Resources/DWARF
@@ -181,7 +181,7 @@ ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
        $(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext
 
-<ppc_darwin_90 x86_darwin_90 x86_darwin_100>
+<ppc_darwin_90 x86_darwin_90 x86_darwin_100 x86_darwin_110>
 $(LIBAFSDSYM): ${LIBAFS}
        dsymutil -o ${LIBAFS}.dSYM ${LIBAFS}
 ${LIBAFSNONFSDSYM}: ${LIBAFSNONFS}
diff --git a/src/libafs/afs.x86_darwin_110.plist.in b/src/libafs/afs.x86_darwin_110.plist.in
new file mode 100644 (file)
index 0000000..a138571
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>afs</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.openafs.filesystems.afs</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>8.0</string>
+       <key>CFBundleName</key>
+       <string>afs</string>
+       <key>CFBundlePackageType</key>
+       <string>KEXT</string>
+       <key>CFBundleShortVersionString</key>
+       <string>@MACOS_VERSION@</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>@MACOS_VERSION@</string>
+       <key>OSBundleLibraries</key>
+       <dict>
+               <key>com.apple.kpi.bsd</key>
+               <string>8.0.0</string>
+               <key>com.apple.kpi.mach</key>
+               <string>8.0.0</string>
+               <key>com.apple.kpi.libkern</key>
+               <string>8.0</string>
+       </dict>
+</dict>
+</plist>
diff --git a/src/packaging/MacOS/InstallationCheck.11 b/src/packaging/MacOS/InstallationCheck.11
new file mode 100644 (file)
index 0000000..c927ba1
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+majorvers=`uname -r | sed 's/\..*//'`
+if [ $majorvers -ne 11 ]; then
+       exit 112
+fi
+
+# check for temporary versions of ThisCell and CellAlias
+# and move them aside
+tmpthiscell=/private/tmp/org.OpenAFS.Install.ThisCell.$USER
+tmpcellalias=/private/tmp/org.OpenAFS.Install.CellAlias.$USER
+date=`date +%Y%m%d%H%M`
+if [ -e $tmpthiscell ]; then
+    mv -f $tmpthiscell $tmpthiscell.$date
+fi
+if [ -e $tmpcellalias ]; then
+    mv -f $tmpcellalias $tmpcellalias.$date
+fi
+
+exit 0
diff --git a/src/packaging/MacOS/InstallationCheck.strings.11 b/src/packaging/MacOS/InstallationCheck.strings.11
new file mode 100644 (file)
index 0000000..3dcba06
--- /dev/null
@@ -0,0 +1 @@
+"16" = "This OpenAFS release requires Lion (10.7)";
diff --git a/src/packaging/MacOS/ReadMe.rtf.11 b/src/packaging/MacOS/ReadMe.rtf.11
new file mode 100644 (file)
index 0000000..1856e84
--- /dev/null
@@ -0,0 +1,7 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
+
+\f0\fs24 \cf0 This release of OpenAFS is targeted at MacOS 10.7 (Lion) and is not recommended for use with any other version.}
\ No newline at end of file
index f3b88ab..309b0aa 100644 (file)
@@ -37,6 +37,9 @@ fi
 if [ $majorvers -eq 10 ]; then
   RELNAME="Snowleopard"
 fi
+if [ $majorvers -eq 11 ]; then
+  RELNAME="Lion"
+fi
 
 PKGROOT=$CURDIR/pkgroot
 PKGRES=$CURDIR/pkgres