File volla-yggdrasil-helpers.spec of Package volla-yggdrasil-helpers
#
# spec file for package volla-yggdrasil-helpers
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: volla-yggdrasil-helpers
Version: 0.0.1
Release: 1%{?dist}
Summary: Necessary Volla Phone files
License: GPL-2.0-only AND GPL-3.0-or-later
URL: https://gitlab.com/slem.os/%{name}
Source0: boot.img
Source1: dtbo.img
Source2: 71-yggdrasil.rules
Source3: modules.tar.xz
Source4: volla-yggdrasil-modules.conf
Source5: wifi-fix.service
Source6: gsi-info
Source7: vendor.tar.xz
Source8: arm_droid_card_custom.pa
BuildRequires: pam
BuildRequires: systemd-rpm-macros
BuildRequires: pulseaudio
Requires: distribution-logos-openSUSE
Requires: distribution-logos-openSUSE-icons
Requires: phosh
Requires: phoc-hwcomposer
#FIXME: Do not work with DualSim
#Requires: ofono-config-ril-binder-dualsim
Requires: calls-ofono
Requires: timekeeper
ExclusiveArch: aarch64
%description
Shell independent setup helpers for the Volla Phone.
Includes configuration scripts system setup and other required files.
%prep
%build
%pre
%service_add_pre wifi-fix.service
%service_add_pre power-button.service
%post
%service_add_post wifi-fix.service
%service_add_post power-button.service
%preun
%service_del_preun wifi-fix.service
%service_del_preun power-button.service
%postun
%service_del_postun wifi-fix.service
%service_del_postun power-button.service
%install
%{__install} -Dm0644 -t %{buildroot}/boot/ %{SOURCE0} %{SOURCE1}
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE2}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/modules-load.d/ %{SOURCE4}
%{__install} -Dm0644 -t %{buildroot}%{_unitdir} %{SOURCE5}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/ %{SOURCE6}
mkdir -p %{buildroot}/usr/lib/
xz -cd %{SOURCE3} | tar -xof - -C %{buildroot}/usr/lib/
# Needed libraries and files for Volla vendor folder
mkdir -p %{buildroot}/opt/mobile/
%{__install} -Dm0644 -t %{buildroot}/opt/mobile/ %{SOURCE7}
%{__install} -Dm0644 -t %{buildroot}/etc/pulse/ %{SOURCE8}
%files
/boot/boot.img
/boot/dtbo.img
%{_udevrulesdir}/71-yggdrasil.rules
%dir /usr/lib/modules/
%dir /usr/lib/modules/4.4-0-volla-yggdrasil
/usr/lib/modules/4.4-0-volla-yggdrasil/*
%dir %{_sysconfdir}/modules-load.d/
%{_sysconfdir}/modules-load.d/volla-yggdrasil-modules.conf
%{_unitdir}/
%{_sysconfdir}/gsi-info
/opt/mobile/
/etc/pulse/
%changelog