aboutsummaryrefslogtreecommitdiffstats
path: root/databases/pydbdesigner/Makefile
blob: 985f288f890278c0d2a1b2141e22651cfee53b5a (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
# ex:ts=8   -*-mode: makefile-*-
#
# New ports collection makefile for:    pydbdesigner
# Date created:     2003-01-02
# Whom:         Alan Eldridge <alane@geeksrus.net>
#
# $FreeBSD$
#

PORTNAME=   pydbdesigner
PORTVERSION=    0.1.3
PORTREVISION=   2
PORTEPOCH=  0
CATEGORIES= databases
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Graphical designer for relational databases

BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/wxPython/__init__.py:${PORTSDIR}/x11-toolkits/py-wxPython
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/wxPython/__init__.py:${PORTSDIR}/x11-toolkits/py-wxPython

USE_PYTHON= yes
PLIST=      ${WRKDIR}/plist
WRKSRC=     ${WRKDIR}/${PORTNAME}

PYTHON_SITELIBSUBDIR=   ${PYTHON_SITELIBDIR:S|^${PREFIX}/||}
MY_SITELIBDIR=      ${PYTHON_SITELIBDIR}/${PORTNAME}
MY_SITELIBSUBDIR=   ${PYTHON_SITELIBSUBDIR}/${PORTNAME}

.include <bsd.port.pre.mk>

PYVERSION=  ${PYTHON_VERSION:S/^python//}
.if defined(PYTHON_VERSION) && ${PYVERSION:S/.//} < 22
.undef      NO_IGNORE
BROKEN=     This port requires python 2.2 or later
.endif # defined(PYVERSION) && ${PYVERSION:S/.//} < 22

post-patch:
    cd ${WRKSRC}; ${RM} -f *.tar.gz; >${PLIST}

# make the plist here (for now)
do-build:
    cd ${WRKSRC};\
    ${ECHO_CMD} bin/${PORTNAME} >${PLIST};\
    ${FIND} . ! -type d | cut -c3- | ${SORT} \
        | ${SED} -e "s|^|${MY_SITELIBSUBDIR}/|" >>${PLIST};\
    ${FIND} . -type d | cut -c3- | ${SORT} -r \
        | ${SED} -e "s|^|@dirrm ${MY_SITELIBSUBDIR}/|" >>${PLIST}

do-install:
    ${MKDIR} ${MY_SITELIBDIR}
    cd ${WRKSRC};\
    ${FIND} . | cut -c3- \
        | ${CPIO} -pdmv -R ${LIBOWN}:${LIBGRP} ${MY_SITELIBDIR};\
    cd ${MY_SITELIBDIR};\
    ${FIND} . -type d | cut -c3- | ${XARGS} ${CHMOD} ${BINMODE};\
    ${FIND} . -type f | cut -c3- | ${XARGS} ${CHMOD} ${LIBMODE};\
    ${RM} -f ${PREFIX}/bin/${PORTNAME};\
    ${LN} -s ${MY_SITELIBDIR}/main.py ${PREFIX}/bin/${PORTNAME}
    ${CHMOD} ${BINMODE} ${MY_SITELIBDIR}/main.py

.include <bsd.port.post.mk>