I forgot to mention that this package is compilable also on backfire, but unixodbc needs as a dependency +@CONFIG_GCC_VERSION_4_4_3. -- Jiri Slachta Dne 8.2.2012 11:41, Jiri Slachta napsal(a): > Signed-off-by: Jiri Slachta <j...@slachta.eu> > Index: feeds/packages/libs/unixodbc/files/unixodbc_conf.h > =================================================================== > --- feeds/packages/libs/unixodbc/files/unixodbc_conf.h (revision 0) > +++ feeds/packages/libs/unixodbc/files/unixodbc_conf.h (revision 0) > @@ -0,0 +1,22 @@ > +@ifndef HAVE_UNISTD_H > + @define HAVE_UNISTD_H > +@endif > +@ifndef HAVE_PWD_H > + @define HAVE_PWD_H > +@endif > +@ifndef HAVE_SYS_TYPES_H > + @define HAVE_SYS_TYPES_H > +@endif > +@ifndef HAVE_LONG_LONG > + @define HAVE_LONG_LONG > +@endif > +@ifndef ODBCINT64 > + @define ODBCINT64 long > +@endif > +@ifndef UODBCINT64 > + @define UODBCINT64 unsigned long > +@endif > +@ifndef SIZEOF_LONG_INT > + @define SIZEOF_LONG_INT __SIZEOF_LONG__ > +@endif > + > \ No newline at end of file > Index: feeds/packages/libs/unixodbc/Makefile > =================================================================== > --- feeds/packages/libs/unixodbc/Makefile (revision 0) > +++ feeds/packages/libs/unixodbc/Makefile (revision 0) > @@ -0,0 +1,109 @@ > +# > +# Copyright (C) 2012 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=unixodbc > +PKG_VERSION:=2.3.1 > +PKG_RELEASE:=1 > + > +PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/ > +PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz > +PKG_MD5SUM:=86788d4006620fa1f171c13d07fdcaab > +PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION) > + > +include $(INCLUDE_DIR)/package.mk > +CONFIGURE_VARS += CC="$(TARGET_CC)" CFLAGS="-fPIC $(TARGET_CFLAGS) > -I$(STAGING_DIR)/usr/include/ -I$(STAGING_DIR)/usr/lib/libiconv-stub/include/ > -L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" > CXXFLAGS="-fPIC $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/ > -I$(STAGING_DIR)/usr/lib/libiconv-stub/include/ -L$(STAGING_DIR)/usr/lib > -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" > +CONFIGURE_ARGS += --disable-gui --with-pic --enable-drivers > + > +define Package/unixodbc > + SUBMENU:=database > + SECTION:=libs > + CATEGORY:=Libraries > + TITLE:=unixODBC > + URL:=http://www.unixodbc.org/ > + DEPENDS:= > +endef > + > +define Package/unixodbc-tools > + SUBMENU:=database > + SECTION:=utils > + CATEGORY:=Utilities > + TITLE:=unixODBC Tools > + URL:=http://www.unixodbc.org/ > + DEPENDS:=+unixodbc > +endef > + > +define Package/pgsqlodbc > + SUBMENU:=database > + SECTION:=libs > + CATEGORY:=Libraries > + TITLE:=Postgresql driver for ODBC > + URL:=http://www.unixodbc.org/ > + DEPENDS:=+unixodbc +libpq > +endef > + > +define Package/unixodbc/description > + unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, > Mac OSX, and UNIX. > +endef > + > +define Package/unixodbc-tools/description > + Command Line Tools to help install a driver and work with SQL. > +endef > + > +define Package/pgsqlodbc/description > + Postgresql driver for ODBC. > +endef > + > +define Build/Compile > + $(MAKE) -C $(PKG_BUILD_DIR) \ > + DESTDIR="$(PKG_INSTALL_DIR)" \ > + $(MAKE_FLAGS) \ > + ARCH="$(ARCH)" \ > + CC="$(TARGET_CC)" > + $(MAKE) -C $(PKG_BUILD_DIR) \ > + DESTDIR="$(PKG_INSTALL_DIR)" \ > + $(MAKE_FLAGS) \ > + ARCH="$(ARCH)" \ > + install -i > +endef > + > +define Build/InstallDev > + $(INSTALL_DIR) $(1)/usr/bin > + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ > + $(INSTALL_DIR) $(1)/usr/include > + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ > + $(INSTALL_DIR) $(1)/usr/lib > + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ > + $(INSTALL_DIR) $(1)/etc > + $(CP) $(PKG_INSTALL_DIR)/etc/odbc* $(1)/etc/ > + $(INSTALL_DIR) $(1)/etc/ODBCDataSources > + $(TARGET_CC) $(TARGET_CFLAGS) -E ./files/unixodbc_conf.h | tr '@' '\#' > >$(1)/usr/include/unixodbc_conf.h > +endef > + > +define Package/unixodbc/install > + $(INSTALL_DIR) $(1)/usr/lib > + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc[ci]*so* $(1)/usr/lib/ > + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc.*so* $(1)/usr/lib/ > + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnn*so* $(1)/usr/lib/ > + $(INSTALL_DIR) $(1)/etc > + $(CP) $(PKG_INSTALL_DIR)/etc/odbc* $(1)/etc/ > +endef > + > +define Package/unixodbc-tools/install > + $(INSTALL_DIR) $(1)/usr/bin > + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ > +endef > + > +define Package/pgsqlodbc/install > + $(INSTALL_DIR) $(1)/usr/lib > + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcpsql*so* $(1)/usr/lib/ > +endef > + > +$(eval $(call BuildPackage,unixodbc)) > +$(eval $(call BuildPackage,unixodbc-tools)) > +$(eval $(call BuildPackage,pgsqlodbc))
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel