Whamcloud - gitweb
LU-11902 build: Remove obsolete lustre-utils files and entries
[fs/lustre-release.git] / debian / rules
index d7b0ea3..5913409 100755 (executable)
@@ -63,7 +63,7 @@ UPVERSION=$(shell echo $(VERSION) | sed -e 's/-[^-]*$$//')
 KVER?=$(LINUXRELEASE)
 
 # KVERS, KSRC are the kernel version and source to use when building lustre
-# Will be the default when building lustre-utils, etc but whatever module-assistant
+# Will be the default when building lustre-{server,client}-utils, etc but whatever module-assistant
 # supplied when building modules
 KVERS?=$(KVER)
 KSRC?=$(LINUX_OBJ)
@@ -158,8 +158,22 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in
        echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"
        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; \
+               else \
+                       sed /systemd/d debian/lustre-server-utils.install.in \
+                               > debian/lustre-server-utils.install; \
+               fi; \
        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; \
+               else \
+                       sed /systemd/d debian/lustre-client-utils.install.in \
+                               > debian/lustre-client-utils.install; \
+               fi; \
        fi; \
        if echo "$${DEB_BUILD_PROFILES}" | grep -q "zfs"; then \
                export EXTRAFLAGS="$${EXTRAFLAGS} --with-zfs=$${ZFS_SRC} --with-spl=$${SPL_SRC}"; \