aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-MySQLdb-devel/Makefile
blob: 674c9a69ea427aa670591610102e4dfb9a1ffe58 (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
# New ports collection makefile for:    py-MySQLdb
# Date created:             04 April 2000
# Whom:                         Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   MySQLdb
DISTVERSION=    1.2.2b2
PORTREVISION=   1
CATEGORIES= databases python
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mysql-python
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX=  -devel
DISTNAME=   MySQL-python-${DISTVERSION}

MAINTAINER= mnag@FreeBSD.org
COMMENT=    Access a MySQL database through Python

USE_PYTHON=     2.3+
USE_PYDISTUTILS=    yes
USE_MYSQL=      yes
PYDISTUTILS_PKGNAME=    MySQL-python${PYTHON_VER}
PYDISTUTILS_PKGVERSION= 1.2.2b2

CONFLICTS=  py*-MySQLdb-[0-9]*

PORTDOCS=   *
IGNORE=     in obsoleted by the latest version in databases/py-MySQLdb

OPTIONSFILE=    ${PORT_DBDIR}/${PORTNAME}/options
OPTIONS=    MYSQLCLIENT_R "Use libmysqlclient_r (thread safe)" on

.include <bsd.port.pre.mk>

post-patch:
.if defined(WITHOUT_MYSQLCLIENT_R)
    @${REINPLACE_CMD} -E -e "s|(threadsafe.*)True|\1 False|" \
        ${WRKSRC}/site.cfg
.endif

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif

.include <bsd.port.post.mk>