瀏覽代碼

unixodbc: import from oldpackages, add myself as maintainer, add license

information, update to v2.3.2

Signed-off-by: Thomas Heil <heil@terminal-consulting.de>
Thomas Heil 10 年之前
父節點
當前提交
7f705d4b28
共有 2 個文件被更改,包括 139 次插入0 次删除
  1. 117
    0
      libs/unixodbc/Makefile
  2. 22
    0
      libs/unixodbc/files/unixodbc_conf.h

+ 117
- 0
libs/unixodbc/Makefile 查看文件

@@ -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))

+ 22
- 0
libs/unixodbc/files/unixodbc_conf.h 查看文件

@@ -0,0 +1,22 @@
1
+@ifndef HAVE_UNISTD_H 
2
+ @define HAVE_UNISTD_H
3
+@endif
4
+@ifndef HAVE_PWD_H 
5
+ @define HAVE_PWD_H
6
+@endif
7
+@ifndef HAVE_SYS_TYPES_H 
8
+ @define HAVE_SYS_TYPES_H
9
+@endif
10
+@ifndef HAVE_LONG_LONG 
11
+ @define HAVE_LONG_LONG
12
+@endif
13
+@ifndef ODBCINT64
14
+ @define ODBCINT64 long
15
+@endif
16
+@ifndef UODBCINT64
17
+ @define UODBCINT64 unsigned long
18
+@endif
19
+@ifndef SIZEOF_LONG_INT
20
+ @define SIZEOF_LONG_INT __SIZEOF_LONG__
21
+@endif
22
+