summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 19956ca2beca1ce16117e57cf3a01166e729bd27 (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
31
32
33
34
35
36
37
38
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: rtfreedman  <rob<d0t>til<d0t>freedman< T>googlemail<d0t>com>
# Contributor: Pyro Devil <p.devil@gmail.com>

pkgname=exfat-nofuse-dkms-git
pkgver=206.297a573
pkgrel=1
pkgdesc='Native (nofuse) kernel module for EXtendedFAT support - use with DKMS'
arch=('any')
url='https://github.com/barrybingo/exfat-nofuse'
license=('GPL2')
depends=('dkms' 'exfat-utils-nofuse')
makedepends=('git')
provides=('exfat' 'exfat-dkms' 'exfat-nofuse-dkms')
conflicts=('exfat' 'exfat-dkms' 'exfat-nofuse-dkms' 'exfat-dkms-git')
source=('git+https://github.com/barrybingo/exfat-nofuse.git'
        dkms.conf)
b2sums=('SKIP'
        'b964beec9c31117d1b35373ea5f3fb4e14c736d69948ce8d438e08c8f7f9af3190eb510e3303249d8d323730f3d8924ce467f32c5724a9cb353ad91ab229d5f4')

pkgver() {
  cd ${pkgname%-dkms-git}
  echo $(git rev-list --count master).$(git rev-parse --short master)
}

prepare() {
  # update PACKAGE_VERSION to pkgver
  sed -i "s/PACKAGE_VERSION=\"[-._ 0-9a-zA-Z]*\"/PACKAGE_VERSION=\"${pkgver}\"/g" "${srcdir}"/dkms.conf
}

package() {
  # remove unneeded git files
  rm -fr ${pkgname%-dkms-git}/{.git,.gitignore}

  install -dm644 "${pkgdir}"/usr/src
  cp -r ${pkgname%-dkms-git} "${pkgdir}"/usr/src/exfat-${pkgver}
  install -Dm644 "${srcdir}"/dkms.conf "${pkgdir}"/usr/src/exfat-${pkgver}/dkms.conf
}