Whamcloud - gitweb
LU-11607 tests: create routine to get Lustre env
[fs/lustre-release.git] / debian / rules
index 216d766..c7546af 100755 (executable)
@@ -142,7 +142,7 @@ autogen-stamp: patch-stamp
 # modules, whereas the modules build omits the utilities, to create two
 # neatly separated debian files.
 #
-# Note: KERNEL_SRC, KERNEL_CFG, ZFS_SRC and SPL_SRC need to be set from the
+# Note: KERNEL_SRC, KERNEL_OBJ, ZFS_SRC and SPL_SRC need to be set from the
 # outside. This is done by "make debs". As such, invoking "debuild" or such
 # direct debian build tools will lead to a client-only build.
 configure: configure-stamp
@@ -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}"; \
@@ -181,7 +195,7 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in
        ( cd $(BUILDDIR) && \
                $(SRCDIR)/configure --disable-dependency-tracking \
                        --with-linux=$${KERNEL_SRC} \
-                       --with-linux-config=$${KERNEL_CFG} \
+                       --with-linux-obj=$${KERNEL_OBJ} \
                        --disable-snmp \
                        --enable-quota \
                        $${EXTRAFLAGS} \