anbox-modules-dkms/anbox-modules-dkms.spec

69 lines
1.9 KiB
RPMSpec

%define gittag %(echo %version | cut -d. -f4)
Name: anbox-modules-dkms
Version: 5.19.20220911git.2325d6fe
Release: 1mamba
Summary: Android kernel driver in DKMS format
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/choff/anbox-modules
Source: https://github.com/choff/anbox-modules.git/master@%{gittag}/anbox-modules-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires(post):dkms
%description
Android kernel driver in DKMS format.
%prep
%setup -q -n anbox-modules-%{version}
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m0755 %{buildroot}/usr/src/ashmem-%{version}
install -d -m0755 %{buildroot}/usr/src/binder-%{version}
cp -r ashmem/* %{buildroot}/usr/src/ashmem-%{version}
cp -r binder/* %{buildroot}/usr/src/binder-%{version}
install -D -m0644 99-anbox.rules %{buildroot}%{_udevrulesdir}/99-anbox.rules
install -D -m0644 anbox.conf %{buildroot}%{_modulesloaddir}/anbox.conf
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%preun
for p in ashmem binder; do
dkms remove -q -m ${p} -v %{version} --all
done
:
%posttrans
if [ $1 -ge 1 ]; then
for p in ashmem binder; do
dkms add -q -m ${p} -v %{version}
dkms install -q -m ${p} -v %{version} --force
done
fi
:
%files
%defattr(-,root,root)
%dir /usr/src/ashmem-%{version}
/usr/src/ashmem-%{version}/*
%dir /usr/src/binder-%{version}
/usr/src/binder-%{version}/*
%{_udevrulesdir}/99-anbox.rules
%{_modulesloaddir}/anbox.conf
%changelog
* Sat Oct 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.19.20220911git.2325d6fe-1mamba
- update to 5.19.20220911git.2325d6fe
* Sat Oct 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.19-1mamba
- package created using the webbuild interface