summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e02d87aceb3cfce342e196fa0dc2cbf0411e08d5 (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
pkgname=nullfs-dkms-git
pkgver=0.14.r0.gd1b683f
pkgrel=1
pkgdesc='A virtual black hole file system that behaves like /dev/null (DKMS)'
arch=('x86_64')
url='https://github.com/abbbi/nullfsvfs'
license=('GPL2')
depends=('dkms')
makedepends=('git')
conflicts=('nullfs-dkms')
provides=('nullfs')
source=('git+https://github.com/abbbi/nullfsvfs.git')
sha512sums=('SKIP')

pkgver() {
    cd nullfsvfs
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    sed -i "s/#MODULE_VERSION#/$pkgver/" nullfsvfs/debian/nullfsvfs.dkms
}

package() {
    cd nullfsvfs
    install -Dm644 debian/nullfsvfs.dkms "$pkgdir/usr/src/nullfs-$pkgver/dkms.conf"
    install -Dm644 Makefile nullfs.c -t "$pkgdir/usr/src/nullfs-$pkgver"
}