merge nico's package/rules.mk and package/templates.mk into one file, update packages...
[openwrt.git] / openwrt / package / fuse / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=fuse
6 PKG_VERSION:=2.2.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=250d89b9c7b6ecf531df60c67f75737d
9
10 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,LIBFUSE,libfuse,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21 $(eval $(call PKG_template,FUSE_UTILS,fuse-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
24 (cd $(PKG_BUILD_DIR); \
25 rm -rf config.{cache,status} ; \
26 touch configure.in ; \
27 touch aclocal.m4 ; \
28 touch Makefile.in ; \
29 touch include/config.h.in ; \
30 touch configure ; \
31 $(TARGET_CONFIGURE_OPTS) \
32 CFLAGS="$(TARGET_CFLAGS)" \
33 ./configure \
34 --target=$(GNU_TARGET_NAME) \
35 --host=$(GNU_TARGET_NAME) \
36 --build=$(GNU_HOST_NAME) \
37 --program-prefix="" \
38 --program-suffix="" \
39 --prefix=/usr \
40 --exec-prefix=/usr \
41 --bindir=/usr/bin \
42 --datadir=/usr/share \
43 --includedir=/usr/include \
44 --infodir=/usr/share/info \
45 --libdir=/usr/lib \
46 --libexecdir=/usr/lib/locate \
47 --localstatedir=/var/lib \
48 --mandir=/usr/share/man \
49 --sbindir=/usr/sbin \
50 --sysconfdir=/etc \
51 $(DISABLE_LARGEFILE) \
52 $(DISABLE_NLS) \
53 --enable-shared \
54 --enable-static \
55 --enable-kernel-module \
56 --enable-lib \
57 --enable-util \
58 --disable-example \
59 --disable-auto-modprobe \
60 --with-kernel=$(LINUX_DIR) \
61 );
62 touch $(PKG_BUILD_DIR)/.configured
63
64 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
65 $(MAKE) -C $(PKG_BUILD_DIR)
66 touch $(PKG_BUILD_DIR)/.built
67
68 $(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built
69 mkdir -p $(PKG_INSTALL_DIR)
70 $(MAKE) -C $(PKG_BUILD_DIR) \
71 DESTDIR="$(PKG_INSTALL_DIR)" \
72 install
73 touch $(PKG_BUILD_DIR)/.installed
74
75 $(IPKG_KMOD_FUSE): $(IDIR_KMOD_FUSE)/CONTROL/control $(PKG_BUILD_DIR)/.installed
76 mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)
77 cp -fpR $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.o \
78 $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/
79 mkdir -p $(PACKAGE_DIR)
80 $(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR)
81
82 $(IPKG_LIBFUSE): $(IDIR_LIBFUSE)/CONTROL/control $(PKG_BUILD_DIR)/.installed
83 mkdir -p $(IDIR_LIBFUSE)/usr/lib
84 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(IDIR_LIBFUSE)/usr/lib/
85 chmod 0644 $(IDIR_LIBFUSE)/usr/lib/lib*.so*
86 $(RSTRIP) $(IDIR_LIBFUSE)
87 mkdir -p $(PACKAGE_DIR)
88 $(IPKG_BUILD) $(IDIR_LIBFUSE) $(PACKAGE_DIR)
89
90 $(IPKG_FUSE_UTILS): $(IDIR_FUSE_UTILS)/CONTROL/control $(PKG_BUILD_DIR)/.installed
91 mkdir -p $(IDIR_FUSE_UTILS)/usr/bin
92 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/fusermount $(IDIR_FUSE_UTILS)/usr/bin/
93 $(RSTRIP) $(IDIR_FUSE_UTILS)
94 mkdir -p $(PACKAGE_DIR)
95 $(IPKG_BUILD) $(IDIR_FUSE_UTILS) $(PACKAGE_DIR)
96
97 $(STAGING_DIR)/usr/lib/libfuse.so: $(PKG_BUILD_DIR)/.installed
98 mkdir -p $(STAGING_DIR)/usr/include
99 cp -fpR $(PKG_INSTALL_DIR)/usr/include/fuse* $(STAGING_DIR)/usr/include/
100 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
101 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
102 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
103
104 install-dev: $(STAGING_DIR)/usr/lib/libfuse.so
105
106 uninstall-dev:
107 rm -rf $(STAGING_DIR)/usr/include/fuse*
108 rm -rf $(STAGING_DIR)/usr/lib/libfuse.{a,so*}
109 rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
110
111 install: install-dev
112 clean: uninstall-dev
This page took 0.046956 seconds and 5 git commands to generate.