summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a522efa401c2c40982481af09f30a04e9623dc4 (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.17.r0.g31c635b
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"
}