Whamcloud - gitweb
move .debs into /debs
authorBrian J. Murrell <brian.murrell@oracle.com>
Mon, 18 Oct 2010 18:10:46 +0000 (14:10 -0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Mon, 18 Oct 2010 22:17:42 +0000 (02:17 +0400)
Move the built .debs from .. into a /debs subdir of the build tree.
We in fact could almost make debian/rules do this using dh_builddeb's
--destdir argument, however dpkg-genchanges wants to find them in ..
and there is no way to pass dpkg-genchange's -u argument to it from
dpkg-buildpackage.  So thus, our hack.

build/autoMakefile.am.toplevel

index b5d8898..079cbf0 100644 (file)
@@ -164,6 +164,7 @@ debs:
                        rm -f $$file; \
                done; \
        fi
+       rm -rf debs
        dpkg-buildpackage || { \
                rc=$${PIPESTATUS[0]}; \
                [ $${rc} -gt 1 ] && exit $${rc}; \
@@ -173,7 +174,7 @@ debs:
        version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
        rm -rf debian/tmp/modules-deb && \
        mkdir debian/tmp/modules-deb && \
-       cd debian/tmp/modules-deb && \
+       pushd debian/tmp/modules-deb && \
        dpkg -x ../../../../lustre-source_$${version}_all.deb $$(pwd) && \
        mkdir usr_src/ && \
        tar -C usr_src/ -xjf usr/src/lustre.tar.bz2 && \
@@ -183,4 +184,8 @@ debs:
        ln -s /usr/share/modass/packages/ usr_share_modass/ && \
        echo "lustre" > usr_share_modass/compliant.list && \
        export MA_DIR=$$(pwd)/usr_share_modass && \
-       m-a build $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre
+       m-a build $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \
+       popd && \
+       VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog); \
+       mkdir -p debs && \
+       mv ../liblustre_$${VER}_*.deb ../linux-patch-lustre_$${VER}_all.deb ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb ../lustre-tests_$${VER}_*.deb ../lustre-utils_$${VER}_*.deb ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes ../lustre_$${VER}.tar.gz ../lustre-client-modules-$${KVERS}_$${VER}_*.deb debs/