Drop dependency on systemd-devel
This commit is contained in:
parent
4b0e9bb739
commit
24f2d27292
|
@ -0,0 +1,38 @@
|
|||
--- plocate-1.1.8-c3da113/meson.build~ 2021-06-12 14:27:21.000000000 +0200
|
||||
+++ plocate-1.1.8-c3da113/meson.build 2021-06-21 16:54:09.389472902 +0200
|
||||
@@ -76,16 +76,18 @@
|
||||
configuration: conf_data)
|
||||
install_man(updatedb_conf_man)
|
||||
|
||||
+unitdir = get_option('systemdunitdir')
|
||||
if get_option('install_systemd')
|
||||
- systemd = dependency('systemd', required: false)
|
||||
- if systemd.found()
|
||||
- unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
- updatedb_service = configure_file(input: 'plocate-updatedb.service.in',
|
||||
- output: 'plocate-updatedb.service',
|
||||
- configuration: conf_data)
|
||||
- install_data(updatedb_service, install_dir: unitdir)
|
||||
- install_data('plocate-updatedb.timer', install_dir: unitdir)
|
||||
- endif
|
||||
+ if unitdir == ''
|
||||
+ systemd = dependency('systemd', required: true)
|
||||
+ unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
+ endif
|
||||
+
|
||||
+ updatedb_service = configure_file(input: 'plocate-updatedb.service.in',
|
||||
+ output: 'plocate-updatedb.service',
|
||||
+ configuration: conf_data)
|
||||
+ install_data(updatedb_service, install_dir: unitdir)
|
||||
+ install_data('plocate-updatedb.timer', install_dir: unitdir)
|
||||
endif
|
||||
|
||||
# Requires having TurboPFor checked out, so not built by default.
|
||||
--- plocate-1.1.8-c3da113/meson_options.txt~ 2021-06-12 14:27:21.000000000 +0200
|
||||
+++ plocate-1.1.8-c3da113/meson_options.txt 2021-06-21 16:54:18.807580758 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
option('install_cron', type: 'boolean', value: false, description: 'Install mlocate conversion script into /etc/cron.daily')
|
||||
option('install_systemd', type: 'boolean', value: true, description: 'Install systemd service and timer for updatedb, if systemd is installed')
|
||||
+option('systemdunitdir', type: 'string', description: 'Install systemd units here (default: autodetect')
|
||||
option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file')
|
||||
option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb')
|
|
@ -9,9 +9,12 @@ Source0: https://git.sesse.net/?p=plocate;a=snapshot;h=%{version};sf=tgz#
|
|||
%global shortcommit c3da113
|
||||
Source1: plocate.sysusers
|
||||
|
||||
# Submitted upstream via mail
|
||||
Patch1: meson-patch1.diff
|
||||
|
||||
BuildRequires: meson
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(liburing)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: libatomic
|
||||
|
@ -31,7 +34,7 @@ mlocate in nearly all aspects, and is fast on SSDs and non-SSDs alike.
|
|||
%autosetup -n plocate-%{version}-%{shortcommit} -p1
|
||||
|
||||
%build
|
||||
%meson
|
||||
%meson -Dsystemdunitdir=%_unitdir
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
|
|
Loading…
Reference in New Issue