Update Dutch translation
[pkg-k5-afs_openafs.git] / debian / openafs-modules-dkms.dkms
blob81b2a468392e6746135b727e0f7c69c506e05b04
1 # DKMS configuration for the OpenAFS kernel module.  -*- sh -*-
3 # For i386 and amd64, extract the architecture from the kernel version string.
4 # The version string will look like 3.2.0-4-686-pae or 3.2.0-4-amd64.  This
5 # allows building amd64 kernel modules on the i386 architecture.  Further
6 # cases like this can be added later if other architectures have similar
7 # issues.
8 ARCH=`echo "$kernelver" | cut -d- -f 3`
9 case "$ARCH" in
10   amd64)     AFS_SYSNAME="amd64_linuxXX" ;;
11   486 | 686) AFS_SYSNAME="i386_linuxXX"  ;;
12   *)         AFS_SYSNAME="UNKNOWN"       ;;
13 esac
15 # The kernel version should be part of the SYSNAME.  We really only support
16 # 2.6 and later, but be complete.
17 case "$kernelver" in
18   2.2.*)       AFS_SYSKVERS=22 ;;
19   2.4.*)       AFS_SYSKVERS=24 ;;
20   2.6.* | 3.*) AFS_SYSKVERS=26 ;;
21   *)           AFS_SYSKVERS=26 ;;
22 esac
23 AFS_SYSNAME=`echo "$AFS_SYSNAME" | sed "s/XX\$/$AFS_SYSKVERS/"`
25 # The version is replaced at build time by dh_dkms invoked in debian/rules.
26 PACKAGE_NAME="openafs"
27 PACKAGE_VERSION="#MODULE_VERSION#"
29 # General DKMS settings.
30 BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
31 DEST_MODULE_LOCATION[0]="/updates/dkms/"
32 AUTOINSTALL=yes
34 # Tell configure the sysname if we were able to determine it.
35 if [ "${AFS_SYSNAME}" = 'UNKNOWN' ] ; then
36     CONFIGURE_SYSNAME=
37 else
38     CONFIGURE_SYSNAME="--with-afs-sysname=${AFS_SYSNAME}"
41 # Set the build and clean rules.
42 MAKE[0]="(./configure --disable-linux-syscall-probing ${CONFIGURE_SYSNAME} \
43                       --with-linux-kernel-packaging                        \
44                       --with-linux-kernel-headers=${kernel_source_dir}     \
45           && make                                                          \
46           && mv src/libafs/MODLOAD-*/openafs.ko .)"
47 CLEAN="rm -f openafs.ko && make clean"