Skip to content

Commit

Permalink
Update specfile to include config from release dir
Browse files Browse the repository at this point in the history
  • Loading branch information
r0x0d committed Dec 16, 2024
1 parent 2236c27 commit 72cc1cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packaging/command-line-assistant.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ A simple wrapper to interact with RAG

# Create sbin directory in buildroot
%{__install} -d %{buildroot}/%{_sbindir}
%{__install} -d %{buildroot}/%{_sysconfdir}/xdg/%{python_package_src}

# Move the daemon to /usr/sbin instead of /usr/bin
%{__install} -m 0755 %{buildroot}/%{_bindir}/%{daemon_binary_name} %{buildroot}/%{_sbindir}/%{daemon_binary_name}
Expand All @@ -52,6 +53,9 @@ A simple wrapper to interact with RAG
# System units
%{__install} -D -m 0644 data/release/%{daemon_binary_name}.service %{buildroot}/%{_unitdir}/%{daemon_binary_name}.service

# Config file
%{__install} -D -m 0644 data/release/config.toml %{buildroot}/%{_sysconfdir}/xdg/%{python_package_src}/config.toml

%files
%doc README.md
%license LICENSE
Expand All @@ -61,8 +65,13 @@ A simple wrapper to interact with RAG
# Binaries
%{_bindir}/%{binary_name}
%{_sbindir}/%{daemon_binary_name}

# System units
%{_unitdir}/%{daemon_binary_name}.service

# Config file
%config %{_sysconfdir}/xdg/%{python_package_src}/config.toml

%preun
if [ "$1" -eq 0 ]; then
systemctl stop %{daemon_binary_name}.service || :
Expand Down

0 comments on commit 72cc1cc

Please sign in to comment.