diff options
author | Hanabishi | 2021-11-11 03:03:48 +0500 |
---|---|---|
committer | Hanabishi | 2021-11-11 03:03:48 +0500 |
commit | 117d1070db41dff7746bc4ef7762495f1efdef38 (patch) | |
tree | 6b8174fe10ba11c0c7683fdd851ee8638a954555 /PKGBUILD | |
parent | 19d232845849faf2f73e9be743216273bc65a27f (diff) | |
download | aur-117d1070db41dff7746bc4ef7762495f1efdef38.tar.gz |
Package fix & rework
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 60 |
1 files changed, 41 insertions, 19 deletions
@@ -1,13 +1,17 @@ +_repo="Paragon-Software-Group/linux-ntfs3" +_ver="5.15" +_base="8bb7eca972ad531c9b149c0a51ab43a417385813" + pkgname=ntfs3-dkms-git -pkgver=r105.g22b05f1 +pkgver=5.15.r0.g8bb7eca pkgrel=1 +epoch=1 pkgdesc="NTFS3 is fully functional NTFS Read-Write driver. The driver works with NTFS versions up to 3.1." arch=('any') -url='https://github.com/Paragon-Software-Group/linux-ntfs3' +url="https://github.com/${_repo}" license=('GPL2') depends=('dkms') -makedepends=('subversion') -provides=('NTFS3-MODULE' 'ntfs3' 'ntfs3-dkms') +provides=('NTFS3-MODULE' "ntfs3=${_ver}" "ntfs3-dkms=${_ver}") conflicts=('ntfs3') options=('!strip') @@ -16,39 +20,57 @@ source=( dkms.conf kernel-5.12-backport.patch kernel-5.14-backport.patch - "ntfs3::svn+https://github.com/Paragon-Software-Group/linux-ntfs3/branches/devel/fs/ntfs3" + kernel-5.15-backport.patch ) sha512sums=( '533c249f0f6bd4833faf02d0d92ca1b5802a49afc5feb2e46a7d37275cfca7896db76cd83593f4f313977d278a9a7e92eda550667be2b93910c49cfb68ead4fb' - 'ac00adb4a6d7fc685c39af054474631c930455e9ad0838338e6b3622b72451e81397506866b83a4a51dd0e34ed7752963c0fed9e8b017da5122e0dca3d345fb6' + '5e2f2493fbf7a4d12e7cd7d3c0bb8fc3d8bd5d290f990e5b73c52bfa4ab58127c08eeff09fab7b0ba3a2c4ab1861fec68ce711b1cb57867bb61a81785f312677' '4b1976b40f67c210ee4052407a359ed8db0709a568387ffacc15e695b43af7c77b53fbe27a3365197521e5c9baa8bd9c7aaffa2f8345be17129216b1ac141fbe' '61a1948e3e607dabaca47742777b4ea92fadf9f5416ebaef8c06f1e17aab0f3ced34e900c0cf1ed462303f391f4a4713b5b30a488b349839780bde3248e19f3c' - 'SKIP' + '3a9395f5729c14cd8d8bf2ecda566730d90c6990319ed5e33310fa2dbe4d4a33df925950ff652fff338ef0135e5aeecf4b991603bba797847f8f1ef9130420c7' ) pkgver() { - local rev=$(curl "https://api.github.com/repos/Paragon-Software-Group/linux-ntfs3/compare/6abaa83c7352b31450d7e8c173f674324c16b02b...devel" | perl -ne'/"total_commits":\s?(\d+),?/ && print $1') - local sha=$(curl -H "Accept: text/vnd.github.VERSION.sha" "https://api.github.com/repos/Paragon-Software-Group/linux-ntfs3/commits/devel") - echo "r${rev}.g${sha:0:7}" + local api="https://api.github.com/repos/${_repo}" + local rev=$(curl "${api}/compare/${_base}...master" | perl -ne'/"total_commits":\s?(\d+),?/ && print $1') + local sha=$(curl -H "Accept: text/vnd.github.VERSION.sha" "${api}/commits/master") + echo "${_ver}.r${rev}.g${sha:0:7}" } prepare() { - cd "ntfs3" + cd "${srcdir}" + + rm -rf "repo" "ntfs3" + + git clone --depth 1 --filter=tree:0 --sparse --no-checkout "${url}" "repo" + + cd "repo" + + git sparse-checkout set "fs/ntfs3" + git checkout master + + ln -rs "fs/ntfs3" "${srcdir}/ntfs3" +} +build() { + cd "${srcdir}/ntfs3" patch -p0 -N -i "${srcdir}/Makefile.patch" # For testing - # patch -p1 -N -i "${srcdir}/kernel-5.12-backport.patch" + # patch -p1 -N -i "${srcdir}/kernel-5.15-backport.patch" # patch -p1 -N -i "${srcdir}/kernel-5.14-backport.patch" + # patch -p1 -N -i "${srcdir}/kernel-5.12-backport.patch" } package() { - local dest="${pkgdir}/usr/src/ntfs3-${pkgver}" - mkdir -p "${dest}" - cd "${dest}" - cp -r "${srcdir}/ntfs3/"* ./ - cp "${srcdir}/dkms.conf" ./ - mkdir -p "./patches" - cp "${srcdir}/kernel-"*.patch "./patches/" + cd "${srcdir}" + + local dest=$(install -dm755 "${pkgdir}/usr/src/ntfs3-${pkgver}" && echo "$_") + + cp -rt "${dest}" "ntfs3/"* + + install -Dm644 -t "${dest}" "dkms.conf" + + install -dm755 "${dest}/patches" && cp -t "$_" "kernel-"*.patch } |