mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
Autotools to install systemd unit files.
To simplify the spec file we should install as much using autotools and as little as possible in the spec file. Signed-off-by: Owen Synge <osynge@suse.com>
This commit is contained in:
parent
d6213b61ab
commit
1ba4694d7e
1
.gitignore
vendored
1
.gitignore
vendored
@ -54,6 +54,7 @@ release
|
||||
stamp-h1
|
||||
systemd/ceph-osd@.service
|
||||
systemd/ceph-rgw.tmpfiles.d
|
||||
systemd/Makefile
|
||||
vgcore.*
|
||||
|
||||
# specific local dir files
|
||||
|
@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = gnu
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh
|
||||
# the "." here makes sure check-local builds gtest and gmock before they are used
|
||||
SUBDIRS = . src man doc
|
||||
SUBDIRS = . src man doc systemd
|
||||
|
||||
EXTRA_DIST += \
|
||||
src/test/run-cli-tests \
|
||||
|
@ -482,6 +482,12 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
|
||||
--prefix=/usr \
|
||||
--localstatedir=/var \
|
||||
--sysconfdir=/etc \
|
||||
%if 0%{?rhel} || 0%{?fedora}
|
||||
--with-systemd-libexec-dir=/usr/lib/systemd/system \
|
||||
%endif
|
||||
%if 0%{?opensuse} || 0%{?suse_version}
|
||||
--with-systemdsystemunitdir=%_unitdir \
|
||||
%endif
|
||||
--docdir=%{_docdir}/ceph \
|
||||
--with-man-pages \
|
||||
--mandir="%_mandir" \
|
||||
|
29
configure.ac
29
configure.ac
@ -1197,6 +1197,7 @@ AC_ARG_WITH(
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl rgw-user
|
||||
AC_SUBST(user_rgw)
|
||||
AC_ARG_WITH(
|
||||
@ -1218,7 +1219,6 @@ AC_ARG_WITH(
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl rgw-group
|
||||
AC_SUBST(group_rgw)
|
||||
AC_ARG_WITH(
|
||||
@ -1241,6 +1241,32 @@ AC_ARG_WITH(
|
||||
)
|
||||
|
||||
|
||||
AC_SUBST(systemd_unit_dir)
|
||||
AC_ARG_WITH(
|
||||
systemd-unit-dir,
|
||||
AS_HELP_STRING(
|
||||
[--with-systemdsystemunitdir=DIR],
|
||||
[systemd unit directory @<:@SYSTEMD_UNIT_DIR@:>@
|
||||
Defaults to the correct value for debian /etc/systemd/system/]
|
||||
),
|
||||
[
|
||||
systemd_unit_dir="$withval"
|
||||
],
|
||||
[
|
||||
# default to the systemd admin unit directory
|
||||
which pkg-config
|
||||
pkg_config_exists=$?
|
||||
if test x"$pkg_config_exists" = x"0"; then
|
||||
systemd_unit_dir=`pkg-config systemd --variable=systemdsystemunitdir`
|
||||
else
|
||||
systemd_unit_dir="/etc/systemd/system/"
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
#AC_HEADER_STDBOOL
|
||||
#AC_C_CONST
|
||||
@ -1301,6 +1327,7 @@ AC_CONFIG_FILES([Makefile
|
||||
src/ocf/rbd
|
||||
src/java/Makefile
|
||||
src/tracing/Makefile
|
||||
systemd/Makefile
|
||||
man/Makefile
|
||||
doc/Makefile
|
||||
systemd/ceph-osd@.service
|
||||
|
11
systemd/Makefile.am
Normal file
11
systemd/Makefile.am
Normal file
@ -0,0 +1,11 @@
|
||||
unitfiles = \
|
||||
ceph.target \
|
||||
ceph-mds@.service \
|
||||
ceph-mon@.service \
|
||||
ceph-osd@.service
|
||||
|
||||
unitdir = $(systemd_unit_dir)
|
||||
|
||||
unit_DATA = $(unitfiles)
|
||||
|
||||
EXTRA_DIST = $(unitfiles)
|
Loading…
Reference in New Issue
Block a user