1PORTNAME=	instantclient
2PORTVERSION=	${ORACLEVERSION}.${DISTDATE}
3PORTEPOCH=	1
4CATEGORIES=	databases
5MASTER_SITES=	#http://www.oracle.com/technology/software/tech/oci/instantclient/
6PKGNAMEPREFIX=	linux-oracle-
7PKGNAMESUFFIX=	-sdk
8DISTNAME=	${PORTNAME}${PKGNAMESUFFIX}-${LINUXARCH}-${ORACLEVERSION}-${DISTDATE}
9DIST_SUBDIR=	oracle
10
11MAINTAINER=	ports@MidnightBSD.org
12COMMENT=	Oracle 10 InstantClient SDK. Works with Oracle RDBMS 8.1.2+
13WWW=		http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html
14
15# Converted from RESTRICTED
16LICENSE=	Oracle
17LICENSE_NAME=	Oracle
18LICENSE_TEXT=	Packaging prohibited by Oracle license
19LICENSE_PERMS=	auto-accept
20
21RESTRICTED=	yes
22
23RUN_DEPENDS=	${LINUXBASE}/usr/lib/oracle/${ORACLEVERSION}/client/lib/libocci.so.10.1:databases/linux-oracle-instantclient-basic
24
25ONLY_FOR_ARCHS=	i386 amd64
26NO_BUILD=	yes
27DISTINFO_FILE=	${MASTERDIR}/distinfo.${ARCH}
28
29USES=		zip
30USE_LINUX_PREFIX=	yes
31
32ORACLEVERSION=	10.2.0.3
33
34INCS_LIST=	nzerror.h \
35		nzt.h \
36		occi.h \
37		occiAQ.h \
38		occiCommon.h \
39		occiControl.h \
40		occiData.h \
41		occiObjects.h \
42		oci.h \
43		oci1.h \
44		oci8dp.h \
45		ociap.h \
46		ociapr.h \
47		ocidef.h \
48		ocidem.h \
49		ocidfn.h \
50		ociextp.h \
51		ocikpr.h \
52		ocixmldb.h \
53		odci.h \
54		oratypes.h \
55		ori.h \
56		orid.h \
57		orl.h \
58		oro.h \
59		ort.h \
60		xa.h
61
62DEMO_LIST=	cdemo81.c	\
63		demo.mk		\
64		occidemo.sql	\
65		occidemod.sql	\
66		occidml.cpp	\
67		occiobj.cpp	\
68		occiobj.typ
69
70WRKSRC=		${WRKDIR}/instantclient_10_2/sdk
71
72INSTLIBSDIR=	${PREFIX}/usr/lib/oracle/${ORACLEVERSION}/client/lib
73INSTINCSDIR=	${PREFIX}/usr/include/oracle/${ORACLEVERSION}/client
74INSTDEMODIR=	${PREFIX}/usr/share/oracle/${ORACLEVERSION}/client
75
76PLIST_SUB=	PORTVERSION=${PORTVERSION}
77
78.include <bsd.port.pre.mk>
79
80LINUXARCH=	linux32
81LINUXXVAL=	x86
82DISTDATE=	20061115
83
84.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX})
85IGNORE=\
86	Due to Oracle license restrictions, you must fetch the source\
87	distribution manually from\
88	http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html\
89	, follow the link for Linux ${LINUXXVAL}, download ${DISTFILES}\
90	and place it in ${DISTDIR}/${DIST_SUBDIR}/
91.endif
92
93do-install:
94	${MKDIR} -m 0755 ${INSTINCSDIR} ${INSTDEMODIR} ${INSTLIBSDIR}
95	${LN} -s libclntsh.so.10.1 ${INSTLIBSDIR}/libclntsh.so
96	${LN} -s libocci.so.10.1 ${INSTLIBSDIR}/libocci.so
97.for i in ${INCS_LIST}
98	${INSTALL_DATA} ${WRKSRC}/include/${i} ${INSTINCSDIR}/${i}
99.endfor
100.for i in ${DEMO_LIST}
101	${INSTALL_DATA} ${WRKSRC}/demo/${i} ${INSTDEMODIR}/${i}
102.endfor
103
104.include <bsd.port.post.mk>
105