|
@@ -0,0 +1,117 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2012 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=unixodbc
|
|
11
|
+PKG_VERSION:=2.3.2
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/
|
|
15
|
+PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
|
|
16
|
+PKG_MD5SUM:=5e4528851eda5d3d4aed249b669bd05b
|
|
17
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
|
|
18
|
+PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
|
|
19
|
+PKG_LICENSE:=prog GPL libs LGPL
|
|
20
|
+
|
|
21
|
+include $(INCLUDE_DIR)/package.mk
|
|
22
|
+CONFIGURE_ARGS += \
|
|
23
|
+ --disable-gui \
|
|
24
|
+ --with-pic \
|
|
25
|
+ --enable-drivers
|
|
26
|
+
|
|
27
|
+define Package/unixodbc/Default
|
|
28
|
+ SUBMENU:=database
|
|
29
|
+ TITLE:=unixODBC
|
|
30
|
+ URL:=http://www.unixodbc.org/
|
|
31
|
+endef
|
|
32
|
+
|
|
33
|
+define Package/unixodbc
|
|
34
|
+ $(call Package/unixodbc/Default)
|
|
35
|
+ TITLE+= (libraries)
|
|
36
|
+ SECTION:=libs
|
|
37
|
+ CATEGORY:=Libraries
|
|
38
|
+ DEPENDS:=+libltdl +libpthread
|
|
39
|
+endef
|
|
40
|
+
|
|
41
|
+define Package/unixodbc/description
|
|
42
|
+ unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux,
|
|
43
|
+ Mac OSX, and UNIX.
|
|
44
|
+endef
|
|
45
|
+
|
|
46
|
+define Package/unixodbc-tools
|
|
47
|
+ $(call Package/unixodbc/Default)
|
|
48
|
+ SECTION:=utils
|
|
49
|
+ CATEGORY:=Utilities
|
|
50
|
+ TITLE+= Tools
|
|
51
|
+ DEPENDS:=+unixodbc +libncurses +libreadline
|
|
52
|
+endef
|
|
53
|
+
|
|
54
|
+define Package/unixodbc-tools/description
|
|
55
|
+ Command Line Tools to help install a driver and work with SQL.
|
|
56
|
+endef
|
|
57
|
+
|
|
58
|
+define Package/pgsqlodbc
|
|
59
|
+ $(call Package/unixodbc/Default)
|
|
60
|
+ SECTION:=libs
|
|
61
|
+ CATEGORY:=Libraries
|
|
62
|
+ TITLE:=Postgresql driver for ODBC
|
|
63
|
+ DEPENDS:=+unixodbc +libpq
|
|
64
|
+endef
|
|
65
|
+
|
|
66
|
+define Package/pgsqlodbc/description
|
|
67
|
+ Postgresql driver for ODBC.
|
|
68
|
+endef
|
|
69
|
+
|
|
70
|
+define Build/Compile
|
|
71
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
72
|
+ DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
73
|
+ $(MAKE_FLAGS) \
|
|
74
|
+ ARCH="$(ARCH)" \
|
|
75
|
+ CC="$(TARGET_CC)"
|
|
76
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
77
|
+ DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
78
|
+ $(MAKE_FLAGS) \
|
|
79
|
+ ARCH="$(ARCH)" \
|
|
80
|
+ install -i
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+define Build/InstallDev
|
|
84
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
85
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
86
|
+ $(INSTALL_DIR) $(1)/usr/include
|
|
87
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
|
88
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
89
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
|
|
90
|
+ $(INSTALL_DIR) $(1)/etc
|
|
91
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/odbc* $(1)/etc/
|
|
92
|
+ $(INSTALL_DIR) $(1)/etc/ODBCDataSources
|
|
93
|
+ $(TARGET_CC) $(TARGET_CFLAGS) -E ./files/unixodbc_conf.h | tr '@' '\#' >$(1)/usr/include/unixodbc_conf.h
|
|
94
|
+endef
|
|
95
|
+
|
|
96
|
+define Package/unixodbc/install
|
|
97
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
98
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc[ci]*so* $(1)/usr/lib/
|
|
99
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc.*so* $(1)/usr/lib/
|
|
100
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnn*so* $(1)/usr/lib/
|
|
101
|
+ $(INSTALL_DIR) $(1)/etc
|
|
102
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/odbc* $(1)/etc/
|
|
103
|
+endef
|
|
104
|
+
|
|
105
|
+define Package/unixodbc-tools/install
|
|
106
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
107
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
108
|
+endef
|
|
109
|
+
|
|
110
|
+define Package/pgsqlodbc/install
|
|
111
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
112
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcpsql*so* $(1)/usr/lib/
|
|
113
|
+endef
|
|
114
|
+
|
|
115
|
+$(eval $(call BuildPackage,unixodbc))
|
|
116
|
+$(eval $(call BuildPackage,unixodbc-tools))
|
|
117
|
+$(eval $(call BuildPackage,pgsqlodbc))
|