1 ################################################################################
5 ################################################################################
7 POSTGRESQL_VERSION
= 9.5.4
8 POSTGRESQL_SOURCE
= postgresql-
$(POSTGRESQL_VERSION
).
tar.bz2
9 POSTGRESQL_SITE
= http
://ftp.postgresql.org
/pub
/source
/v
$(POSTGRESQL_VERSION
)
10 POSTGRESQL_LICENSE
= PostgreSQL
11 POSTGRESQL_LICENSE_FILES
= COPYRIGHT
12 POSTGRESQL_INSTALL_STAGING
= YES
13 POSTGRESQL_CONFIG_SCRIPTS
= pg_config
14 POSTGRESQL_CONF_ENV
= ac_cv_type_struct_sockaddr_in6
=yes \
15 pgac_cv_snprintf_long_long_int_modifier
="%lld" \
16 pgac_cv_snprintf_size_t_support
=yes
17 POSTGRESQL_CONF_OPTS
= --disable-rpath
19 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC
),y
)
20 # PostgreSQL does not build against uClibc with locales
21 # enabled, due to an uClibc bug, see
22 # http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html
23 # so overwrite automatic detection and disable locale support
24 POSTGRESQL_CONF_ENV
+= pgac_cv_type_locale_t
=no
27 ifneq ($(BR2_TOOLCHAIN_HAS_THREADS
),y
)
28 POSTGRESQL_CONF_OPTS
+= --disable-thread-safety
31 ifeq ($(BR2_arcle
)$(BR2_arceb
)$(BR2_microblazeel
)$(BR2_microblazebe
)$(BR2_nios2
)$(BR2_xtensa
),y
)
32 POSTGRESQL_CONF_OPTS
+= --disable-spinlocks
35 ifeq ($(BR2_PACKAGE_READLINE
),y
)
36 POSTGRESQL_DEPENDENCIES
+= readline
38 POSTGRESQL_CONF_OPTS
+= --without-readline
41 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
42 POSTGRESQL_DEPENDENCIES
+= zlib
44 POSTGRESQL_CONF_OPTS
+= --without-zlib
47 ifeq ($(BR2_PACKAGE_TZDATA
),y
)
48 POSTGRESQL_DEPENDENCIES
+= tzdata
49 POSTGRESQL_CONF_OPTS
+= --with-system-tzdata
=/usr
/share
/zoneinfo
51 POSTGRESQL_DEPENDENCIES
+= host-zic
52 POSTGRESQL_CONF_ENV
+= ZIC
="$(ZIC)"
55 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
56 POSTGRESQL_DEPENDENCIES
+= openssl
57 POSTGRESQL_CONF_OPTS
+= --with-openssl
60 define POSTGRESQL_USERS
61 postgres
-1 postgres
-1 * /var
/lib
/pgsql
/bin
/sh
- PostgreSQL Server
64 define POSTGRESQL_INSTALL_TARGET_FIXUP
65 $(INSTALL
) -dm
0700 $(TARGET_DIR
)/var
/lib
/pgsql
66 $(RM
) -rf
$(TARGET_DIR
)/usr
/lib
/postgresql
/pgxs
69 POSTGRESQL_POST_INSTALL_TARGET_HOOKS
+= POSTGRESQL_INSTALL_TARGET_FIXUP
71 define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
72 $(INSTALL
) -m
0755 -D package
/postgresql
/pg_config \
73 $(STAGING_DIR
)/usr
/bin
/pg_config
76 POSTGRESQL_POST_INSTALL_STAGING_HOOKS
+= POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
78 define POSTGRESQL_INSTALL_INIT_SYSV
79 $(INSTALL
) -m
0755 -D package
/postgresql
/S50postgresql \
80 $(TARGET_DIR
)/etc
/init.d
/S50postgresql
83 define POSTGRESQL_INSTALL_INIT_SYSTEMD
84 $(INSTALL
) -D
-m
644 package
/postgresql
/postgresql.service \
85 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/postgresql.service
86 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
87 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/postgresql.service \
88 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/postgresql.service
91 $(eval
$(autotools-package
))