diff --git a/git-filter-repo/PKGBUILD b/git-filter-repo/PKGBUILD new file mode 100644 index 00000000..453c764c --- /dev/null +++ b/git-filter-repo/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: James Morris + +pkgname=git-filter-repo +pkgver=2.34.0 +pkgrel=1 +pkgdesc='Quickly rewrite git repository history (filter-branch replacement)' +arch=('any') +url='https://github.com/newren/git-filter-repo' +license=('MIT') +depends=('git' 'python') +source=("https://github.com/newren/git-filter-repo/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz") +noextract=("${pkgname}-${pkgver}.tar.xz") +sha256sums=('b1bf46af1e6a91a54056d0254e480803db8e40f631336c559a1a94d2a08389c4') + +prepare() { + # tar chokes on a symlink in the contrib directory + # We're not installing anything from there, so just don't bother with it + bsdtar -x -f "${pkgname}-${pkgver}.tar.xz" --exclude '*contrib*' + + cd "${pkgname}-${pkgver}" + sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' git-filter-repo +} + +package() { + cd "${pkgname}-${pkgver}" + install -Dm0755 git-filter-repo "${pkgdir}/usr/bin/git-filter-repo" + install -Dm0644 Documentation/man1/git-filter-repo.1 "${pkgdir}/usr/share/man/man1/git-filter-repo.1" + install -Dm0644 Documentation/html/git-filter-repo.html "${pkgdir}/usr/share/doc/git/html/git-filter-repo.html" +}