summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32ad11cd0a4aca22aca5608e1fc767110789ca1c (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
# Maintainer: Jack O'Sullivan <jackos1998 at gmail dot com>

_pkgbase=nat46
_pkgname=nat46-dkms
pkgname=nat46-dkms-git
pkgver=r124.683fbd2
pkgrel=1
pkgdesc="Linux kernel module implementing flexible NAT46"
arch=('i686' 'x86_64')
url="https://github.com/ayourtch/nat46"
license=('custom:Unknown')
depends=('dkms')
conflicts=("${_pkgbase}" "${_pkgname}")
source=("git+https://github.com/ayourtch/nat46"
		'dkms.conf')
sha256sums=('SKIP'
			'7d8f176097c9ecef2f0648069de30a6eb77a7b4294eaa68d86112a87b4f2a384')
pkgver() {
  cd "$_pkgbase"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  # Copy dkms.conf
  install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Set name and version
  sed -e "s/@_PKGBASE@/${_pkgbase}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Copy sources (including Makefile)
  cp -r ${_pkgbase}/nat46/modules/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
}