-#
-# Copyright (C) 2006-2014 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=postgresql
PKG_VERSION:=9.4.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=config
PKG_BUILD_DEPENDS += postgresql/host
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
endef
define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR)/usr/bin/
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR)/usr/bin/
+ $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR)/host/bin/
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/
# because PROFILE means something else in the project Makefile
unexport PROFILE
-define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- install
-endef
-
define Package/libpq/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(1)/usr/lib/
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
+ $(LN) $(STAGING_DIR)/host/bin/pg_config $(1)/usr/bin
$(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/
-Index: postgresql-9.5.4/src/bin/pg_ctl/pg_ctl.c
-===================================================================
---- postgresql-9.5.4.orig/src/bin/pg_ctl/pg_ctl.c
-+++ postgresql-9.5.4/src/bin/pg_ctl/pg_ctl.c
-@@ -95,6 +95,7 @@ static char *event_source = NULL;
+--- a/src/bin/pg_ctl/pg_ctl.c
++++ b/src/bin/pg_ctl/pg_ctl.c
+@@ -94,6 +94,7 @@ static char *exec_path = NULL;
static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */
static char *register_username = NULL;
static char *register_password = NULL;
static char *argv0 = NULL;
static bool allow_core_files = false;
static time_t start_time;
-@@ -2114,6 +2115,9 @@ do_help(void)
- #endif
+@@ -2093,6 +2094,9 @@ do_help(void)
+ printf(_(" -D, --pgdata=DATADIR location of the database storage area\n"));
printf(_(" -s, --silent only print errors, no informational messages\n"));
printf(_(" -t, --timeout=SECS seconds to wait when using -w option\n"));
+#if !defined(WIN32) && !defined(__CYGWIN__)
printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -w wait until operation completes\n"));
printf(_(" -W do not wait until operation completes\n"));
-@@ -2310,6 +2314,7 @@ main(int argc, char **argv)
+@@ -2289,6 +2293,7 @@ main(int argc, char **argv)
{"pgdata", required_argument, NULL, 'D'},
{"silent", no_argument, NULL, 's'},
{"timeout", required_argument, NULL, 't'},
{"core-files", no_argument, NULL, 'c'},
{NULL, 0, NULL, 0}
};
-@@ -2350,20 +2355,6 @@ main(int argc, char **argv)
+@@ -2329,20 +2334,6 @@ main(int argc, char **argv)
}
}
env_wait = getenv("PGCTLTIMEOUT");
if (env_wait != NULL)
-@@ -2449,11 +2440,15 @@ main(int argc, char **argv)
+@@ -2416,11 +2407,15 @@ main(int argc, char **argv)
wait_seconds_arg = true;
break;
case 'U':
break;
case 'w':
do_wait = true;
-@@ -2535,6 +2530,41 @@ main(int argc, char **argv)
+@@ -2502,6 +2497,41 @@ main(int argc, char **argv)
exit(1);
}