unixodbc: Copy pgsqlodbc.ini instead of creating it dynamically
authorJeffery To <jeffery.to@gmail.com>
Fri, 27 Oct 2023 13:09:53 +0000 (21:09 +0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 30 Oct 2023 20:25:58 +0000 (13:25 -0700)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
libs/unixodbc/Makefile
libs/unixodbc/files/pgsqlodbc.ini [new file with mode: 0644]

index 4dc5b553b65d59e40b40f621ca68f0c82dfa854e..52ff9959b382ee0e218890bc47d315e1e3faa7cc 100644 (file)
@@ -115,9 +115,7 @@ define Package/pgsqlodbc/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcpsql*so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/etc/odbcinst.ini.d/
-       echo "[PostgreSQL]" > $(1)/etc/odbcinst.ini.d/pgsqlodbc.ini
-       echo "Description = unixODBC PostgreSQL driver" >> $(1)/etc/odbcinst.ini.d/pgsqlodbc.ini
-       echo "Driver = /usr/lib/libodbcpsql.so" >> $(1)/etc/odbcinst.ini.d/pgsqlodbc.ini
+       $(INSTALL_DATA) ./files/pgsqlodbc.ini $(1)/etc/odbcinst.ini.d/
 endef
 
 define Host/Configure
diff --git a/libs/unixodbc/files/pgsqlodbc.ini b/libs/unixodbc/files/pgsqlodbc.ini
new file mode 100644 (file)
index 0000000..54a64bc
--- /dev/null
@@ -0,0 +1,3 @@
+[PostgreSQL]
+Description = unixODBC PostgreSQL driver
+Driver = /usr/lib/libodbcpsql.so