The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/rpm/redhat/zfs-kmod.spec.in

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 %bcond_with     debug
    2 %bcond_with     debuginfo
    3 
    4 Name:           @PACKAGE@-kmod
    5 Version:        @VERSION@
    6 Release:        @RELEASE@%{?dist}
    7 
    8 Summary:        Kernel module(s)
    9 Group:          System Environment/Kernel
   10 License:        @ZFS_META_LICENSE@
   11 URL:            https://github.com/openzfs/zfs
   12 BuildRequires:  %kernel_module_package_buildreqs
   13 Source0:        @PACKAGE@-%{version}.tar.gz
   14 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
   15 
   16 # Additional dependency information for the kmod sub-package must be specified
   17 # by generating a preamble text file which kmodtool can append to the spec file.
   18 %(/bin/echo -e "\
   19 Requires:       @PACKAGE@ = %{version}\n\
   20 Conflicts:      @PACKAGE@-dkms)
   21 
   22 # LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
   23 %ifarch ppc ppc64 ppc64le aarch64
   24 %global __global_ldflags %{nil}
   25 %endif
   26 
   27 %description
   28 This package contains the ZFS kernel modules.
   29 
   30 %define kmod_name @PACKAGE@
   31 
   32 %kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble
   33 
   34 %define ksrc %{_usrsrc}/kernels/%{kverrel}
   35 %define kobj %{ksrc}
   36 
   37 %package -n kmod-%{kmod_name}-devel
   38 Summary:        ZFS kernel module(s) devel common
   39 Group:          System Environment/Kernel
   40 
   41 %description -n  kmod-%{kmod_name}-devel
   42 This package provides the header files and objects to build kernel modules.
   43 
   44 %prep
   45 if ! [ -d "%{ksrc}"  ]; then
   46         echo "Kernel build directory isn't set properly, cannot continue"
   47         exit 1
   48 fi
   49 
   50 %if %{with debug}
   51 %define debug --enable-debug
   52 %else
   53 %define debug --disable-debug
   54 %endif
   55 
   56 %if %{with debuginfo}
   57 %define debuginfo --enable-debuginfo
   58 %else
   59 %define debuginfo --disable-debuginfo
   60 %endif
   61 
   62 %setup -n %{kmod_name}-%{version}
   63 %build
   64 %configure \
   65         --with-config=kernel \
   66         --with-linux=%{ksrc} \
   67         --with-linux-obj=%{kobj} \
   68         %{debug} \
   69         %{debuginfo} \
   70         %{?kernel_cc} \
   71         %{?kernel_ld} \
   72         %{?kernel_llvm}
   73 make %{?_smp_mflags}
   74 
   75 %install
   76 make install \
   77         DESTDIR=${RPM_BUILD_ROOT} \
   78         INSTALL_MOD_DIR=extra/%{kmod_name}
   79 %{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.*
   80 
   81 # find-debuginfo.sh only considers executables
   82 %{__chmod} u+x  %{buildroot}/lib/modules/%{kverrel}/extra/*/*
   83 
   84 %clean
   85 rm -rf $RPM_BUILD_ROOT
   86 
   87 %files -n kmod-%{kmod_name}-devel
   88 %{_usrsrc}/%{kmod_name}-%{version}

Cache object: e073594c211e9dea507aaee636bdecf5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.