summaryrefslogtreecommitdiff
path: root/databases/unixodbc
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
committerjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
commitb23d2e86260aaa8ed2013bf77ad605b63e34b0ed (patch)
treed5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /databases/unixodbc
parentc850f81b615ba9e58563fe40c1075ad3aea9ffa4 (diff)
downloadpkgsrc-b23d2e86260aaa8ed2013bf77ad605b63e34b0ed.tar.gz
Adapt to use shared INSTALL/DEINSTALL scripts by using the logic in
bsd.pkg.install.mk: * Remove old DEINSTALL/INSTALL scripts. * Move some text printed at POST-INSTALL time into the MESSAGE file. * Adjust rc.d scripts to respect rc.conf settings, so that the script may be directly copied into /etc/rc.d.
Diffstat (limited to 'databases/unixodbc')
-rw-r--r--databases/unixodbc/DEINSTALL100
-rw-r--r--databases/unixodbc/INSTALL62
-rw-r--r--databases/unixodbc/Makefile32
-rw-r--r--databases/unixodbc/Makefile.common4
4 files changed, 10 insertions, 188 deletions
diff --git a/databases/unixodbc/DEINSTALL b/databases/unixodbc/DEINSTALL
deleted file mode 100644
index f12ac349993..00000000000
--- a/databases/unixodbc/DEINSTALL
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1.1.1 2001/11/06 04:08:33 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-ECHO="@ECHO@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TR="@TR@"
-TRUE="@TRUE@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-CONFDIR=/etc
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/odbcinst.ini ${CONFDIR}/odbcinst.ini : \
- /dev/null ${CONFDIR}/odbc.ini \
- "
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for FILE in ${CONFFILES}
- do
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${CONFDIR}/ODBCDataSources 2>/dev/null || ${TRUE}
-
- existing_dirs=''
- for dir in ${CONFDIR}/ODBCDataSources
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- ${ECHO} " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- ${ECHO} " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/databases/unixodbc/INSTALL b/databases/unixodbc/INSTALL
deleted file mode 100644
index e2ede9bceca..00000000000
--- a/databases/unixodbc/INSTALL
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.1.1.1 2001/11/06 04:08:33 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-ECHO="@ECHO@"
-MKDIR="@MKDIR@"
-TR="@TR@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-CONFDIR=/etc
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/odbcinst.ini ${CONFDIR}/odbcinst.ini : \
- /dev/null ${CONFDIR}/odbc.ini \
- "
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- ${MKDIR} ${CONFDIR}/ODBCDataSources
-
- ${ECHO} "Installing configuration files:"
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if [ -f ${FILE} ]
- then
- ${ECHO} " ${FILE} already exists"
- else
- ${ECHO} " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-You may wish to customize the following files:
-
-EOF
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- ${ECHO} " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/databases/unixodbc/Makefile b/databases/unixodbc/Makefile
index 359db49ab39..4bde02d67a2 100644
--- a/databases/unixodbc/Makefile
+++ b/databases/unixodbc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2001/11/06 04:08:33 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2001/11/19 16:23:09 jlam Exp $
PKGNAME= unixodbc-${ODBC_VERS}
ODBC_PKG_VERS= # empty
@@ -11,37 +11,20 @@ USE_BUILDLINK_ONLY= YES
CONFIGURE_ARGS+= --disable-gui
-EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-PLIST_SUBST+= PKGBASE=${PKGBASE}
PLIST_SUBST+= UNIXODBC_DRIVERS_DIR=${UNIXODBC_DRIVERS_DIR}
-
-FILES_SUBST+= PKGBASE=${PKGBASE}
FILES_SUBST+= UNIXODBC_DRIVERS_DIR=${UNIXODBC_DRIVERS_DIR}
-FILES_SUBST+= PREFIX=${PREFIX}
-FILES_SUBST+= PKGBASE=${PKGBASE}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= ECHO=${ECHO:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TR=${TR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+
+CONF_FILES= ${EGDIR}/odbcinst.ini ${CONFDIR}/odbcinst.ini
+CONF_FILES+= /dev/null ${CONFDIR}/odbc.ini
+OWN_DIRS= ${CONFDIR}/ODBCDataSources
post-patch: fix-driver-installation
pre-install:
${SED} ${FILES_SUBST_SED} ${FILESDIR}/odbcinst.ini.in \
> ${WRKDIR}/odbcinst.ini
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
@@ -50,4 +33,5 @@ post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../devel/readline/buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/unixodbc/Makefile.common b/databases/unixodbc/Makefile.common
index 2e17e6ace0d..81d2737940c 100644
--- a/databases/unixodbc/Makefile.common
+++ b/databases/unixodbc/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2001/11/07 06:12:19 jlam Exp $
+# $NetBSD: Makefile.common,v 1.3 2001/11/19 16:23:09 jlam Exp $
DISTNAME= unixODBC-${ODBC_DIST_VERS}
CATEGORIES= databases
@@ -23,7 +23,7 @@ USE_LIBTOOL= YES
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --sysconfdir=/etc
+CONFIGURE_ARGS+= --sysconfdir=${CONFDIR}
CONFIGURE_ARGS+= --enable-threads
CONFIGURE_ARGS+= --enable-gnuthreads
CONFIGURE_ARGS+= --with-pth=${BUILDLINK_DIR}