Commit 180f0e17 authored by Natanael Copa's avatar Natanael Copa

main/kmod: fix libkmod.so symlink and split completion

parent 80a11752
......@@ -2,18 +2,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=kmod
pkgver=21
pkgrel=0
pkgrel=1
pkgdesc="Linux kernel module management utilities"
url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary"
arch="all"
license="GPL2+"
depends=""
depends_dev=""
makedepends="$depends_dev zlib-dev xz-dev libxslt tar"
# gnu sed is needed for symlink
makedepends="$depends_dev zlib-dev xz-dev libxslt"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs
$pkgname-bash-completion:completion"
source="http://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-$pkgver.tar.xz
strndupa.patch"
strndupa.patch
sed-ere.patch
"
_builddir="$srcdir"/kmod-$pkgver
prepare() {
......@@ -31,6 +35,7 @@ build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--bindir=/bin \
--with-rootlibdir=/lib \
--with-zlib \
......@@ -47,7 +52,9 @@ package() {
for i in lsmod rmmod insmod modinfo modprobe depmod; do
ln -sf ../bin/kmod "$pkgdir"/sbin/$i || return 1
done
rm -f "$pkgdir"/usr/lib/*.la
for i in lsmod modinfo; do
ln -s kmod "$pkgdir"/bin/$i || return 1
done
}
libs() {
......@@ -56,9 +63,20 @@ libs() {
mv "$pkgdir"/lib "$subpkgdir"/
}
completion() {
install_if="bash $pkgname=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/ \
|| return 1
}
md5sums="ee246fab2e1cba9fbdcad6a86ec31531 kmod-21.tar.xz
a347d68599a0ab4c2abd53c89271cf67 strndupa.patch"
a347d68599a0ab4c2abd53c89271cf67 strndupa.patch
4b43b9727c2e2ad322725309cab8d21c sed-ere.patch"
sha256sums="160a9448af74cf75b08d089f37a3e8d1fafa75cce92d1cbe869a753b670d95c0 kmod-21.tar.xz
aea9bdad0e6d0c6c5d9c3f1fe1f84f85babcd52b3077336552ae73ccbc4b0a36 strndupa.patch"
aea9bdad0e6d0c6c5d9c3f1fe1f84f85babcd52b3077336552ae73ccbc4b0a36 strndupa.patch
b0c96ffc1c4366ce21ca2e69e19db9baf67179d06c291f9365040fa3f8a8be39 sed-ere.patch"
sha512sums="93d9c7eda3a04ed94c6531087614d92b5a65a2e642bd3af017a3a8a458a78a5a57acb1707e35bf3a0aa8f22ab0fa99d34cf4e7dd568f202a18eb49fb52bf78c1 kmod-21.tar.xz
f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch"
f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch
26de5e14389f779754c13fd01d290f9b06a053f3ec7e4e48d8ca9a3423b783d392c333d50586c679420d55814d3ec0e1f02bcd2a7d848beab0ad9a738ac4f88d sed-ere.patch"
--- ./Makefile.in.orig
+++ ./Makefile.in
@@ -2816,7 +2816,7 @@
if test "$(libdir)" != "$(rootlibdir)"; then \
$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \
- so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+ so_img_rel_target_prefix=$$(echo $(libdir) | sed -E 's,(^/|)[^/][^/]*,..,g') && \
ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \
mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment