summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 91c309e47acd87452959101b761718b810c78b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
}