include $(TOPDIR)/rules.mk
PKG_NAME:=radlib
-PKG_VERSION:=2.8.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.12.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/radlib
-PKG_MD5SUM:=82ab0c702e55a860b69ad76e2aac748f
-
-ifeq ($(CONFIG_EXTERNAL_KERNEL_TREE),)
-PATCH_DIR:=
-else
-PATCH_DIR:=./patches
-endif
+PKG_SHA1SUM:=1b3feace6d0361436c9e4ce9b06856195a5ac1b1
PKG_FIXUP:=autoreconf
define Package/radlib
SECTION:=libs
CATEGORY:=Libraries
+ DEPENDS:=+libpthread
TITLE:=Rapid Application Development Library
URL:=http://www.radlib.teel.ws/
endef
radlib is a rapid application development library for unix multi-process applications
endef
+define Package/radlib-sqlite
+ $(call Package/radlib)
+ VARIANT:=sqlite
+ DEPENDS+=+libsqlite3
+ TITLE+= (sqlite)
+endef
+
+define Package/radlib-sqlite/description
+ $(call Package/radlib/description)
+ This package comes with sqlite support
+endef
+
CONFIGURE_ARGS += \
--prefix="$(TOOLCHAIN_DIR)/usr"
+ifeq ($(BUILD_VARIANT),sqlite)
+CONFIGURE_ARGS += \
+ --enable-sqlite
+endif
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/h/rad*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/librad.so* $(1)/usr/lib/
+endef
+
define Package/radlib/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/librad.so $(1)/usr/lib/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/librad.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/msgRouter/.libs/radmrouted $(1)/usr/bin/
endef
+define Package/radlib-sqlite/install
+ $(call Package/radlib/install,$(1))
+endef
$(eval $(call BuildPackage,radlib))
+$(eval $(call BuildPackage,radlib-sqlite))
--- /dev/null
+--- a/debug/Makefile.am
++++ b/debug/Makefile.am
+@@ -27,8 +27,8 @@ raddebug_LDADD += -lsqlite3
+ endif\r
+ \r
+ # define library directories\r
+-raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib\r
+-INCLUDES += -I$(prefix)/include -I/usr/include\r
++raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib\r
++INCLUDES += -I$(prefix)/include\r
+ \r
+ if MYSQL\r
+ raddebug_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql\r
+@@ -39,6 +39,6 @@ INCLUDES += -I$(prefix)/pgsql/in
+ endif\r
+ endif\r
+ \r
+-if CROSSCOMPILE\r
+-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
+-endif\r
++#if CROSSCOMPILE\r
++#raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
++#endif\r
+--- a/msgRouter/Makefile.am
++++ b/msgRouter/Makefile.am
+@@ -27,8 +27,8 @@ radmrouted_LDADD += -lsqlite3
+ endif\r
+ \r
+ # define library directories\r
+-radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib\r
+-INCLUDES += -I$(prefix)/include -I/usr/include\r
++radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib\r
++INCLUDES += -I$(prefix)/include\r
+ \r
+ if MYSQL\r
+ radmrouted_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql\r
+@@ -39,6 +39,6 @@ INCLUDES += -I$(prefix)/pgsql/
+ endif\r
+ endif\r
+ \r
+-if CROSSCOMPILE\r
+-radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
+-endif\r
++#if CROSSCOMPILE\r
++#radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
++#endif\r
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,9 +34,6 @@ PGSQL_HDRS = \
+ $(top_srcdir)/database/postgresql/_pg-types.h\r
+ endif\r
+ if SQLITE\r
+-SQ_INCLUDES = \\r
+- -I$(prefix)/include \\r
+- -I/usr/include\r
+ SQ_SOURCES = \\r
+ $(top_srcdir)/src/radsqlite.c\r
+ SQLITE_HDRS = \\r
+@@ -46,11 +43,9 @@ endif
+ # define include directories\r
+ INCLUDES = \\r
+ -I$(top_srcdir)/h \\r
+- -I$(prefix)/include \\r
+ -D_GNU_SOURCE \\r
+ $(MY_INCLUDES) \\r
+- $(PG_INCLUDES) \\r
+- $(SQ_INCLUDES)\r
++ $(PG_INCLUDES)\r
+ \r
+ \r
+ \r
+++ /dev/null
-diff -urN radlib-2.8.4/debug/Makefile.am radlib-2.8.42/debug/Makefile.am
---- radlib-2.8.4/debug/Makefile.am 2009-02-05 06:10:01.000000000 +0100
-+++ radlib-2.8.42/debug/Makefile.am 2009-10-04 16:40:08.000000000 +0200
-@@ -43,5 +43,5 @@
- endif\r
- \r
- if CROSSCOMPILE\r
--raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
-+#raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
- endif\r
-diff -urN radlib-2.8.4/debug/Makefile.in radlib-2.8.42/debug/Makefile.in
---- radlib-2.8.4/debug/Makefile.in 2009-08-15 16:03:37.000000000 +0200
-+++ radlib-2.8.42/debug/Makefile.in 2009-10-04 16:40:17.000000000 +0200
-@@ -43,7 +43,7 @@
- @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
- @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
- @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
--@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
-+#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
- subdir = debug
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-diff -urN radlib-2.8.4/msgRouter/Makefile.am radlib-2.8.42/msgRouter/Makefile.am
---- radlib-2.8.4/msgRouter/Makefile.am 2009-02-05 06:10:01.000000000 +0100
-+++ radlib-2.8.42/msgRouter/Makefile.am 2009-10-04 16:31:24.000000000 +0200
-@@ -44,5 +44,5 @@
- endif\r
- \r
- if CROSSCOMPILE\r
--radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
-+#radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o\r
- endif\r
-diff -urN radlib-2.8.4/msgRouter/Makefile.in radlib-2.8.42/msgRouter/Makefile.in
---- radlib-2.8.4/msgRouter/Makefile.in 2009-08-15 16:03:37.000000000 +0200
-+++ radlib-2.8.42/msgRouter/Makefile.in 2009-10-04 16:36:01.000000000 +0200
-@@ -43,7 +43,7 @@
- @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
- @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
- @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
--@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
-+#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
- subdir = msgRouter
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4