diff options
author | bartus | 2020-09-21 12:39:48 +0200 |
---|---|---|
committer | bartus | 2020-09-21 15:24:58 +0200 |
commit | 0eb05f6138fa47d0db30f515ef9a892ab6fe8297 (patch) | |
tree | 30eb53baa368cb2371fdc691135a0e4b3a82287b /PKGBUILD | |
download | aur-0eb05f6138fa47d0db30f515ef9a892ab6fe8297.tar.gz |
Add git-lfs protocol download extract routines
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..91c309e47acd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +#!/bin/hint/bash +# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> + +pkgname=makepkg-git-lfs-proto +pkgver=1 +pkgrel=1 +pkgdesc='Add Git-lfs support to makepkg. Use "git-lfs+" as protocol specifier in source url.' +arch=('any') +license=('GPL') +url='https://github.com/bartoszek/AUR-makepkg-git-lfs-proto' +depends=('pacman' 'git-lfs') +source=(git-lfs.sh.in) +sha256sums=('e5a344a5fb196f5263bea00b3f9e208d68a1a2d7eb2ceb6c632f88dcba06bf9b') + +prepare() { + # How to check for the unlikely possiblity that the directory was changed? + sed -i "s|@libmakepkgdir@|/usr/share/makepkg|g" "${source[@]}" + for file in "${source[@]}"; do mv "$file" "${file%.in}"; done + + # Use the current makepkg config as a base + cp /etc/makepkg.conf ./makepkg-git-lfs.conf + + # Add git-lfs to VCSCLIENTS list + sed -i "/^VCSCLIENTS/a\ 'git-lfs::git-lfs'" makepkg-git-lfs.conf +} + +package() { + install -m755 -D -t "${pkgdir}"/usr/share/makepkg/source/ "${source[@]%.in}" + install -m644 -D -t "${pkgdir}"/etc/ makepkg-git-lfs.conf +} |