KSRC_TREE?=$(LINUX)
EXTRA_OPTIONS?=$(IB_OPTIONS)
+ifneq ($(SYSTEMD_OPTIONS),)
+ EXTRA_OPTIONS += $(SYSTEMD_OPTIONS)
+endif
+
# Packages provided for both client and server builds
IOKIT_PKG=lustre-iokit
TESTS_PKG=lustre-tests
if echo "$${DEB_BUILD_PROFILES}" | grep -q "server"; then \
export EXTRAFLAGS="--enable-server"; \
if echo "$${DEB_BUILD_PROFILES}" | grep -q "systemd"; then \
- cp debian/lustre-server-utils.install.in \
- debian/lustre-server-utils.install; \
+ systemd_dir=$$(echo $${SYSTEMD_OPTIONS} | \
+ sed -e "s/--with-systemdsystemunitdir=\///g" \
+ -e "s/\//\\\\\//g"); \
+ sed "s/lib\/systemd\/system/$${systemd_dir}/g" \
+ debian/lustre-server-utils.install.in \
+ > debian/lustre-server-utils.install; \
else \
sed /systemd/d debian/lustre-server-utils.install.in \
> debian/lustre-server-utils.install; \
else \
export EXTRAFLAGS="--disable-server"; \
if echo "$${DEB_BUILD_PROFILES}" | grep -q "systemd"; then \
- cp debian/lustre-client-utils.install.in \
- debian/lustre-client-utils.install; \
+ systemd_dir=$$(echo $${SYSTEMD_OPTIONS} | \
+ sed -e "s/--with-systemdsystemunitdir=\///g" \
+ -e "s/\//\\\\\//g"); \
+ sed "s/lib\/systemd\/system/$${systemd_dir}/g" \
+ debian/lustre-client-utils.install.in \
+ > debian/lustre-client-utils.install; \
else \
sed /systemd/d debian/lustre-client-utils.install.in \
> debian/lustre-client-utils.install; \