summaryrefslogtreecommitdiff
path: root/core/btrfs-progs-unstable
diff options
context:
space:
mode:
Diffstat (limited to 'core/btrfs-progs-unstable')
-rw-r--r--core/btrfs-progs-unstable/PKGBUILD25
-rw-r--r--core/btrfs-progs-unstable/btrfs-progs-build-fixes.patch32
2 files changed, 57 insertions, 0 deletions
diff --git a/core/btrfs-progs-unstable/PKGBUILD b/core/btrfs-progs-unstable/PKGBUILD
new file mode 100644
index 000000000..466829f8c
--- /dev/null
+++ b/core/btrfs-progs-unstable/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 107578 2011-01-26 20:59:54Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=btrfs-progs-unstable
+pkgver=0.19.20101006
+pkgrel=1
+pkgdesc="btrfs filesystem utilities"
+arch=(i686 x86_64)
+depends=('glibc' 'e2fsprogs')
+source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.bz2)
+url="http://btrfs.wiki.kernel.org/"
+license=('GPL2')
+
+build() {
+ cd $srcdir/$pkgname
+ make CFLAGS="$CFLAGS" all convert
+}
+
+package() {
+ cd $srcdir/$pkgname
+ make prefix=$pkgdir/usr bindir=$pkgdir/sbin install
+ # fix manpage
+ mkdir -p $pkgdir/usr/share/
+ mv $pkgdir/usr/man $pkgdir/usr/share/man
+}
+md5sums=('6bce610ed1720e6b9dc9fa96cbd8b73e')
diff --git a/core/btrfs-progs-unstable/btrfs-progs-build-fixes.patch b/core/btrfs-progs-unstable/btrfs-progs-build-fixes.patch
new file mode 100644
index 000000000..d189c5a77
--- /dev/null
+++ b/core/btrfs-progs-unstable/btrfs-progs-build-fixes.patch
@@ -0,0 +1,32 @@
+--- btrfs-progs-0.19/btrfsck.c
++++ btrfs-progs-0.19/btrfsck.c
+@@ -21,6 +21,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
+ #include "kerncompat.h"
+ #include "ctree.h"
+ #include "disk-io.h"
+--- btrfs-progs-0.19/mkfs.c
++++ btrfs-progs-0.19/mkfs.c
+@@ -341,7 +341,7 @@ int main(int ac, char **av)
+ u64 alloc_start = 0;
+ u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP;
+ u64 data_profile = BTRFS_BLOCK_GROUP_RAID0;
+- u32 leafsize = getpagesize();
++ u32 leafsize = sysconf(_SC_PAGESIZE);
+ u32 sectorsize = 4096;
+ u32 nodesize = leafsize;
+ u32 stripesize = 4096;
+@@ -398,7 +398,7 @@ int main(int ac, char **av)
+ print_usage();
+ }
+ }
+- sectorsize = max(sectorsize, (u32)getpagesize());
++ sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
+ if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
+ fprintf(stderr, "Illegal leafsize %u\n", leafsize);
+ exit(1);