2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=ftp
://ftp.unixodbc.org
/pub
/unixODBC
/
15 PKG_SOURCE
:=unixODBC-
$(PKG_VERSION
).
tar.gz
16 PKG_MD5SUM
:=86788d4006620fa1f171c13d07fdcaab
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/unixODBC-
$(PKG_VERSION
)
19 include $(INCLUDE_DIR
)/package.mk
25 define Package
/unixodbc
/Default
28 URL
:=http
://www.unixodbc.org
/
31 define Package
/unixodbc
32 $(call Package
/unixodbc
/Default
)
36 DEPENDS
:=+libltdl
+libpthread
39 define Package
/unixodbc
/description
40 unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux
,
44 define Package
/unixodbc-tools
45 $(call Package
/unixodbc
/Default
)
49 DEPENDS
:=+unixodbc
+libncurses
+libreadline
52 define Package
/unixodbc-tools
/description
53 Command Line Tools to help
install a driver and work with SQL.
56 define Package
/pgsqlodbc
57 $(call Package
/unixodbc
/Default
)
60 TITLE
:=Postgresql driver for ODBC
61 DEPENDS
:=+unixodbc
+libpq
64 define Package
/pgsqlodbc
/description
65 Postgresql driver for ODBC.
69 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
70 DESTDIR
="$(PKG_INSTALL_DIR)" \
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 DESTDIR
="$(PKG_INSTALL_DIR)" \
81 define Build
/InstallDev
82 $(INSTALL_DIR
) $(1)/usr
/bin
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
84 $(INSTALL_DIR
) $(1)/usr
/include
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
86 $(INSTALL_DIR
) $(1)/usr
/lib
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
88 $(INSTALL_DIR
) $(1)/etc
89 $(CP
) $(PKG_INSTALL_DIR
)/etc
/odbc
* $(1)/etc
/
90 $(INSTALL_DIR
) $(1)/etc
/ODBCDataSources
91 $(TARGET_CC
) $(TARGET_CFLAGS
) -E .
/files
/unixodbc_conf.h | tr
'@' '\#' >$(1)/usr
/include/unixodbc_conf.h
94 define Package
/unixodbc
/install
95 $(INSTALL_DIR
) $(1)/usr
/lib
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libodbc
[ci
]*so
* $(1)/usr
/lib
/
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libodbc.
*so
* $(1)/usr
/lib
/
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnn
*so
* $(1)/usr
/lib
/
99 $(INSTALL_DIR
) $(1)/etc
100 $(CP
) $(PKG_INSTALL_DIR
)/etc
/odbc
* $(1)/etc
/
103 define Package
/unixodbc-tools
/install
104 $(INSTALL_DIR
) $(1)/usr
/bin
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
108 define Package
/pgsqlodbc
/install
109 $(INSTALL_DIR
) $(1)/usr
/lib
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libodbcpsql
*so
* $(1)/usr
/lib
/
113 $(eval
$(call BuildPackage
,unixodbc
))
114 $(eval
$(call BuildPackage
,unixodbc-tools
))
115 $(eval
$(call BuildPackage
,pgsqlodbc
))