3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=32dac2916d16287d95e0c958a75161fa
11 ftp
://ftp3.us.postgresql.org
/pub
/postgresql
/source
/v
$(PKG_VERSION
)/ \
12 ftp
://ftp.br.postgresql.org
/pub
/PostgreSQL
/source
/v
$(PKG_VERSION
)/ \
13 ftp
://ftp.au.postgresql.org
/pub
/postgresql
/source
/v
$(PKG_VERSION
)/ \
14 ftp
://ftp.tw.postgresql.org
/pub
/postgresql
/source
/v
$(PKG_VERSION
)/
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
21 include $(TOPDIR
)/package
/rules.mk
23 $(eval
$(call PKG_template
,LIBPQ
,libpq
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
24 $(eval
$(call PKG_template
,PGSQL_CLI
,pgsql-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
26 $(PKG_BUILD_DIR
)/.configured
:
27 # ./configure advertise "--infodir", but does not support it, replaced with "--docdir"
28 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
31 CPPFLAGS
="$$CPPFLAGS -I$(STAGING_DIR)/usr/include" \
32 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
34 --target
=$(GNU_TARGET_NAME
) \
35 --host
=$(GNU_TARGET_NAME
) \
36 --build
=$(GNU_HOST_NAME
) \
42 --datadir=/usr
/share \
43 --includedir=/usr
/include \
44 --docdir
=/usr
/share
/info \
46 --libexecdir
=/usr
/lib \
47 --localstatedir
=/var \
48 --mandir=/usr
/share
/man \
52 $(DISABLE_LARGEFILE
) \
55 --disable-integer-datetimes \
65 --without-rendezvous \
72 $(PKG_BUILD_DIR
)/.built
:
73 $(MAKE
) -C
"$(PKG_BUILD_DIR)/src/include" \
74 DESTDIR
="$(PKG_INSTALL_DIR)" \
76 $(MAKE
) -C
"$(PKG_BUILD_DIR)/src/interfaces/libpq" \
77 DESTDIR
="$(PKG_INSTALL_DIR)" \
79 $(MAKE
) -C
"$(PKG_BUILD_DIR)/src/bin/psql" \
80 DESTDIR
="$(PKG_INSTALL_DIR)" \
85 install -d
-m0755
$(IDIR_LIBPQ
)/usr
/lib
86 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libpq.so.
* $(IDIR_LIBPQ
)/usr
/lib
/
87 $(RSTRIP
) $(IDIR_LIBPQ
)
88 $(IPKG_BUILD
) $(IDIR_LIBPQ
) $(PACKAGE_DIR
)
91 install -d
-m0755
$(IDIR_PGSQL_CLI
)/usr
/bin
92 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/psql
$(IDIR_PGSQL_CLI
)/usr
/bin
/
93 $(RSTRIP
) $(IDIR_PGSQL_CLI
)
94 $(IPKG_BUILD
) $(IDIR_PGSQL_CLI
) $(PACKAGE_DIR
)
96 $(STAGING_DIR
)/usr
/lib
/libpq.so
: $(PKG_BUILD_DIR
)/.built
97 mkdir
-p
$(STAGING_DIR
)/usr
/include
98 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libpq
$(STAGING_DIR
)/usr
/include/
99 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libpq-fe.h
$(STAGING_DIR
)/usr
/include/
100 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/postgres_ext.h
$(STAGING_DIR
)/usr
/include/
101 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/postgresql
$(STAGING_DIR
)/usr
/include/
102 mkdir
-p
$(STAGING_DIR
)/usr
/lib
103 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libpq.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
106 install-dev
: $(STAGING_DIR
)/usr
/lib
/libpq.so
110 $(STAGING_DIR
)/usr
/include/libpq \
111 $(STAGING_DIR
)/usr
/include/libpq-fe.h \
112 $(STAGING_DIR
)/usr
/include/postgres_ext.h \
113 $(STAGING_DIR
)/usr
/include/postgresql \
114 $(STAGING_DIR
)/usr
/lib
/libpq.
{a
,so
*} \