include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=8.2.3
+PKG_VERSION:=8.2.6
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=\
- ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/source/v$(PKG_VERSION) \
+ http://ftp7.us.postgresql.org/pub/postgresql/source/v$(PKG_VERSION) \
+ http://ftp8.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:=cb47771004d53505200ffd00ac45bc32
-PKG_CAT:=bzcat
+PKG_MD5SUM:=17b9049b4fcad42ee95410833c1db228
PKG_BUILD_DEPENDS:=libnotimpl
define Package/libpq
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+zlib
+ DEPENDS:=+zlib +libreadline +libncurses
TITLE:=PostgreSQL client library
- DESCRIPTION:=PostgreSQL client library.
URL:=http://www.postgresql.org/
+ SUBMENU:=database
+endef
+
+define Package/libpq/description
+PostgreSQL client library.
endef
define Package/pgsql-cli
CATEGORY:=Utilities
DEPENDS:=+libpq
TITLE:=Command Line Interface (CLI) to PostgreSQL databases
- DESCRIPTION:=Command Line Interface (CLI) to PostgreSQL databases.
URL:=http://www.postgresql.org/
+ SUBMENU:=database
+endef
+
+define Package/pgsql-cli/description
+Command Line Interface (CLI) to PostgreSQL databases.
endef
define Package/pgsql-server
CATEGORY:=Utilities
DEPENDS:=+libpq
TITLE:=PostgreSQL databases Server
- DESCRIPTION:=PostgreSQL databases Server.
URL:=http://www.postgresql.org/
+ SUBMENU:=database
endef
-# Need a native ecpg and zic for build
+define Package/pgsql-server/description
+PostgreSQL databases Server.
+endef
+
+# Need a native ecpg ,pg_config, and zic for build
define Build/Configure
(cd $(PKG_BUILD_DIR); rm -f config.cache; \
./configure \
--without-tcl \
--without-tk \
--with-zlib="yes" \
+ --enable-depend \
);
- $(MAKE) -C $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc CC="gcc" CFLAGS+="-I../../libpq"
+ $(MAKE) -C $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)" CFLAGS+="-I../../libpq"
mv $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg \
$(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host
- $(MAKE) -C $(PKG_BUILD_DIR)/src/timezone CC="gcc"
+ $(MAKE) -C $(PKG_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
mv $(PKG_BUILD_DIR)/src/timezone/zic $(PKG_BUILD_DIR)/src/timezone/zic.host
+ $(MAKE) -C $(PKG_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
+ mv $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config \
+ $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host
$(MAKE) -C $(PKG_BUILD_DIR) distclean
(cd $(PKG_BUILD_DIR); rm -f config.cache; \
--without-pam \
--without-perl \
--without-python \
- --without-readline \
--without-rendezvous \
--without-tcl \
--without-tk \
--with-zlib="yes" \
+ --enable-depend \
);
$(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
define Package/pgsql-cli/install
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/psql $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/psql $(1)/usr/bin/
endef
define Package/pgsql-server/install
endef
define Build/InstallDev
- mkdir -p $(STAGING_DIR)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/pg_config $(STAGING_DIR)/usr/bin/
- mkdir -p $(STAGING_DIR)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(STAGING_DIR)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(STAGING_DIR)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(STAGING_DIR)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(STAGING_DIR)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(STAGING_DIR)/usr/include/
- mkdir -p $(STAGING_DIR)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(STAGING_DIR)/usr/lib/
- $(CP) $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host $(STAGING_DIR)/usr/bin/ecpg
- $(CP) $(PKG_BUILD_DIR)/src/timezone/zic.host $(STAGING_DIR)/usr/bin/zic
-endef
-
-define Build/UninstallDev
- rm -rf \
- $(STAGING_DIR)/usr/bin/pg_config \
- $(STAGING_DIR)/usr/include/libpq \
- $(STAGING_DIR)/usr/include/libpq-fe.h \
- $(STAGING_DIR)/usr/include/pg_config.h \
- $(STAGING_DIR)/usr/include/postgres_ext.h \
- $(STAGING_DIR)/usr/include/postgresql \
- $(STAGING_DIR)/usr/lib/libpq.{a,so*} \
- $(STAGING_DIR)/usr/bin/ecpg \
- $(STAGING_DIR)/usr/bin/zic
+ mkdir -p $(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
+ $(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/postgres_ext.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(1)/usr/include/
+ mkdir -p $(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
endef
$(eval $(call BuildPackage,libpq))