%define module ena Summary: ena kernel driver Name: scylla-%{module} Version: 2.4.0 Release: 2dkms License: GPLv2 Vendor: Intel Packager: Takuya ASADA Group: System Environment/Base BuildArch: noarch Requires: dkms gcc bash sed Source: %{module}-%{version}.tar.bz2 %description This package contains ena kernel driver meant for the DKMS framework. %prep %setup -n %{module}-%{version} -q %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/src/%{module}-%{version}/ cp -r * %{buildroot}/usr/src/%{module}-%{version} cat <<'EOS' > %{buildroot}/usr/src/%{module}-%{version}/dkms.conf PACKAGE_NAME="%{module}" PACKAGE_VERSION="%{version}" CLEAN="make -C kernel/linux/ena clean" MAKE="make -C kernel/linux/ena BUILD_KERNEL=${kernelver}" BUILT_MODULE_LOCATION[0]="kernel/linux/ena" BUILT_MODULE_NAME[0]="ena" DEST_MODULE_LOCATION[0]="/updates" DEST_MODULE_NAME[0]="ena" AUTOINSTALL="yes" EOS %clean rm -rf %{buildroot} %files %defattr(0644,root,root) %attr(0755,root,root) /usr/src/%{module}-%{version}/ #/etc/udev/rules.d/* #%attr(0755,root,root) /sbin/* %post occurrences=$(/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l) if [ ! occurrences > 0 ]; then /usr/sbin/dkms add -m %{module} -v %{version} fi /usr/sbin/dkms build -m %{module} -v %{version} /usr/sbin/dkms install -m %{module} -v %{version} exit 0 %preun /usr/sbin/dkms remove -m %{module} -v %{version} --all exit 0 %changelog * Tue Jul 21 2015 Mihael Koep 3.9.18.4.0.7-1dkms - Initial DKMS package for menable driver