bump postgresql to newer version, thanks KanjiMonster, #3520
[openwrt/svn-archive/archive.git] / libs / postgresql / Makefile
index dca49499f0b9b5b66651fb98bdbe59ef143b7b00..d3b7756fbde7e1b079395a20e30c5c451bc6d837 100644 (file)
@@ -9,15 +9,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
-PKG_VERSION:=8.2.5
+PKG_VERSION:=8.3.1
 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:=bb1cd309ea72f070cb964736f5755847
+PKG_MD5SUM:=a5e0ed6a85b450dc217ec71da93243a7
 
 PKG_BUILD_DEPENDS:=libnotimpl
 
@@ -31,6 +34,7 @@ define Package/libpq
   DEPENDS:=+zlib +libreadline +libncurses
   TITLE:=PostgreSQL client library
   URL:=http://www.postgresql.org/
+  SUBMENU:=database
 endef
 
 define Package/libpq/description
@@ -43,6 +47,7 @@ define Package/pgsql-cli
   DEPENDS:=+libpq
   TITLE:=Command Line Interface (CLI) to PostgreSQL databases
   URL:=http://www.postgresql.org/
+  SUBMENU:=database
 endef
 
 define Package/pgsql-cli/description
@@ -55,6 +60,7 @@ define Package/pgsql-server
   DEPENDS:=+libpq
   TITLE:=PostgreSQL databases Server
   URL:=http://www.postgresql.org/
+  SUBMENU:=database
 endef
 
 define Package/pgsql-server/description
@@ -152,6 +158,8 @@ define Build/Configure
        );
        $(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
+       # note: unclear if this is needed yet, commenting out for the moment
+       #$(SED) 's@US/Eastern@America/New_York@' $(PKG_BUILD_DIR)/src/timezone/Makefile
 endef
 
 define Build/Compile
@@ -167,7 +175,7 @@ endef
 
 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
@@ -179,18 +187,25 @@ define Package/pgsql-server/install
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/postgres \
                $(PKG_INSTALL_DIR)/usr/bin/dropdb \
+               $(PKG_INSTALL_DIR)/usr/bin/clusterdb \
                $(PKG_INSTALL_DIR)/usr/bin/createdb \
+               $(PKG_INSTALL_DIR)/usr/bin/createlang \
                $(PKG_INSTALL_DIR)/usr/bin/createuser \
+               $(PKG_INSTALL_DIR)/usr/bin/droplang \
                $(PKG_INSTALL_DIR)/usr/bin/dropuser \
                $(PKG_INSTALL_DIR)/usr/bin/initdb \
+               $(PKG_INSTALL_DIR)/usr/bin/ipcclean \
                $(PKG_INSTALL_DIR)/usr/bin/pg_config \
                $(PKG_INSTALL_DIR)/usr/bin/pg_controldata \
                $(PKG_INSTALL_DIR)/usr/bin/pg_ctl \
                $(PKG_INSTALL_DIR)/usr/bin/pg_dump \
                $(PKG_INSTALL_DIR)/usr/bin/pg_dumpall \
                $(PKG_INSTALL_DIR)/usr/bin/pg_restore \
+               $(PKG_INSTALL_DIR)/usr/bin/pg_resetxlog \
+               $(PKG_INSTALL_DIR)/usr/bin/reindexdb \
                $(PKG_INSTALL_DIR)/usr/bin/vacuumdb \
                $(1)/usr/bin
+       ln -sf postgres $(1)/usr/bin/postmaster
 
        $(INSTALL_BIN) ./files/postgresql.init $(1)/etc/init.d/postgresql
 
@@ -208,6 +223,7 @@ define Package/pgsql-server/install
                $(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
@@ -249,7 +265,7 @@ endef
 
 define Build/InstallDev
        mkdir -p $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host $(1)/usr/bin/pg_config
+       $(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/
@@ -262,19 +278,6 @@ define Build/InstallDev
        $(CP) $(PKG_BUILD_DIR)/src/timezone/zic.host $(1)/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
-endef
-
 $(eval $(call BuildPackage,libpq))
 $(eval $(call BuildPackage,pgsql-cli))
 $(eval $(call BuildPackage,pgsql-server))