aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authortmclaugh <tmclaugh@FreeBSD.org>2007-06-25 13:13:25 +0800
committertmclaugh <tmclaugh@FreeBSD.org>2007-06-25 13:13:25 +0800
commitd4a5a62baa7af1fec3323057ad7f2d160224d5bb (patch)
tree433c54100bee2638caab7b0923816f8e807065cc /databases
parent7f8e275ee124d80349892e2486e9274a4df170ec (diff)
downloadfreebsd-ports-gnome-d4a5a62baa7af1fec3323057ad7f2d160224d5bb.tar.gz
freebsd-ports-gnome-d4a5a62baa7af1fec3323057ad7f2d160224d5bb.tar.zst
freebsd-ports-gnome-d4a5a62baa7af1fec3323057ad7f2d160224d5bb.zip
Don't clobber config files on update.
PR: 111923 Submitted by: emaste
Diffstat (limited to 'databases')
-rw-r--r--databases/unixODBC/Makefile7
-rw-r--r--databases/unixODBC/files/patch-Makefile.in13
-rw-r--r--databases/unixODBC/pkg-plist8
3 files changed, 25 insertions, 3 deletions
diff --git a/databases/unixODBC/Makefile b/databases/unixODBC/Makefile
index 586bf93f01eb..468420c9851e 100644
--- a/databases/unixODBC/Makefile
+++ b/databases/unixODBC/Makefile
@@ -7,7 +7,7 @@
PORTNAME= unixODBC
PORTVERSION= 2.2.12
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= http://www.unixodbc.org/
@@ -56,5 +56,10 @@ post-install:
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
.endif
.endif
+.for conffile in odbc.ini odbcinst.ini
+ @if [ ! -f ${PREFIX}/etc/${conffile} ]; then \
+ ${CP} -p ${PREFIX}/etc/${conffile}.sample ${PREFIX}/etc/${conffile} ; \
+ fi
+.endfor
.include <bsd.port.mk>
diff --git a/databases/unixODBC/files/patch-Makefile.in b/databases/unixODBC/files/patch-Makefile.in
new file mode 100644
index 000000000000..9729588e857b
--- /dev/null
+++ b/databases/unixODBC/files/patch-Makefile.in
@@ -0,0 +1,13 @@
+--- Makefile.in.orig Sun Jun 24 15:44:33 2007
++++ Makefile.in Sun Jun 24 15:45:04 2007
+@@ -876,8 +876,8 @@
+
+
+ install-data-am:
+- -touch $(DESTDIR)${sysconfdir}/odbcinst.ini
+- -touch $(DESTDIR)${sysconfdir}/odbc.ini
++ -touch $(DESTDIR)${sysconfdir}/odbcinst.ini.sample
++ -touch $(DESTDIR)${sysconfdir}/odbc.ini.sample
+ -mkdir -p $(DESTDIR)${sysconfdir}/ODBCDataSources
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/databases/unixODBC/pkg-plist b/databases/unixODBC/pkg-plist
index 859c8ddcf0ac..fede01a9e81c 100644
--- a/databases/unixODBC/pkg-plist
+++ b/databases/unixODBC/pkg-plist
@@ -7,8 +7,12 @@ bin/iusql
bin/odbc_config
bin/odbcinst
%%GUI:%%bin/odbctest
-etc/odbc.ini
-etc/odbcinst.ini
+@unexec if cmp -s %D/etc/odbc.ini %D/etc/odbc.ini.sample; then rm -f %D/etc/odbc.ini; fi
+etc/odbc.ini.sample
+@exec [ -f %D/etc/odbc.ini ] || cp %D/etc/odbc.ini.sample %D/etc/odbc.ini
+@unexec if cmp -s %D/etc/odbcinst.ini %D/etc/odbcinst.ini.sample; then rm -f %D/etc/odbcinst.ini; fi
+etc/odbcinst.ini.sample
+@exec [ -f %D/etc/odbcinst.ini ] || cp %D/etc/odbcinst.ini.sample %D/etc/odbcinst.ini
include/autotest.h
include/odbcinst.h
include/odbcinstext.h