Hi Benjamin,

Le Friday 24 July 2009 07:25:01 Benjamin Cama, vous avez écrit :
> Hi,
>
> Here is a patch to add a btrfs utilities package to OpenWRT.

Added in r17000, thanks !

>
> Benjamin
> --
> Index: btrfs-progs/patches/001-Makefile-gcc-fix
> ===================================================================
> --- btrfs-progs/patches/001-Makefile-gcc-fix  (revision 0)
> +++ btrfs-progs/patches/001-Makefile-gcc-fix  (revision 0)
> @@ -0,0 +1,53 @@
> +diff --git a/Makefile b/Makefile
> +index 3349079..cf5392f 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -36,37 +36,37 @@ version:
> +     bash version.sh
> +
> + btrfsctl: $(objects) btrfsctl.o
> +-    gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
> +
> + btrfs-vol: $(objects) btrfs-vol.o
> +-    gcc $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
> +
> + btrfs-show: $(objects) btrfs-show.o
> +-    gcc $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
> +
> + btrfsck: $(objects) btrfsck.o bit-radix.o
> +-    gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o $(LDFLAGS)
> $(LIBS) ++    $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o
> $(LDFLAGS) $(LIBS) +
> + mkfs.btrfs: $(objects) mkfs.o
> +-    gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
> +
> + btrfs-debug-tree: $(objects) debug-tree.o
> +-    gcc $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS)
> $(LIBS) ++    $(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o
> $(LDFLAGS) $(LIBS) +
> + btrfstune: $(objects) btrfstune.o
> +-    gcc $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
> +
> + btrfs-image: $(objects) btrfs-image.o
> +-    gcc $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz
> $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-image $(objects)
> btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS) +
> + dir-test: $(objects) dir-test.o
> +-    gcc $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
> +
> + quick-test: $(objects) quick-test.o
> +-    gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
> ++    $(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
> +
> + convert: $(objects) convert.o
> +-    gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS)
> $(LIBS) ++    $(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs
> $(LDFLAGS) $(LIBS) +
> + clean :
> +     rm -f $(progs) cscope.out *.o .*.d btrfs-convert
> Index: btrfs-progs/Makefile
> ===================================================================
> --- btrfs-progs/Makefile      (revision 0)
> +++ btrfs-progs/Makefile      (revision 0)
> @@ -0,0 +1,55 @@
> +#
> +# Copyright (C) 2009 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +# $Id$
> +
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=btrfs-progs
> +PKG_VERSION:=0.18
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> +PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/
> +PKG_MD5SUM:=1dfe59152a558eb2f79a4c398de6c4ef
> +
> +include $(INCLUDE_DIR)/package.mk
> +
> +define Package/btrfs-progs
> +  SECTION:=utils
> +  CATEGORY:=Utilities
> +  DEPENDS:=+libuuid
> +  TITLE:=Btrfs filesystems utilities
> +  URL:=http://btrfs.wiki.kernel.org/
> +endef
> +
> +define Package/btrfs-progs/description
> + Btrfs is a new copy on write filesystem for Linux aimed at implementing
> + advanced features while focusing on fault tolerance, repair and easy
> + administration. Initially developed by Oracle, Btrfs is licensed under
> the + GPL and open for contribution from anyone.
> +endef
> +
> +progs = btrfsctl btrfsck mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol
> \ +   btrfstune btrfs-image
> +
> +define Build/Compile
> +     $(MAKE) -C $(PKG_BUILD_DIR) \
> +             CC=$(TARGET_CC) \
> +             CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
> +             LDFLAGS="$(TARGET_LDFLAGS)" \
> +             prefix=/usr \
> +             DESTDIR=$(PKG_INSTALL_DIR) \
> +             all install
> +endef
> +
> +define Package/btrfs-progs/install
> +     $(INSTALL_DIR) $(1)/usr/bin
> +     $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs))
> $(1)/usr/bin/ +endef
> +
> +$(eval $(call BuildPackage,btrfs-progs))
> +
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to