summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 01b1a0bed44edb278610220330b7e0ca08431206 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Sick Codes <info at sick dot codes>

pkgname=qnx-modules-dkms
_pkgname=${pkgname%-*}
pkgver=r9.11df204
arch="$(uname -r)"
url='https://github.com/sickcodes/qnx-modules'
pkgrel=1
pkgdesc='QNX4 and QNX6 FileSystem Types as Kernel Modules (dkms). BlackBerry qnxfs compatible.'
arch=('x86_64' 'aarch64' 'i386')
license=('GPL3')
provides=("${_pkgname}")
depends=('dkms')
makedepends=('git')
source=("git+${url}.git"#commit=1b6659cef9b285d9393ed95b6a6bf6acc67f0460)
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# prepare() {
#   cd "${srcdir}/${_pkgname}"
# }

package() {
  
  cd "${srcdir}/${_pkgname}"

  install -Ddm755 "${pkgdir}/usr/src/qnx4-${pkgver}/"
  install -Ddm755 "${pkgdir}/usr/src/qnx6-${pkgver}/"

  cp -dr --preserve=ownership "${srcdir}/${_pkgname}/qnx4/"* "${pkgdir}/usr/src/qnx4-${pkgver}/"
  cp -dr --preserve=ownership "${srcdir}/${_pkgname}/qnx6/"* "${pkgdir}/usr/src/qnx6-${pkgver}/"

  cd "${srcdir}/${_pkgname}/qnx4"
  make
  make DESTDIR="${pkgdir}/usr/src/qnx4-${pkgver}/" install

  cd "${srcdir}/${_pkgname}/qnx6"
  make
  make DESTDIR="${pkgdir}/usr/src/qnx6-${pkgver}/" install

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

  sed -e "s/@_PKGBASE@/qnx6/" \
      -e "s/@PKGVER@/${pkgver}/" \
         "${pkgdir}/usr/src/qnx6-${pkgver}/dkms.conf"

  echo '** To activate qnx4 and/or qnx6 **
# $ sudo modprobe qnx4
# $ sudo modprobe qnx6'
  
}

# sudo modprobe qnx4 qnx6

# vim:set ts=2 sw=2 et: