mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 06:47:13 +08:00
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
# Platform Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
|
|
# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
|
|
#
|
|
|
|
pkgname=dkms
|
|
pkgver=2.2.0.3
|
|
pkgrel=12
|
|
pkgdesc='Dynamic Kernel Modules System'
|
|
arch=('x86_64')
|
|
url='http://linux.dell.com/dkms/'
|
|
license=('GPL2')
|
|
depends=('linux-headers' 'kmod' 'sh')
|
|
backup=('etc/dkms/framework.conf')
|
|
source=("http://linux.dell.com/$pkgname/permalink/$pkgname-$pkgver.tar.gz"
|
|
"$pkgname.service"
|
|
"$pkgname.systemd"
|
|
"$pkgname.default"
|
|
'01-broken-uninstall.patch')
|
|
md5sums=('11a8aaade2ebec2803653837c7593030'
|
|
'02e9744e3fdc3d2f68e46966fb32e260'
|
|
'267632312aa52a190ec0db0758920dd3'
|
|
'33be2fbf1bcc1b3fb2f38d9e7eaa809d'
|
|
'4e3a580c09b5af8de7ffde0b61bdcfcf')
|
|
|
|
build() {
|
|
patches=("$srcdir"/*.patch)
|
|
cd $pkgname-$pkgver
|
|
for p in "${patches[@]}"; do
|
|
msg2 "Apply patch: ${p##*/}"
|
|
patch -p1 -i "$p"
|
|
done
|
|
}
|
|
|
|
package() {
|
|
# upstream installer
|
|
pushd $pkgname-$pkgver
|
|
make DESTDIR="$pkgdir" install
|
|
popd
|
|
# fix hardcoded paths
|
|
sed -i "s|/sbin/depmod|depmod|" $pkgdir/usr/sbin/dkms
|
|
# remove debian specific
|
|
rm -r "$pkgdir/etc/kernel"
|
|
# move bash completion in right place
|
|
install -d -m 755 "$pkgdir/usr/share/bash-completion"
|
|
mv "$pkgdir/etc/bash_completion.d" "$pkgdir/usr/share/bash-completion/completions"
|
|
# add systemd
|
|
install -D -m 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
|
install -D -m 755 $pkgname.systemd "$pkgdir/usr/lib/systemd/scripts/$pkgname"
|
|
install -D -m 644 $pkgname.default "$pkgdir/etc/default/$pkgname"
|
|
}
|
|
|