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
)))
25 $(PKG_BUILD_DIR
)/.configured
:
26 # ./configure advertise "--infodir", but does not support it, replaced with "--docdir"
27 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
28 $(TARGET_CONFIGURE_OPTS
) \
29 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
30 CPPFLAGS
="$$CPPFLAGS -I$(STAGING_DIR)/usr/include" \
31 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
33 --target
=$(GNU_TARGET_NAME
) \
34 --host
=$(GNU_TARGET_NAME
) \
35 --build
=$(GNU_HOST_NAME
) \
41 --datadir=/usr
/share \
42 --includedir=/usr
/include \
43 --docdir
=/usr
/share
/info \
45 --libexecdir
=/usr
/lib \
46 --localstatedir
=/var \
47 --mandir=/usr
/share
/man \
51 $(DISABLE_LARGEFILE
) \
54 --disable-integer-datetimes \
64 --without-rendezvous \
71 $(PKG_BUILD_DIR
)/.built
:
72 $(MAKE
) -C
"$(PKG_BUILD_DIR)/src/include" \
73 DESTDIR
="$(PKG_INSTALL_DIR)" \
75 $(MAKE
) -C
"$(PKG_BUILD_DIR)/src/interfaces/libpq" \
76 DESTDIR
="$(PKG_INSTALL_DIR)" \
80 $(IPKG_LIBPQ
): $(STAGING_DIR
)/usr
/lib
/libpq.so
81 install -d
-m0755
$(IDIR_LIBPQ
)/usr
/lib
82 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/libpq.so.
* $(IDIR_LIBPQ
)/usr
/lib
/
83 $(RSTRIP
) $(IDIR_LIBPQ
)
84 $(IPKG_BUILD
) $(IDIR_LIBPQ
) $(PACKAGE_DIR
)
86 $(STAGING_DIR
)/usr
/lib
/libpq.so
: $(PKG_BUILD_DIR
)/.built
87 mkdir
-p
$(STAGING_DIR
)/usr
/include
88 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libpq-fe.h
$(STAGING_DIR
)/usr
/include/
89 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/postgres_ext.h
$(STAGING_DIR
)/usr
/include/
90 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/postgresql
$(STAGING_DIR
)/usr
/include/
91 mkdir
-p
$(STAGING_DIR
)/usr
/lib
92 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libpq.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
93 touch
$(STAGING_DIR
)/usr
/lib
/libpq.so
95 install-dev
: $(STAGING_DIR
)/usr
/lib
/libpq.so
99 $(STAGING_DIR
)/usr
/include/libpq-fe.h \
100 $(STAGING_DIR
)/usr
/include/postgres_ext.h \
101 $(STAGING_DIR
)/usr
/include/postgresql \
102 $(STAGING_DIR
)/usr
/lib
/libpq.
{a
,so
*} \