add INCLUDE_DIR variable for $(TOPDIR)/include
[openwrt.git] / package / fuse / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include $(INCLUDE_DIR)/kernel.mk
5
6 PKG_NAME:=fuse
7 PKG_VERSION:=2.5.3
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c
10
11 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/kmod-fuse
21 SECTION:=drivers
22 CATEGORY:=Drivers
23 DEPENDS:=
24 TITLE:=FUSE (Filesystem in UserSpacE)
25 DESCRIPTION:=FUSE (Filesystem in UserSpacE)
26 URL:=http://fuse.sourceforge.net/
27 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
28 endef
29
30 define Build/Configure
31 (cd $(PKG_BUILD_DIR); \
32 rm -rf config.{cache,status} ; \
33 touch configure.in ; \
34 touch aclocal.m4 ; \
35 touch Makefile.in ; \
36 touch include/config.h.in ; \
37 touch configure ; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --enable-shared \
61 --enable-static \
62 --disable-rpath \
63 --enable-kernel-module \
64 --enable-lib \
65 --enable-util \
66 --disable-example \
67 --disable-auto-modprobe \
68 --with-kernel=$(LINUX_DIR) \
69 --disable-mtab \
70 );
71 endef
72
73 define Build/Compile
74 rm -rf $(PKG_INSTALL_DIR)
75 mkdir -p $(PKG_INSTALL_DIR)
76 $(MAKE) -C $(PKG_BUILD_DIR) \
77 ARCH="$(LINUX_KARCH)" \
78 CROSS_COMPILE="$(TARGET_CROSS)" \
79 PATH="$(TARGET_PATH)" \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
81 all install
82 endef
83
84 define Build/InstallDev
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} \
87 $(STAGING_DIR)/usr/include/
88 mkdir -p $(STAGING_DIR)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} \
90 $(STAGING_DIR)/usr/lib/
91 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
93 $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
94 $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
95 endef
96
97 define Build/UninstallDev
98 rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \
99 $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \
100 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
101 endef
102
103 define Package/kmod-fuse/install
104 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
105 $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \
106 $(1)/lib/modules/$(LINUX_VERSION)/
107 install -d -m0755 $(1)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
109 install -d -m0755 $(1)/usr/bin
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
111 endef
112
113 $(eval $(call BuildPackage,kmod-fuse))
This page took 0.042854 seconds and 5 git commands to generate.