aboutsummaryrefslogtreecommitdiffstats
path: root/comms/gnokii/Makefile
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2003-12-05 06:00:20 +0800
committerpav <pav@FreeBSD.org>2003-12-05 06:00:20 +0800
commit793de59abd78a8ac50ee7310eb1281687b154873 (patch)
tree2c2429d63deebd0fa40447a4040976862f2a0468 /comms/gnokii/Makefile
parent4e82680de65e37f0a773afa7f27319c61e7c21a3 (diff)
downloadfreebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.tar.gz
freebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.tar.zst
freebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.zip
- Update to 0.5.6
- Add WITH_SMSD knob to enable build of SMS messaging daemon with optional MySQL or Postgresql backend PR: ports/54498 Submitted by: Guido Falsi <mad@madpilot.net> Approved by: adamw (mentor)
Diffstat (limited to 'comms/gnokii/Makefile')
-rw-r--r--comms/gnokii/Makefile107
1 files changed, 86 insertions, 21 deletions
diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile
index 902b2f55c960..da0073237b46 100644
--- a/comms/gnokii/Makefile
+++ b/comms/gnokii/Makefile
@@ -6,13 +6,12 @@
#
PORTNAME= gnokii
-PORTVERSION= 0.5.0
-PORTREVISION= 1
+PORTVERSION= 0.5.6
PORTEPOCH= 1
CATEGORIES= comms
-MASTER_SITES= ftp://ftp.nuug.no/pub/anders/distfiles/ \
- http://freesoftware.fsf.org/download/gnokii/ \
+MASTER_SITES= ${MASTER_SITE_SAVANNAH} \
ftp://ftp.gnokii.org/pub/gnokii/
+MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= Tools to talk to Nokia cellular phones
@@ -21,39 +20,75 @@ LIB_DEPENDS= intl.5:${PORTSDIR}/devel/gettext
USE_REINPLACE= yes
USE_GMAKE= yes
-.if !defined(WITHOUT_X11)
-USE_XPM= yes
-USE_GNOME= gtk12
-.endif
+USE_BZIP2= yes
INSTALLS_SHLIB= yes
-
GNU_CONFIGURE= yes
-
CONFIGURE_ARGS+= --with-libintl-prefix=${LOCALBASE} --enable-security \
--with-xgnokiidir=${PREFIX}/share
-.if defined(WITHOUT_X11)
-CONFIGURE_ARGS+= --without-x
-PLIST_SUB+= X11='@comment '
-.else
-PLIST_SUB+= X11=''
-.endif
CONFIGURE_ENV+= MSGFMT="${LOCALBASE}/bin/msgfmt" \
XGETTEXT="${LOCALBASE}/bin/xgettext" \
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib"
-MAN1= gnokii.1 todologo.1
-.if !defined(WITHOUT_X11)
-MAN1+= xgnokii.1
-.endif
+MAN1= gnokii.1 todologo.1 ppm2nokia.1 sendsms.1
MAN8= gnokiid.8 mgnokiidev.8
INSTALL_TARGET= install-suid
PKGDEINSTALL= ${PKGINSTALL}
+PKGMESSAGE= ${WRKDIR}/pkg-message
FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
common/cfgreader.c po/et.po po/sl.po
+.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}
+
post-patch:
.for f in ${FIXPREFIX}
@${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \
@@ -66,14 +101,44 @@ post-patch:
${WRKSRC}/${f}
.endfor
+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}
+
pre-install:
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(NOPORTDOCS)
@(cd ${WRKSRC} && ${GMAKE} install-docs)
+.endif
${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
${PREFIX}/etc/gnokiirc.sample
+.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
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>