aboutsummaryrefslogtreecommitdiffstats
path: root/comms/gammu/Makefile
blob: b9d3e21c391e3a94d1cec3a72995245a082d8f9f (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
# New ports collection makefile for:   gammu
# Date created:        12 december 2003
# Whom:                Kirill Bezzubets <kirill@solaris.ru>
#
# $FreeBSD$
#

PORTNAME=   gammu
PORTVERSION=    1.30.0
CATEGORIES= comms
MASTER_SITES=   http://dl.cihar.com/gammu/releases/ \
        http://dl.cihar.com.nyud.net/gammu/releases/

MAINTAINER= bsam@FreeBSD.org
COMMENT=    GNU All Mobile Management Utilities

RUN_DEPENDS=    cdialog:${PORTSDIR}/devel/cdialog

CONFLICTS=  gammu-devel-[1-9]* gammu-python-[1-9]*

OPTIONS=    BASH "Install bash completion script" off

CMAKE_ARGS+=    -DINSTALL_LIBDATA_DIR=${LOCALBASE}/libdata

USE_CMAKE=  yes
USE_PYTHON= yes
USE_GETTEXT=    yes
USE_GNOME=  glib20

PORTDOCS=   *

.if defined(NOPORTDOCS)
CMAKE_ARGS+=    -DINSTALL_DOC=OFF -DINSTALL_PHP_EXAMPLES=OFF -DINSTALL_MEDIA=OFF \
        -DINSTALL_GNAPPLET=OFF
.else
MAN1=       gammu.1 gammu-config.1 jadmaker.1 gammu-smsd.1 gammu-smsd-inject.1 \
        gammu-smsd-monitor.1 gammu-detect.1
MAN5=       gammu-backup.5 gammu-smsbackup.5 gammu-smsdrc.5 gammurc.5
MAN7=       gammu-smsd-files.7 gammu-smsd-mysql.7 \
        gammu-smsd-odbc.7 gammu-smsd-pgsql.7 \
        gammu-smsd-dbi.7 gammu-smsd-tables.7 gammu-smsd-null.7 \
        gammu-smsd-run.7 gammu-smsd-sql.7

.endif

post-install:
.for opt in -Qold -O
    ${PYTHON_CMD} ${opt} -m compileall -l ${PYTHONPREFIX_SITELIBDIR}/gammu
.endfor

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -i '' -e 's:bash:sh:' -e 's:dialog:cdialog:' ${WRKSRC}/utils/gammu-config
    @${REINPLACE_CMD} -i '' -e 's:/etc/bash_completion.d:${PREFIX}/etc/bash_completion.d:' \
        ${WRKSRC}/contrib/CMakeLists.txt
.if ${OSVERSION} < 700042
    @${REINPLACE_CMD} -e 's@ -Wno-pointer-sign@@g' ${WRKSRC}/CMakeLists.txt
.endif

.if defined(WITH_BASH)
BUILD_DEPENDS+= bash:${PORTSDIR}/shells/bash
RUN_DEPENDS+=   bash:${PORTSDIR}/shells/bash
PLIST_FILES+=   etc/bash_completion.d/gammu
PLIST_DIRSTRY+= etc/bash_completion.d
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-contrib_CMakeLists.txt
.endif

.include <bsd.port.post.mk>