Commit 22a495fc authored by David Johnson's avatar David Johnson

Add the mpt3sas driver.

parent 895fece6
......@@ -3,10 +3,10 @@ PKGTYPE ?= $(shell scripts/osstuff.sh -p)
DRIVERS =
ifeq ($(PKGTYPE),deb)
DRIVERS = i40e i40evf ixgbe ixgbevf
DRIVERS = i40e i40evf ixgbe ixgbevf mpt3sas
endif
ifeq ($(PKGTYPE),rpm)
DRIVERS = i40e i40evf ixgbe ixgbevf
DRIVERS = i40e i40evf ixgbe ixgbevf mpt3sas
endif
INSTALL_DRIVERS := $(addsuffix -install,$(DRIVERS))
......
NAME = mpt3sas
PKGNAME = $(NAME)-dkms
VERSION ?= 26.00.00.00
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION)-src.tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
mpt3sas-dkms (26.00.00.00-0) unstable; urgency=medium
* mpt3sas 26.00.00.00 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Thu, 06 Sep 2018 08:40:28 -0600
mpt3sas-dkms (2.4.6-0) unstable; urgency=medium
* mpt3sas 2.4.6 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Wed, 05 Sep 2018 14:17:02 -0600
Source: mpt3sas-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: mpt3sas-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the mpt3sas driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install \
build/mpt3sas/* \
usr/src/mpt3sas-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="mpt3sas-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="mpt3sas"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module mpt3sas
%define name %{module}-dkms
%define version 26.00.00.00
%define release 0
%define srcdirname %{module}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}-src.tar.gz
Summary: DKMS version of the mpt3sas kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the mpt3sas kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 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
* Thu Sep 06 2018 David M. Johnson <johnsond@flux.utah.edu> 26.00.00.00-0
- Initial release of DKMS version of the mpt3sas kernel module.
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