Skip to content

Commit

Permalink
system-upgrade: fix pkgconfig systemd variable
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode authored and kontura committed Mar 19, 2024
1 parent 6de05b3 commit e8c5901
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ BuildRequires: pkgconfig(zck) >= %{zchunk_version}
%if %{with systemd}
BuildRequires: pkgconfig(sdbus-c++) >= 0.8.1
BuildRequires: systemd-devel

# We need to get the SYSTEMD_SYSTEM_UNIT_DIR from
# /usr/share/pkgconfig/systemd.pc
BuildRequires: systemd
%endif

%if %{with html} || %{with man}
Expand Down
4 changes: 2 additions & 2 deletions dnf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ if(NOT WITH_DNF5)
return()
endif()

pkg_check_modules(SYSTEMD REQUIRED systemd)
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)

find_package(Threads)

Expand Down Expand Up @@ -59,6 +57,8 @@ install(DIRECTORY "config/usr/" DESTINATION "${CMAKE_INSTALL_PREFIX}" PATTERN ".
install(DIRECTORY "config/etc/" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" PATTERN ".gitkeep" EXCLUDE)

if(WITH_SYSTEMD)
pkg_check_modules(SYSTEMD REQUIRED systemd)
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
install(DIRECTORY "config/systemd/system/" DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}" PATTERN ".gitkeep" EXCLUDE)
endif()

Expand Down

0 comments on commit e8c5901

Please sign in to comment.