gslx680-acpi/gslx680-acpi.spec

74 lines
2.0 KiB
RPMSpec
Raw Normal View History

Name: gslx680-acpi
Version: 0.2.1
Release: 2mamba
Summary: ACPI/x86 compatible driver for Silead GSLx680 touchscreens
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/onitake/gslx680-acpi
## GITSOURCE https://github.com/onitake/gslx680-acpi.git v0.2.1
Source: https://github.com/onitake/gslx680-acpi.git/v%{version}/gslx680-acpi-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires(post): kernelheaders
Requires(post): dkms
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
ACPI/x86 compatible driver for Silead GSLx680 touchscreens.
%prep
%setup -q
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version}
cp -a * %{buildroot}%{_prefix}/src/%{name}-%{version}/
%check
for d in /lib/modules/4.*/build; do
kver=`echo $d|sed "s|/lib/modules/\(.*\)/build.*|\1|"`
%ifnarch arm
[ "${kver/arm}" != "${kver}" ] && continue
%endif kver=`echo $d|sed "s|/lib/modules/\(.*\)/build.*|\1|"`
[ "${kver:0:3}" == "4.0" -o "${kver:0:3}" == "4.1" ] && continue
rm -f *.ko
make all KVER=${kver} KSRC=$d %{_smp_mflags}
[ -e gslx680_ts_acpi.ko ] || exit
make clean KVER=${kver} KSRC=$d
done
%preun
# erase
if [ $1 -eq 0 ]; then
dkms remove -q -m %{name} -v %{version} --all
fi
:
%post
if [ $1 -ge 1 ]; then
dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version} --force
fi
:
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_prefix}/src/%{name}-%{version}
%{_prefix}/src/%{name}-%{version}/*
%doc LICENSE
%changelog
* Wed Oct 26 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.1-2mamba
- add missing %pre and %post for dkms installation
* Sun Jul 31 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.1-1mamba
- package created using the webbuild interface