postgresql: fix build and improve packaging

* make sure contrib stuff gets built and installed
* refresh patches and improve Makefile while at it

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2017-06-19 20:47:16 +02:00
parent f64be26d2a
commit 2135991f51
5 changed files with 28 additions and 29 deletions
+5 -15
View File
@@ -1,6 +1,3 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -9,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
PKG_VERSION:=9.4.12
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
@@ -24,6 +21,7 @@ PKG_USE_MIPS16:=0
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
@@ -145,8 +143,8 @@ define Host/Compile
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/
@@ -162,15 +160,6 @@ TARGET_CFLAGS += $(FPIC) -lpthread
# 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/
@@ -212,6 +201,7 @@ endef
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/