Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: chromebook usbc fix #2203

Merged
merged 9 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions anda/system/chromebook-usbc-fix/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
project pkg {
rpm {
spec = "chromebook-usbc-fix.spec"
}
labels {
nightly = "1"
}
}
49 changes: 49 additions & 0 deletions anda/system/chromebook-usbc-fix/chromebook-usbc-fix.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
%global commit_date 20241005

%global commit cef28b120a39fd459c5864d51c4ad52ecaaf25a0
%global shortcommit %(c=%{commit}; echo ${c:0:7})

%global debug_package %{nil}
%define __os_install_post %{nil}

Name: chromebook-usbc-fix
Version: %commit_date.%shortcommit
Release: 1%?dist

License: CCO
Summary: Fixes usbc on TigerLake and AlderLake Chromebooks
URL: https://github.com/Ultramarine-Linux/chromebook-usbc-fix
Source: %url/archive/%{commit}/chromebook-usbc-fix-%{commit}.tar.gz
Packager: Owen Zimmerman <[email protected]>

%{?systemd_requires}
BuildRequires: systemd-rpm-macros

%description
%summary

%prep
%autosetup -n chromebook-usbc-fix-%commit

%install
install -Dm755 chromebook-usbc.service %buildroot%{_unitdir}/chromebook-usbc.service

%post
%systemd_post 88-ultramarine-chromebook-default.preset

%preun
%systemd_preun 88-ultramarine-chromebook-default.preset

%postun
%systemd_postun_with_restart 88-ultramarine-chromebook-default.preset

%files
%doc README.md
%license LICENSE
%{_unitdir}/chromebook-usbc.service

%changelog
* Sat Oct 12 2024 Owen-sz <[email protected]>
- Fix the systemd preset application
* Sat Oct 5 2024 Owen-sz <[email protected]>
- Initial package.
8 changes: 8 additions & 0 deletions anda/system/chromebook-usbc-fix/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if filters.contains("nightly") {
rpm.global("commit", gh_commit("Ultramarine-Linux/chromebook-usbc-fix"));
if rpm.changed() {
rpm.release();
rpm.global("commit_date", date());
}
}

Loading