1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-21 16:25:00 -05:00

Add apfs stuff

This commit is contained in:
Travis Burtrum 2020-05-05 22:59:32 -04:00
parent 9549f2b751
commit 4952d66104
4 changed files with 146 additions and 0 deletions

View File

@ -0,0 +1,50 @@
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
_pkgname=apfsprogs
pkgname=$_pkgname-git
pkgver=r321.a98a5bf
pkgrel=1
pkgdesc='Experimental APFS tools for linux'
arch=(x86_64)
license=(GPL2)
url='https://github.com/eafer/apfsprogs'
depends=('glibc')
makedepends=('git')
conflicts=("$_pkgname")
provides=("$_pkgname=$pkgver")
source=('git+https://github.com/eafer/apfsprogs'
'add-ldflags.patch'
'destdir.patch')
sha256sums=('SKIP'
'30c173d08a6ceeb40ba09f267f3bbacc1486fa51e155fef17456da03bd35d741'
'65c7af8a2538536bcf9e62b152893849b2cd1092040f5bc6ec2a33040027f8ac')
_progs=(apfsck mkapfs)
pkgver() {
cd $_pkgname
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $_pkgname
patch -Np1 -i ../add-ldflags.patch
patch -Np1 -i ../destdir.patch
}
build() {
cd $_pkgname
make -C lib
for prog in "${_progs[@]}" ; do
make -C $prog
done
}
package() {
cd $_pkgname
for prog in "${_progs[@]}" ; do
make -C $prog install DESTDIR="$pkgdir" BINDIR=/usr/bin MANDIR=/usr/share/man8
done
}

View File

@ -0,0 +1,26 @@
diff --git a/apfsck/Makefile b/apfsck/Makefile
index e6d6f84..6f65668 100644
--- a/apfsck/Makefile
+++ b/apfsck/Makefile
@@ -15,7 +15,7 @@ override CFLAGS += -Wall -I$(CURDIR)/../include
apfsck: $(OBJS) $(LIBRARY)
@echo ' Linking...'
- @gcc $(CFLAGS) -o apfsck $(OBJS) $(LIBRARY)
+ @gcc $(CFLAGS) $(LDFLAGS) -o apfsck $(OBJS) $(LIBRARY)
@echo ' Build complete'
# Build the common libraries
diff --git a/mkapfs/Makefile b/mkapfs/Makefile
index 67b39ab..2280615 100644
--- a/mkapfs/Makefile
+++ b/mkapfs/Makefile
@@ -14,7 +14,7 @@ override CFLAGS += -Wall -I$(CURDIR)/../include
mkapfs: $(OBJS) $(LIBRARY)
@echo ' Linking...'
- @gcc $(CFLAGS) -o mkapfs $(OBJS) $(LIBRARY)
+ @gcc $(CFLAGS) $(LDFLAGS) -o mkapfs $(OBJS) $(LIBRARY)
@echo ' Build complete'
# Build the common libraries

View File

@ -0,0 +1,40 @@
diff --git a/apfsck/Makefile b/apfsck/Makefile
index e6d6f84..3636b2b 100644
--- a/apfsck/Makefile
+++ b/apfsck/Makefile
@@ -37,9 +37,9 @@ endif
clean:
rm -f $(OBJS) $(DEPS) apfsck
install:
- install -d $(BINDIR)
- install -t $(BINDIR) apfsck
- ln -fs -T $(BINDIR)/apfsck $(BINDIR)/fsck.apfs
- install -d $(MANDIR)
- install -m 644 -t $(MANDIR) apfsck.8
- ln -fs -T $(MANDIR)/apfsck.8 $(MANDIR)/fsck.apfs.8
+ install -d $(DESTDIR)$(BINDIR)
+ install -t $(DESTDIR)$(BINDIR) apfsck
+ ln -fs -T $(BINDIR)/apfsck $(DESTDIR)$(BINDIR)/fsck.apfs
+ install -d $(DESTDIR)$(MANDIR)
+ install -m 644 -t $(DESTDIR)$(MANDIR) apfsck.8
+ ln -fs -T $(MANDIR)/apfsck.8 $(DESTDIR)$(MANDIR)/fsck.apfs.8
diff --git a/mkapfs/Makefile b/mkapfs/Makefile
index 67b39ab..bb66dd1 100644
--- a/mkapfs/Makefile
+++ b/mkapfs/Makefile
@@ -36,9 +36,9 @@ endif
clean:
rm -f $(OBJS) $(DEPS) mkapfs
install:
- install -d $(BINDIR)
- install -t $(BINDIR) mkapfs
- ln -fs -T $(BINDIR)/mkapfs $(BINDIR)/mkfs.apfs
- install -d $(MANDIR)
- install -m 644 -t $(MANDIR) mkapfs.8
- ln -fs -T $(MANDIR)/mkapfs.8 $(MANDIR)/mkfs.apfs.8
+ install -d $(DESTDIR)$(BINDIR)
+ install -t $(DESTDIR)$(BINDIR) mkapfs
+ ln -fs -T $(BINDIR)/mkapfs $(DESTDIR)$(BINDIR)/mkfs.apfs
+ install -d $(DESTDIR)$(MANDIR)
+ install -m 644 -t $(DESTDIR)$(MANDIR) mkapfs.8
+ ln -fs -T $(MANDIR)/mkapfs.8 $(DESTDIR)$(MANDIR)/mkfs.apfs.8

View File

@ -0,0 +1,30 @@
# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: ManU
# Forked from aur/linux-can-dkms
# Contributor: Kyle Manna <kyle(at)kylemanna(dot)com>
pkgname=linux-apfs-dkms-git
epoch=1
pkgver=r6.2a598f1
pkgrel=1
pkgdesc="Experimental APFS kernel module (DKMS)"
arch=('any')
url="https://github.com/eafer/linux-apfs-oot"
license=('GPL2')
depends=('dkms')
makedepends=('git')
source=("git+https://github.com/eafer/linux-apfs-oot")
sha256sums=('SKIP')
pkgver() {
cd linux-apfs-oot
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd linux-apfs-oot
dkms_version=$(grep PACKAGE_VERSION dkms.conf | sed -r 's#PACKAGE_VERSION="([0-9.]+)"#\1#')
dkms_dir="$pkgdir/usr/src/linux-apfs-$dkms_version/"
install -Ddm755 "$dkms_dir"
cp -dr --no-preserve=ownership * "$dkms_dir"
}