Selaa lähdekoodia

libdbi-drivers: import from old packages feed

 - rename packages from libdbi-drivers-* to libdbd-*
 - cleanup title & description
 - remove SQLite v2 driver
 - use PKG_INSTALL
 - add a BuildPlugin macro to package drivers
 - add license info
 - add myself as maintainer

Signed-off-by: Nicolas Thill <nico@openwrt.org>
Nicolas Thill 10 vuotta sitten
vanhempi
commit
671fc5a589
2 muutettua tiedostoa jossa 116 lisäystä ja 0 poistoa
  1. 105
    0
      libs/libdbi-drivers/Makefile
  2. 11
    0
      libs/libdbi-drivers/patches/001_libsqlite3_fix.patch

+ 105
- 0
libs/libdbi-drivers/Makefile Näytä tiedosto

@@ -0,0 +1,105 @@
1
+#
2
+# Copyright (C) 2009-2014 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:=libdbi-drivers
11
+PKG_VERSION:=0.9.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=@SF/libdbi-drivers
16
+PKG_MD5SUM:=9f47b960e225eede2cdeaabf7d22f59f
17
+
18
+PKG_LICENSE:=LGPL-2.1
19
+PKG_LICENSE_FILE:=COPYING
20
+PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_INSTALL:=1
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/libdbi-drivers/default
28
+  SECTION:=libs
29
+  CATEGORY:=Libraries
30
+  URL:=http://libdbi-drivers.sourceforge.net/
31
+endef
32
+
33
+define Package/libdbi-drivers
34
+$(call Package/libdbi-drivers/default)
35
+  DEPENDS:=libdbi +libdbd-mysql +libdbd-pgsql +libdbd-sqlite3
36
+  TITLE:=Database drivers for libdbi
37
+endef
38
+
39
+define Package/libdbd-mysql
40
+$(call Package/libdbi-drivers/default)
41
+  DEPENDS:=libdbi +libmysqlclient
42
+  TITLE:=MySQL database server driver for libdbi
43
+endef
44
+
45
+define Package/libdbd-pgsql
46
+$(call Package/libdbi-drivers/default)
47
+  DEPENDS:=libdbi +libpq
48
+  TITLE:=PostgreSQL database server driver for libdbi
49
+endef
50
+
51
+define Package/libdbd-sqlite3
52
+$(call Package/libdbi-drivers/default)
53
+  DEPENDS:=libdbi +libsqlite3
54
+  TITLE:=SQLite3 database driver for libdbi
55
+endef
56
+
57
+CONFIGURE_ARGS += \
58
+	--enable-shared \
59
+	--disable-static \
60
+	--disable-rpath \
61
+	--disable-docs \
62
+	--with-dbi-incdir=$(STAGING_DIR)/usr/include \
63
+	--with-dbi-libdir=$(STAGING_DIR)/usr/lib
64
+
65
+ifneq ($(CONFIG_PACKAGE_libdbd-mysql),)
66
+	CONFIGURE_ARGS += \
67
+		--with-mysql \
68
+		--with-mysql-incdir=$(STAGING_DIR)/usr/include/mysql \
69
+		--with-mysql-libdir=$(STAGING_DIR)/usr/lib/mysql
70
+	TARGET_LDFLAGS += \
71
+		-L$(STAGING_DIR)/usr/lib/mysql/
72
+else
73
+	CONFIGURE_ARGS += --without-mysql
74
+endif
75
+
76
+ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-pgsql),)
77
+	CONFIGURE_ARGS += \
78
+		--with-pgsql \
79
+		--with-pgsql-incdir=$(STAGING_DIR)/usr/include \
80
+		--with-pgsql-libdir=$(STAGING_DIR)/usr/lib
81
+else
82
+	CONFIGURE_ARGS += --without-pgsql
83
+endif
84
+
85
+ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-sqlite3),)
86
+	CONFIGURE_ARGS += \
87
+		--with-sqlite3 \
88
+		--with-sqlite3-incdir=$(STAGING_DIR)/usr/include \
89
+		--with-sqlite3-libdir=$(STAGING_DIR)/usr/lib
90
+else
91
+	CONFIGURE_ARGS += --without-sqlite3
92
+endif
93
+
94
+define BuildPlugin
95
+  define Package/libdbd-$(1)/install
96
+	$(INSTALL_DIR) $$(1)/usr/lib/dbd
97
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/dbd/libdbd$(1).so $$(1)/usr/lib/dbd/
98
+  endef
99
+  $$(eval $$(call BuildPackage,libdbd-$(1)))
100
+endef
101
+
102
+#$(eval $(call BuildPackage,libdbi-drivers))
103
+$(eval $(call BuildPlugin,mysql))
104
+$(eval $(call BuildPlugin,pgsql))
105
+$(eval $(call BuildPlugin,sqlite3))

+ 11
- 0
libs/libdbi-drivers/patches/001_libsqlite3_fix.patch Näytä tiedosto

@@ -0,0 +1,11 @@
1
+--- a/acinclude.m4
2
++++ b/acinclude.m4
3
+@@ -310,7 +310,7 @@ if test "$ac_sqlite3" = "yes"; then
4
+ 		AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS)
5
+ 		SQLITE3_LDFLAGS=""
6
+ 	else
7
+-		SQLITE3_LIBS=-lsqlite
8
++		SQLITE3_LIBS=-lsqlite3
9
+ 		SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir
10
+ 	fi
11
+