Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:fstrba:argonone
argononed
argononed.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File argononed.spec of Package argononed
# # spec file for package argononed # # 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/ # %{!?aarch64:%global aarch64 aarch64 arm64 armv8} %define _systemdshutdowndir %{_unitdir}/../system-shutdown Name: argononed Version: 0.4.1 Release: 0 Summary: Argon One Daemon License: MIT URL: https://gitlab.com/DarkElvenAngel/argononed Source0: %{name}-%{version}.tar.xz Patch0: 0001-Override-unit-dir-for-opensuse.patch Patch1: 0002-Change-SHUTDOWN_PATH.patch Patch2: 0003-Add-DESTDIR-in-order-to-be-able-to-use-in-rpm-build.patch Patch3: 0004-fix-getdistro.sh.patch BuildRequires: bash BuildRequires: dtc BuildRequires: filesystem BuildRequires: gcc BuildRequires: make BuildRequires: openSUSE-release BuildRequires: systemd BuildRequires: udev Requires: i2c-tools Requires: libi2c0 ExclusiveArch: %{aarch64} %{arm} %systemd_requires %description A replacement daemon for the Argon One Raspberry Pi cases, and the Argon Artik Fan Hat. %prep %setup -q %patch -P 0 -p1 %patch -P 1 -p1 %patch -P 2 -p1 %patch -P 3 -p1 %build bash configure %make_build echo "i2c-dev" >i2c.conf %install %make_install install -dm 0755 %{buildroot}%{_sysconfdir}/modules-load.d install -pm 0644 i2c.conf %{buildroot}%{_sysconfdir}/modules-load.d/10-i2c.conf install -dm 0755 %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 0755 ./OS/_common/argonone-cli-complete.bash %{buildroot}%{_sysconfdir}/bash_completion.d/argonone-cli %pre %service_add_pre argononed.service export FILE=/boot/efi/config.txt if [ -e "$FILE" ]; then [ -w "$FILE" ] || { echo "ERROR Cannot Write to ${FILE} unable to continue"; exit 1; } SYSMODEL=$( awk '{ print $0 }' /proc/device-tree/model | sed 's|Raspberry Pi||;s|Rev.*||;s|Model||;s|Zero|0|;s|Plus|+|;s|B| |;s|A| |;s| ||g' ) echo -n "Search config.txt for overlay ... " grep -i '^dtoverlay=argonone' $FILE 1> /dev/null && { echo "FOUND"; exit 0; } || echo "NOT FOUND" cp $FILE $FILE.backup echo -n "Insert overlay into ${FILE} ... " if [[ `grep -i "^\[pi${SYSMODEL}\]" $FILE` ]] then sed -i "/^\[pi${SYSMODEL}\]/a dtoverlay=argonone" $FILE && echo "DONE"; else echo "dtoverlay=argonone" >> $FILE && echo "DONE"; fi exit 0 fi %post %service_add_post argononed.service %preun %service_del_preun argononed.service %postun %service_del_postun argononed.service if [ $1 -eq 0 ]; then export FILE=/boot/efi/config.txt if [ -e "$FILE" ]; then echo "Remove dtoverlay=argonone from ${FILE}" cp ${FILE} ${FILE}.argonone.backup sed -i '/dtoverlay=argonone/d' ${FILE} echo "Uninstall Complete" fi fi %files %{_bindir}/argonone-cli %{_sbindir}/argononed %{_unitdir}/argononed.service %dir %{_systemdshutdowndir} %{_systemdshutdowndir}/argonone.shutdown %{_sysconfdir}/bash_completion.d/argonone-cli %{_sysconfdir}/modules-load.d/10-i2c.conf %dir /boot/efi %dir /boot/efi/overlays /boot/efi/overlays/argonone.dtbo %license LICENSE %doc CHANGELOG.md NOTES.md README.md %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor