Subject: [alpine-devel] extra/ncftp: build with libncftp and split ncftpbookmarks to a seperate sub-pacakge.

From: "Carlo Landmeter" <[email-masked]>
Date: Mon, 26 Jan 2009 12:32:24 +0000

See attached git patch.

Carlo

From 12067792b3f250fe1426f974a743ff39a2eb7ebd Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <[email-masked]>
Date: Mon, 26 Jan 2009 12:29:59 +0000
Subject: [PATCH] extra/ncftp: build with libncftp and split ncftpbookmarks to a seperate sub-pacakge.

---
 extra/ncftp/APKBUILD      |   24 +++++++++++++++++++-----
 extra/ncftp/ncftp.install |    6 ++++++
 2 files changed, 25 insertions(+), 5 deletions(-)
 create mode 100644 extra/ncftp/ncftp.install

diff --git a/extra/ncftp/APKBUILD b/extra/ncftp/APKBUILD
index 063a22b..72fe6ff 100644
--- a/extra/ncftp/APKBUILD
+++ b/extra/ncftp/APKBUILD
@@ -1,14 +1,16 @@
 # Maintainer: Carlo Landmeter <clandmeter at gmail>
 pkgname=ncftp
 pkgver=3.2.2
-pkgrel=0
+pkgrel=1
 pkgdesc="A set of free application programs implementing FTP"
 url="http://www.ncftp.com/"
 license="custom"
-depends="ncurses"
+depends=""
 makedepends="ncurses-dev"
-source="ftp://ftp.$pkgname.com/$pkgname/$pkgname-$pkgver-src.tar.bz2"
-subpackages="$pkgname-doc"
+install="$pkgname.install"
+source="ftp://ftp.$pkgname.com/$pkgname/$pkgname-$pkgver-src.tar.bz2
+ncftp.install"
+subpackages="$pkgname-doc $pkgname-bookmarks"
 
 build () {
 	cd "${srcdir}/${pkgname}-${pkgver}" || return 1
@@ -16,9 +18,21 @@ build () {
 	./configure --prefix=/usr \
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man || return 1
+	cd ${srcdir}/${pkgname}-${pkgver}/libncftp
+	make shared || return 1
+	make PREFIX=${pkgdir}/usr soinstall || return 1
+	cd ${srcdir}/${pkgname}-${pkgver} || return 1
 	make || return 1
 	make DESTDIR="$pkgdir" install || return 1
 	install -D doc/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE || return 1
 }
 
-md5sums="b2b4b2fd38c81754b8f13895d784d491  ncftp-3.2.2-src.tar.bz2"
+bookmarks () {
+	depends="ncurses"
+	install=""
+	mkdir -p "$subpkgdir"/usr/bin || return 1
+	mv "$pkgdir"/usr/bin/ncftpbookmarks "$subpkgdir"/usr/bin/ || return 1
+}
+
+md5sums="b2b4b2fd38c81754b8f13895d784d491  ncftp-3.2.2-src.tar.bz2
+2c394535b75995265c4c6376ee12cf22  ncftp.install"
diff --git a/extra/ncftp/ncftp.install b/extra/ncftp/ncftp.install
new file mode 100644
index 0000000..67801ed
--- /dev/null
+++ b/extra/ncftp/ncftp.install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+case "$1" in 
+  post_install)
+  echo '*' && echo '* If you like to install the ncurses based bookmark manager run: apk_add ncftp-bookmarks' && echo '*'
+esac
-- 
1.6.1