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