Dash:
[t2-trunk.git] / package / base / kmod / kmod.conf
blob876a87ed85d334b97c7ac441d766736bf63e0498
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/kmod/kmod.conf
3 # Copyright (C) 2014 - 2021 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 prefix=
13 set_confopt
15 # remove when zstd patch merged upstream
16 var_append makeopt ' ' 'ACLOCAL=true AUTOMAKE=true'
17 var_append makeinstopt ' ' 'ACLOCAL=true AUTOMAKE=true'
19 pkginstalled zlib    &&  var_append confopt ' ' '--with-zlib'
20 pkginstalled libxslt || var_append confopt ' ' '--disable-manpages'
21 #pkginstalled xz      && var_append confopt ' ' '--with-xz'
22 pkginstalled zstd    && var_append confopt ' ' '--with-zstd'
24 if atstage toolchain; then
25         var_append confopt " " "--with-sysroot=$sysroot"
26         xprefix=${arch_target}-
27         var_append confopt " " "--program-transform-name='s,^,$xprefix,'"
28 else
29         bindir=$sbindir
32 kmod_createlink() {
33     install -dm 755 $root/{etc,usr/lib}/{depmod,modprobe}.d
35     for f in {ins,ls,rm,dep}mod mod{probe,info}; do
36         ln -sfv ${xprefix}kmod $root$bindir/${xprefix}$f
37     done
39 hook_add postinstall 3 "kmod_createlink"