diff --git a/meson.build b/meson.build index c045b3bf..906287cf 100644 --- a/meson.build +++ b/meson.build @@ -448,9 +448,20 @@ install_data( 'proto/proto.install', install_dir : join_paths(DATAROOTDIR, 'pacman')) -foreach path : [ - join_paths(LOCALSTATEDIR, 'lib/pacman/'), - join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/'), +systemd = dependency('systemd', required: false) +if systemd.found() + install_data('tmpfiles.conf', + rename: 'pacman.conf', + install_dir: systemd.get_variable(pkgconfig: 'tmpfilesdir')) + var_paths = [] +else + var_paths = [ + join_paths(LOCALSTATEDIR, 'lib/pacman/'), + join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/'), + ] +endif + +foreach path : var_paths + [ join_paths(DATAROOTDIR, 'makepkg-template/'), join_paths(DATAROOTDIR, 'libalpm/hooks/'), ] diff --git a/tmpfiles.conf b/tmpfiles.conf new file mode 100644 index 00000000..bdad4fab --- /dev/null +++ b/tmpfiles.conf @@ -0,0 +1,4 @@ +# Setup pacman data and cache directories + +d %S/pacman +d %C/pacman/pkg