3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC
)
9 PKG_VERSION
:= $(shell cat .
/ipkg
/version
)
10 CURRENT_DIR
:= $(shell pwd
)
11 INSTALL_DIR ?
= $(CURRENT_DIR
)/ipkg-install
16 I_LIBPQ_DEV
:= ipkg
/libpq-dev
17 I_PGSQL_UTILS
:= ipkg
/pgsql-utils
20 # $(STAGING_DIR)/usr/include/zlib.h \
25 --disable-integer-datetimes \
36 --without-rendezvous \
45 .stamp-configured
: $(BUILD_DEPS
)
48 $(TARGET_CONFIGURE_OPTS
) \
49 CFLAGS
="$(TARGET_CFLAGS)" \
51 --target
=$(GNU_TARGET_NAME
) \
52 --host
=$(GNU_TARGET_NAME
) \
53 --build
=$(GNU_HOST_NAME
) \
57 --datadir=/usr
/share \
58 --includedir=/usr
/include \
60 --libexecdir
=/usr
/lib \
61 --localstatedir
=/var \
62 --mandir=/usr
/share
/man \
65 $(DISABLE_LARGEFILE
) \
69 touch .stamp-configured
72 .stamp-built
: .stamp-configured
79 $(INSTALL_DIR
)/usr
/bin
/psql
: .stamp-built
81 mkdir
-p
$(INSTALL_DIR
)
84 DESTDIR
="$(INSTALL_DIR)" \
88 configure
: .stamp-configured
94 install: $(INSTALL_DIR
)/usr
/bin
/psql
97 package
: $(INSTALL_DIR
)/usr
/bin
/psql
99 mkdir
-p
$(I_LIBPQ
)/usr
/lib
/
100 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libpq
*.so.
* $(I_LIBPQ
)/usr
/lib
/
101 $(STRIP
) $(I_LIBPQ
)/usr
/lib
/lib
*.so.
*
103 mkdir
-p
$(I_LIBPQ_DEV
)/usr
/bin
104 cp
-fpR
$(INSTALL_DIR
)/usr
/bin
/pg_config
$(I_LIBPQ_DEV
)/usr
/bin
/
105 mkdir
-p
$(I_LIBPQ_DEV
)/usr
/include
106 cp
-fpR
$(INSTALL_DIR
)/usr
/include/* $(I_LIBPQ_DEV
)/usr
/include/
107 mkdir
-p
$(I_LIBPQ_DEV
)/usr
/lib
/
108 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/lib
*.a
$(I_LIBPQ_DEV
)/usr
/lib
/
109 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/lib
*.so
* $(I_LIBPQ_DEV
)/usr
/lib
/
111 mkdir
-p
$(I_PGSQL_UTILS
)/usr
/bin
112 cp
-fpR
$(INSTALL_DIR
)/usr
/bin
/psql
$(I_PGSQL_UTILS
)/usr
/bin
/
113 $(STRIP
) $(I_PGSQL_UTILS
)/usr
/bin
/*
115 chmod
0755 ipkg
/*/CONTROL
/
116 chmod
0644 ipkg
/*/CONTROL
/control
118 perl
-pi
-e
"s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg
/*/CONTROL
/control
119 ifneq ($(strip $(PKG_VERSION
)),)
120 perl
-pi
-e
"s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg
/*/CONTROL
/control
123 $(IPKG_BUILD
) $(I_LIBPQ
) $(IPKG_TARGET_DIR
)
124 $(IPKG_BUILD
) $(I_LIBPQ_DEV
) $(IPKG_TARGET_DIR
)
125 $(IPKG_BUILD
) $(I_PGSQL_UTILS
) $(IPKG_TARGET_DIR
)
131 DESTDIR
="$(INSTALL_DIR)" \
137 $(I_PGSQL_UTILS
)/usr \
142 @cat
$(I_LIBPQ
)/CONTROL
/control
144 @cat
$(I_LIBPQ_DEV
)/CONTROL
/control
146 @cat
$(I_PGSQL_UTILS
)/CONTROL
/control
150 .PHONY
: configure build
install package
clean control