add TARGET_CFLAGS to configure for userland lib and util.
[openwrt.git] / package / fuse / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include $(TOPDIR)/package/kernel.mk
5
6 PKG_NAME:=fuse
7 PKG_VERSION:=2.5.3
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c
10
11 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(TOPDIR)/package/rules.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 Package/kmod-fuse/install
85 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
86 $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \
87 $(1)/lib/modules/$(LINUX_VERSION)/
88 install -d -m0755 $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
90 install -d -m0755 $(1)/usr/bin
91 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
92 endef
93
94
95 define Build/InstallDev
96 mkdir -p $(STAGING_DIR)/usr/include
97 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/
98 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/
99 mkdir -p $(STAGING_DIR)/usr/lib
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/
102 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
104 $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
105 $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
106 endef
107
108 define Build/UninstallDev
109 rm -rf \
110 $(STAGING_DIR)/usr/include/fuse \
111 $(STAGING_DIR)/usr/include/fuse.h \
112 $(STAGING_DIR)/usr/lib/libfuse.a \
113 $(STAGING_DIR)/usr/lib/libfuse.so* \
114 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
115 endef
116
117
118 $(eval $(call BuildPackage,kmod-fuse))
This page took 0.046245 seconds and 5 git commands to generate.