Subject: [alpine-aports] [PATCH] main/postgresql: include header files in libpq

From: Ramon Soares <[email-masked]>
Date: Tue, 28 Apr 2015 12:31:25 +0000

---
 main/postgresql/APKBUILD | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index ef98b30..fc46d99 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -10,7 +10,7 @@ depends="postgresql-client"
 install="$pkgname.pre-upgrade"
 depends_dev="readline-dev openssl-dev zlib-dev libxml2-dev"
 makedepends="$depends_dev"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg libpq $pkgname-client
+subpackages="libpq $pkgname-dev $pkgname-doc $pkgname-dbg $pkgname-client
 	$pkgname-contrib"
 patches="initdb.patch"
 source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2
@@ -68,8 +68,26 @@ package() {
 libpq() {
 	depends=
 	pkgdesc="PostgreSQL libraries"
-	mkdir -p "$subpkgdir"/usr/lib
+	mkdir -p "$subpkgdir"/usr/bin
+	mkdir -p "$subpkgdir"/usr/lib/pkgconfig
+	mkdir -p "$subpkgdir"/usr/include/postgresql
+	mv "$pkgdir"/usr/bin/pg_config "$subpkgdir"/usr/bin
+	mv "$pkgdir"/usr/include/libpq-events.h "$subpkgdir"/usr/include
+	mv "$pkgdir"/usr/include/libpq-fe.h "$subpkgdir"/usr/include
+	mv "$pkgdir"/usr/include/postgresql/internal "$subpkgdir"/usr/include/postgresql/
+	mv "$pkgdir"/usr/include/libpq-events.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/libpq-fe.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/libpq "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr//include/pg_config.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/pg_config_ext.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/pg_config_manual.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/pg_config_os.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/include/postgres_ext.h "$subpkgdir"/usr/include/
+	mv "$pkgdir"/usr/lib/libpq.a "$subpkgdir"/usr/lib/
 	mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib/
+	mv "$pkgdir"/usr/lib/libpqcommon.a "$subpkgdir"/usr/lib/
+	mv "$pkgdir"/usr/lib/libpqport.a "$subpkgdir"/usr/lib/
+	mv "$pkgdir"/usr/lib/pkgconfig/libpq.pc "$subpkgdir"/usr/lib/pkgconfig/
 }
 
 client() {
-- 
2.3.6

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---