aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-sqlalchemy06/Makefile
blob: 6c6a7706a181693dcc61f880e4bd235f71575801 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Ports collection makefile for:    py-sqlalchemy
# Date created:             12 August 2004
# Whom:                 Dryice Dong Liu <dryice@dryice.name>
#
# $FreeBSD$
#

PORTNAME=   sqlalchemy06
PORTVERSION=    0.6.8
CATEGORIES= databases python
MASTER_SITES=   CHEESESHOP
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   SQLAlchemy-${DISTVERSION}

MAINTAINER= nivit@FreeBSD.org
COMMENT=    A Python SQL toolkit and Object Relational Mapper

# Python3 ready
USE_PYTHON= yes
USE_PYDISTUTILS=    easy_install
PYDISTUTILS_PKGNAME=    SQLAlchemy
PYDISTUTILS_PKGVERSION= ${DISTVERSION}
PYDISTUTILS_NOEGGINFO=  yes

# bypass infrastructure bug
OPTIONSFILE=    ${PORT_DBDIR}/py-${PORTNAME}/options

OPTIONS=    FIREBIRD "support FireBird" off
OPTIONS+=   MSSQL "support MS SQL Server" off
OPTIONS+=   MYSQL "support MySql" on
OPTIONS+=   NOSE "install Nose for unit tests" off
OPTIONS+=   PGSQL "support PostGreSQL" on
OPTIONS+=   SQLITE "support Sqlite" on
OPTIONS+=   SYBASE "support Sybase" off

DOCSDIR=    ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR=    ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}

.if !defined(NOPORTDOCS)
AL_PORTDOCS=    *.html *.js
AL_PORTDOCS_SUBDIR= core dialects orm
.endif

.include <bsd.port.pre.mk>

.if defined(WITH_FIREBIRD)
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/kinterbasdb/__init__.py:${PORTSDIR}/databases/kinterbasdb
.endif

.if defined(WITH_MSSQL)
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/pymssql.py:${PORTSDIR}/databases/py-mssql
.endif

.if !defined(WITHOUT_MYSQL) && ${PYTHON_REL} < 3.0
RUN_DEPENDS+=   ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb
.endif

.if defined(WITH_NOSE)
RUN_DEPENDS+=   ${PYTHON_PKGNAMEPREFIX}nose-1.0.0:${PORTSDIR}/devel/py-nose
.endif

.if !defined(WITHOUT_PGSQL)
RUN_DEPENDS+=   ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.0.8:${PORTSDIR}/databases/py-psycopg2
.endif

.if !defined(WITHOUT_SQLITE)
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
.endif

.if !defined(WITHOUT_SYBASE)
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/Sybase.py:${PORTSDIR}/databases/py-sybase
.endif

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in ${AL_PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
.for i in ${AL_PORTDOCS_SUBDIR}
    ${MKDIR} ${DOCSDIR}/${i}
    @cd ${WRKSRC}/doc/${i} && ${COPYTREE_SHARE} . ${DOCSDIR}/${i}
.endfor
.endif

.if !defined(NOPORTEXAMPLES)
    ${MKDIR} ${EXAMPLESDIR}
    @cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
.endif

.include <bsd.port.post.mk>