From 0aabef127155575e8c8d660605f9401ab15356aa Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 24 Feb 2011 17:41:36 +0100
Subject: allow native build of a lot of packages

STAGING_TARGET_DIR is used for package Makefile's for
include and library search path's. STAGING_DIR is used
for common code in mk/ or Makefile/rules.mk.
STAGING_TARGET_DIR is /usr when native builds are used.
---
 package/fuse/Makefile | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

(limited to 'package/fuse')

diff --git a/package/fuse/Makefile b/package/fuse/Makefile
index c861a06d0..01164ec2c 100644
--- a/package/fuse/Makefile
+++ b/package/fuse/Makefile
@@ -5,31 +5,52 @@ include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		fuse
 PKG_VERSION:=		2.7.4
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		4879f06570d2225667534c37fea04213
 PKG_DESCR:=		Filesystem in Userspace (utilities)
 PKG_SECTION:=		fs
-PKG_DEPENDS:=		kmod-fuse-fs
+PKG_DEPENDS:=		kmod-fuse-fs libfuse
 PKG_URL:=		http://fuse.sourceforge.net/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=${PKG_NAME}/}
 
-PKG_SUBPKGS:=		FUSE_UTILS
+PKG_SUBPKGS:=		FUSE_UTILS LIBFUSE LIBFUSE_DEV
+PKGSD_LIBFUSE:=		FUSE library
+PKGSC_LIBFUSE:=		libs
+PKGSD_LIBFUSE_DEV:=	FUSE headers
+PKGSC_LIBFUSE_DEV:=	devel
 
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,FUSE_UTILS,fuse-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,LIBFUSE,libfuse,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBFUSE},${PKGSC_LIBFUSE}))
+$(eval $(call PKG_template,LIBFUSE_DEV,libfuse-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBFUSE_DEV},${PKGSC_LIBFUSE_DEV}))
 
 CONFIGURE_ARGS+=	--enable-lib \
-			--disable-shared \
-			--enable-static \
 			--enable-util \
 			--enable-example \
 			--disable-auto-modprobe \
 			--disable-mtab \
 			--disable-kernel-module
 
-post-install:
+fuse-utils-install:
 	${INSTALL_DIR} ${IDIR_FUSE_UTILS}/usr/bin
 	${CP} ${WRKINST}/usr/bin/fusermount ${IDIR_FUSE_UTILS}/usr/bin
 
+libfuse-install:
+	${INSTALL_DIR} ${IDIR_LIBFUSE}/usr/lib
+	${CP} ${WRKINST}/usr/lib/libfuse.so* \
+		${IDIR_LIBFUSE}/usr/lib
+	${CP} ${WRKINST}/usr/lib/libulockmgr.so* \
+		${IDIR_LIBFUSE}/usr/lib
+
+libfuse-dev-install:
+	${INSTALL_DIR} ${IDIR_LIBFUSE_DEV}/usr/lib/pkgconfig
+	${INSTALL_DIR} ${IDIR_LIBFUSE_DEV}/usr/include/fuse
+	${INSTALL_DATA} ${WRKINST}/usr/include/*.h \
+		${IDIR_LIBFUSE_DEV}/usr/include
+	${INSTALL_DATA} ${WRKINST}/usr/include/fuse/*.h \
+		${IDIR_LIBFUSE_DEV}/usr/include/fuse
+	${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/fuse.pc \
+		${IDIR_LIBFUSE_DEV}/usr/lib/pkgconfig
+
 include ${TOPDIR}/mk/pkg-bottom.mk
-- 
cgit v1.2.3