From 1f4dc27f41a0efe031d0dde9366042ab67a0ea58 Mon Sep 17 00:00:00 2001 From: Alejandro Pulver Date: Sun, 30 Sep 2007 21:09:42 +0000 Subject: - Install MySQL sample configuration files in EXAMPLESDIR. - Add pkg-message to let the user know about the example configuration files and how to use them. - Bump PORTREVISION. - Restrict CONFLICTS as portlint(1) suggests. - Clean up. PR: ports/113538 Submitted by: "User1001" Reworked by: alepulver (myself) --- databases/unixODBC/Makefile | 21 ++++++++++++++------- databases/unixODBC/files/pkg-message.in | 9 +++++++++ databases/unixODBC/pkg-plist | 4 ++++ 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 databases/unixODBC/files/pkg-message.in (limited to 'databases/unixODBC') diff --git a/databases/unixODBC/Makefile b/databases/unixODBC/Makefile index 401709b04dfb..1975f79b79df 100644 --- a/databases/unixODBC/Makefile +++ b/databases/unixODBC/Makefile @@ -7,14 +7,14 @@ PORTNAME= unixODBC PORTVERSION= 2.2.12 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= http://www.unixodbc.org/ MAINTAINER= ports@FreeBSD.org COMMENT= ODBC library suite for Unix -CONFLICTS= libiodbc-* +CONFLICTS= libiodbc-[0-9]* USE_GNOME= gnomehack gnometarget USE_ICONV= yes @@ -23,6 +23,8 @@ CONFIGURE_ARGS= --enable-static --enable-shared \ --with-libiconv-prefix=${LOCALBASE} USE_LDCONFIG= yes +SUB_FILES= pkg-message + .if defined(WITH_GUI) USE_QT_VER= 3 QT_NONSTANDARD= yes @@ -31,21 +33,22 @@ CONFIGURE_ENV= MOC="${MOC}" \ QTLIB="${QT_PREFIX}/lib" \ USER_INCLUDES="${QTCPPFLAGS}" \ USER_LDFLAGS="${QTCFGLIBS}" -CONFIGURE_ARGS+= --enable-gui +CONFIGURE_ARGS+=--enable-gui PLIST_SUB= GUI:="" .else -CONFIGURE_ARGS+= --disable-gui +CONFIGURE_ARGS+=--disable-gui PLIST_SUB= GUI:="@comment " .endif .if !defined(WITHOUT_THREADS) || defined(WITH_GUI) -CONFIGURE_ARGS+= --enable-threads=yes +CONFIGURE_ARGS+=--enable-threads=yes .else -CONFIGURE_ARGS+= --enable-threads=no +CONFIGURE_ARGS+=--enable-threads=no .endif post-patch: - @${REINPLACE_CMD} -e 's,@MSQL_TRUE@lib_LTLIBRARIES,#@MSQL_TRUE@lib_LTLIBRARIES,' ${WRKSRC}/Drivers/MiniSQL/Makefile.in + @${REINPLACE_CMD} -e 's,@MSQL_TRUE@lib_LTLIBRARIES,#&,' \ + ${WRKSRC}/Drivers/MiniSQL/Makefile.in post-install: .if !defined(NOPORTDOCS) @@ -63,5 +66,9 @@ post-install: ${CP} -p ${PREFIX}/etc/${conffile}.sample ${PREFIX}/etc/${conffile} ; \ fi .endfor + @${MKDIR} ${EXAMPLESDIR}/MySQL + cd ${WRKSRC}/Drivers/MySQL && ${INSTALL_DATA} iodbc.ini odbc.ini \ + ${EXAMPLESDIR}/MySQL + @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD} .include diff --git a/databases/unixODBC/files/pkg-message.in b/databases/unixODBC/files/pkg-message.in new file mode 100644 index 000000000000..50adf58715cd --- /dev/null +++ b/databases/unixODBC/files/pkg-message.in @@ -0,0 +1,9 @@ +============================================================================== + +If installing for MySQL, then copy the example configuration file to your home +directory as ".odbc.ini", and modify to define specific MySQL database(s). The +file is located at "%%EXAMPLESDIR%%/MySQL/iodbc.ini". + +This is required to use MySQL databases from OpenOffice.org, for example. + +============================================================================== diff --git a/databases/unixODBC/pkg-plist b/databases/unixODBC/pkg-plist index fede01a9e81c..e0524a2a433c 100644 --- a/databases/unixODBC/pkg-plist +++ b/databases/unixODBC/pkg-plist @@ -115,6 +115,8 @@ lib/libtemplate.a lib/libtemplate.la lib/libtemplate.so lib/libtemplate.so.1 +%%EXAMPLESDIR%%/MySQL/iodbc.ini +%%EXAMPLESDIR%%/MySQL/odbc.ini %%PORTDOCS%%%%DOCSDIR%%/AdministratorManual/index.html %%PORTDOCS%%%%DOCSDIR%%/AdministratorManual/odbcinst.html %%PORTDOCS%%%%DOCSDIR%%/AdministratorManual/php3.html @@ -171,5 +173,7 @@ lib/libtemplate.so.1 %%PORTDOCS%%@dirrm %%DOCSDIR%%/ProgrammerManual %%PORTDOCS%%@dirrm %%DOCSDIR%%/AdministratorManual %%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%EXAMPLESDIR%%/MySQL +@dirrm %%EXAMPLESDIR%% @exec mkdir -p %D/etc/ODBCDataSources 2>/dev/null || true @dirrmtry etc/ODBCDataSources -- cgit v1.2.3