-#
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=8.3.0
-PKG_RELEASE:=1
+PKG_VERSION:=8.3.3
+PKG_RELEASE:=2
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=\
http://ftp7.us.postgresql.org/pub/postgresql/source/v$(PKG_VERSION) \
http://ftp9.us.postgresql.org/pub/postgresql/source/v$(PKG_VERSION) \
http://ftp.be.postgresql.org/postgresql/source/v$(PKG_VERSION) \
ftp://ftp-archives.postgresql.org/pub/source/v$(PKG_VERSION)
-PKG_MD5SUM:=53d6816eac7442f9bc8103439ebee22e
-
-PKG_BUILD_DEPENDS:=libnotimpl
-
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_MD5SUM:=0ae4bd9620e84d3e08dcf923808d14d0
include $(INCLUDE_DIR)/package.mk
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$$$$CPPFLAGS $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
- LIBS="-lnotimpl" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--without-tk \
--with-zlib="yes" \
--enable-depend \
+ $(if $(CONFIG_TARGET_avr32),--disable-spinlocks) \
);
$(SED) 's@ECPG = ../../preproc/ecpg@ECPG = ../../preproc/ecpg.host@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
$(SED) 's@\./zic -d@./zic.host -d@' $(PKG_BUILD_DIR)/src/timezone/Makefile
#$(SED) 's@US/Eastern@America/New_York@' $(PKG_BUILD_DIR)/src/timezone/Makefile
endef
+TARGET_CFLAGS += $(FPIC)
+
define Build/Compile
$(MAKE) -C "$(PKG_BUILD_DIR)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(PKG_INSTALL_DIR)/usr/bin/reindexdb \
$(PKG_INSTALL_DIR)/usr/bin/vacuumdb \
$(1)/usr/bin
-
- $(LN) -s postgres $(1)/usr/bin/postmaster
+ ln -sf postgres $(1)/usr/bin/postmaster
$(INSTALL_BIN) ./files/postgresql.init $(1)/etc/init.d/postgresql
$(PKG_INSTALL_DIR)/usr/share/postgresql/psqlrc.sample \
$(PKG_INSTALL_DIR)/usr/share/postgresql/recovery.conf.sample \
$(PKG_INSTALL_DIR)/usr/share/postgresql/system_views.sql \
+ $(PKG_INSTALL_DIR)/usr/share/postgresql/snowball_create.sql \
$(1)/usr/share/postgresql
$(INSTALL_DATA) ./files/postgresql.config $(1)/etc/config/postgresql
if [ -z "$${RG}" -o -z "$${RU}" ]; then
echo "Could not find user utils, you will need to create the postgres user by hand"
- exit
+ exit
fi
if [ "$${RG}" != "0" -o "$${RU}" != "0" ]; then
endef
define Build/InstallDev
- mkdir -p $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host $(1)/usr/bin/pg_config
- mkdir -p $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config_manual.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(1)/usr/include/
- mkdir -p $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host $(1)/usr/bin/ecpg
$(CP) $(PKG_BUILD_DIR)/src/timezone/zic.host $(1)/usr/bin/zic