Merge branch 'feat/tmpfiles_for_var' into 'master'
Use systemd-tmpfiles for creating /var directories on systemd systems See merge request pacman/pacman!140
This commit is contained in:
commit
d7748d32fe
2 changed files with 18 additions and 3 deletions
17
meson.build
17
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/'),
|
||||
]
|
||||
|
|
4
tmpfiles.conf
Normal file
4
tmpfiles.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Setup pacman data and cache directories
|
||||
|
||||
d %S/pacman
|
||||
d %C/pacman/pkg
|
Loading…
Add table
Reference in a new issue