1999-04-02 00:45:54 +00:00
|
|
|
# New ports collection makefile for: gnokii
|
|
|
|
# Date created: 15 March 1999
|
|
|
|
# Whom: staffanu
|
|
|
|
#
|
1999-08-25 05:28:01 +00:00
|
|
|
# $FreeBSD$
|
1999-04-02 00:45:54 +00:00
|
|
|
#
|
|
|
|
|
2000-04-08 23:24:42 +00:00
|
|
|
PORTNAME= gnokii
|
2003-12-04 22:00:20 +00:00
|
|
|
PORTVERSION= 0.5.6
|
2001-10-15 15:43:58 +00:00
|
|
|
PORTEPOCH= 1
|
1999-04-02 00:45:54 +00:00
|
|
|
CATEGORIES= comms
|
2003-12-04 22:00:20 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SAVANNAH} \
|
2003-05-20 23:52:47 +00:00
|
|
|
ftp://ftp.gnokii.org/pub/gnokii/
|
2003-12-04 22:00:20 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2003-10-19 20:00:26 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-03-07 06:14:21 +00:00
|
|
|
COMMENT= Tools to talk to Nokia cellular phones
|
2001-05-03 01:13:00 +00:00
|
|
|
|
2003-08-25 05:41:38 +00:00
|
|
|
LIB_DEPENDS= intl.5:${PORTSDIR}/devel/gettext
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2003-05-20 23:52:47 +00:00
|
|
|
USE_REINPLACE= yes
|
1999-04-02 00:45:54 +00:00
|
|
|
USE_GMAKE= yes
|
2003-12-04 22:00:20 +00:00
|
|
|
USE_BZIP2= yes
|
2002-05-23 01:02:28 +00:00
|
|
|
INSTALLS_SHLIB= yes
|
2001-05-03 01:13:00 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2003-05-20 23:52:47 +00:00
|
|
|
CONFIGURE_ARGS+= --with-libintl-prefix=${LOCALBASE} --enable-security \
|
2001-05-03 01:13:00 +00:00
|
|
|
--with-xgnokiidir=${PREFIX}/share
|
2002-05-23 01:02:28 +00:00
|
|
|
CONFIGURE_ENV+= MSGFMT="${LOCALBASE}/bin/msgfmt" \
|
2003-05-20 23:52:47 +00:00
|
|
|
XGETTEXT="${LOCALBASE}/bin/xgettext" \
|
|
|
|
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
|
|
|
LIBS="-L${LOCALBASE}/lib"
|
2001-05-03 01:13:00 +00:00
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
MAN1= gnokii.1 todologo.1 ppm2nokia.1 sendsms.1
|
2001-10-15 15:43:58 +00:00
|
|
|
MAN8= gnokiid.8 mgnokiidev.8
|
2001-05-03 01:13:00 +00:00
|
|
|
|
2001-10-15 15:43:58 +00:00
|
|
|
INSTALL_TARGET= install-suid
|
2003-05-20 23:52:47 +00:00
|
|
|
PKGDEINSTALL= ${PKGINSTALL}
|
2003-12-04 22:00:20 +00:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2002-05-23 01:02:28 +00:00
|
|
|
FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
|
|
|
|
common/cfgreader.c po/et.po po/sl.po
|
2001-10-19 15:25:17 +00:00
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
# If smsd is enabled check if MySQL or PostgreSQL are installed and
|
|
|
|
# build the modules, no switches to make this port build those, if
|
|
|
|
# you want them, just install them before this port. The port will
|
|
|
|
# then activate a dependency.
|
|
|
|
.if !defined(WITH_SMSD)
|
|
|
|
PLIST_SUB+= SMSD='@comment '
|
|
|
|
PLIST_SUB+= PGM='@comment '
|
|
|
|
PLIST_SUB+= MSM='@comment '
|
|
|
|
USE_GNOME+= glib12
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SMSD=''
|
|
|
|
.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so)
|
|
|
|
USE_MYSQL= yes
|
|
|
|
PLIST_SUB+= MSM=''
|
|
|
|
WITH_MYSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MSM='@comment '
|
|
|
|
.endif
|
|
|
|
.if exists(${LOCALBASE}/lib/libpq.so)
|
|
|
|
LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
|
|
|
|
PLIST_SUB+= PGM=''
|
|
|
|
WITH_PGSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PGM='@comment '
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
CONFIGURE_ARGS+= --without-x
|
|
|
|
PLIST_SUB+= X11='@comment '
|
|
|
|
.else
|
|
|
|
USE_XPM= yes
|
|
|
|
USE_GNOME+= gtk12
|
|
|
|
PLIST_SUB+= X11=''
|
|
|
|
MAN1+= xgnokii.1
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "If you plan using the smsd daemon for automatically receiving,"
|
|
|
|
@${ECHO} "managing and sending SMSes define WITH_SMSD=yes."
|
|
|
|
@${ECHO} "smsd has support for normal file system operations, MySQL and"
|
|
|
|
@${ECHO} "PostgreSQL. If any of these 2 database systems are installed support"
|
|
|
|
@${ECHO} "will be automatically compiled in. Normal file systems support is"
|
|
|
|
@${ECHO} "always compiled in."
|
|
|
|
@${ECHO}
|
|
|
|
|
2001-10-19 15:25:17 +00:00
|
|
|
post-patch:
|
|
|
|
.for f in ${FIXPREFIX}
|
2003-05-20 23:52:47 +00:00
|
|
|
@${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \
|
|
|
|
${WRKSRC}/${f}
|
|
|
|
.endfor
|
|
|
|
@${REINPLACE_CMD} -e "s:%%PTHREAD_LIBS%%:${PTHREAD_LIBS}:; \
|
|
|
|
s:%%PTHREAD_CFLAGS%%:${PTHREAD_CFLAGS}:" ${WRKSRC}/configure
|
|
|
|
.for f in common/data/virtmodem.c utils/mgnokiidev.c
|
|
|
|
@${REINPLACE_CMD} -E -e "s:^(#ifdef.*)__OpenBSD__:\1__FreeBSD__:" \
|
|
|
|
${WRKSRC}/${f}
|
2001-10-19 15:25:17 +00:00
|
|
|
.endfor
|
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
post-build:
|
|
|
|
.if defined(WITH_SMSD)
|
|
|
|
@cd ${WRKSRC}/smsd && ${GMAKE} all
|
|
|
|
@cd ${WRKSRC}/smsd && ${GMAKE} libfile.so LOCALBASE=${LOCALBASE}
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
@cd ${WRKSRC}/smsd && ${GMAKE} libmysql.so LOCALBASE=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
|
|
|
@cd ${WRKSRC}/smsd && ${GMAKE} libpq.so LOCALBASE=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' pkg-message > ${PKGMESSAGE}
|
|
|
|
|
2001-05-03 01:13:00 +00:00
|
|
|
pre-install:
|
2003-05-20 23:52:47 +00:00
|
|
|
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
1999-04-02 00:45:54 +00:00
|
|
|
|
|
|
|
post-install:
|
2003-05-20 23:52:47 +00:00
|
|
|
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2003-12-04 22:00:20 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-05-03 01:13:00 +00:00
|
|
|
@(cd ${WRKSRC} && ${GMAKE} install-docs)
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
2001-10-15 15:43:58 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
|
2002-05-23 01:02:28 +00:00
|
|
|
${PREFIX}/etc/gnokiirc.sample
|
2003-12-04 22:00:20 +00:00
|
|
|
.if defined(WITH_SMSD)
|
|
|
|
${MKDIR} ${PREFIX}/share/smsd
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/smsd/smsd ${PREFIX}/sbin/smsd
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/smsd/action ${PREFIX}/share/smsd/action
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/README ${PREFIX}/share/smsd/README
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/smsd/libfile.so ${PREFIX}/share/smsd/libfile.so
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/smsd/libmysql.so ${PREFIX}/share/smsd/libmysql.so
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.mysql.sql ${PREFIX}/share/smsd/sms.tables.mysql.sql
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/smsd/libpq.so ${PREFIX}/share/smsd/libpq.so
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.pq.sql ${PREFIX}/share/smsd/sms.tables.pq.sql
|
|
|
|
.endif
|
|
|
|
.endif
|
2001-10-15 15:43:58 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
.include <bsd.port.post.mk>
|