]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: make make-{deb,rpm}.sh aware of cmake
authorNathan Cutler <ncutler@suse.com>
Tue, 23 Aug 2016 09:34:04 +0000 (11:34 +0200)
committerRicardo Dias <rdias@suse.com>
Wed, 24 Aug 2016 13:38:17 +0000 (14:38 +0100)
Fixes: http://tracker.ceph.com/issues/16819
Signed-off-by: Ricardo Dias <rdias@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
tasks/buildpackages/make-deb.sh
tasks/buildpackages/make-rpm.sh

index db9df06ffb5259e41e35bd0b555531a9aaca3fea..1e5600e7cfe0976d79565163272949fc69f5461b 100755 (executable)
@@ -64,32 +64,40 @@ function build_package() {
     # included in the distribution.
     #
     git clean -qdxff
-    #
-    # creating the distribution tarbal requires some configure
-    # options (otherwise parts of the source tree will be left out).
-    #
-    ./autogen.sh
-    # Building with LTTNG on Ubuntu Precise is not possible.
-    # It fails the LTTNG-is-sane check (it misses headers)
-    # And the Debian rules files leave it out anyway
-    case $codename in
-       precise) lttng_opt="--without-lttng" ;;
-       *) lttng_opt="--with-lttng" ;;
-    esac
-    ./configure $(flavor2configure $flavor) \
-        --with-rocksdb --with-ocf \
-        --with-nss --with-debug --enable-cephfs-java \
-        $lttng_opt --with-babeltrace
-    #
-    # use distdir= to set the name of the top level directory of the
-    # tarbal to match the desired version
-    #
-    make distdir=ceph-$vers dist
+
+    fileext="gz"
+    # autotools only works in jewel and below
+    if [[ ! -e "make-dist" ]] ; then
+        #
+        # creating the distribution tarbal requires some configure
+        # options (otherwise parts of the source tree will be left out).
+        #
+        ./autogen.sh
+        # Building with LTTNG on Ubuntu Precise is not possible.
+        # It fails the LTTNG-is-sane check (it misses headers)
+        # And the Debian rules files leave it out anyway
+        case $codename in
+           precise) lttng_opt="--without-lttng" ;;
+           *) lttng_opt="--with-lttng" ;;
+        esac
+        ./configure $(flavor2configure $flavor) \
+            --with-rocksdb --with-ocf \
+            --with-nss --with-debug --enable-cephfs-java \
+            $lttng_opt --with-babeltrace
+        #
+        # use distdir= to set the name of the top level directory of the
+        # tarbal to match the desired version
+        #
+        make distdir=ceph-$vers dist
+    else
+      ./make-dist
+      fileext="bz2"
+    fi
     #
     # rename the tarbal to match debian conventions and extract it
     #
-    mv ceph-$vers.tar.gz $releasedir/ceph_$vers.orig.tar.gz
-    tar -C $releasedir -zxf $releasedir/ceph_$vers.orig.tar.gz
+    mv ceph-$vers.tar.$fileext $releasedir/ceph_$vers.orig.tar.$fileext
+    tar -C $releasedir -xf $releasedir/ceph_$vers.orig.tar.$fileext
     #
     # copy the debian directory over
     #
index f44efc432076f88537cecea6776d1c59b0587199..6e566a347dff802c6b77bd76924f3c355e600fe4 100755 (executable)
@@ -91,13 +91,28 @@ function build_package() {
     else
         sudo yum install -y bzip2
     fi
-    ./autogen.sh
-    ./configure $(flavor2configure $flavor) --with-debug --with-radosgw --with-fuse --with-libatomic-ops --with-gtk2 --with-nss
-    #
-    # use distdir= to set the name of the top level directory of the
-    # tarbal to match the desired version
-    #
-    make dist-bzip2
+    # autotools only works in jewel and below
+    if [[ ! -e "make-dist" ]] ; then
+        ./autogen.sh
+        ./configure $(flavor2configure $flavor) --with-debug --with-radosgw --with-fuse --with-libatomic-ops --with-gtk2 --with-nss
+
+        #
+        # use distdir= to set the name of the top level directory of the
+        # tarbal to match the desired version
+        #
+        make dist-bzip2
+    else
+        ##
+        # make-dist script suffixes the tarball with full version info,
+        # these transformations change version info to only include
+        # version number as is required by the ceph.spec file
+        #
+        cat make-dist \
+          | sed -e '0,/^outfile=/s//ver=`echo $version | cut -d - -f 1-1`\n&/' \
+          | sed -e 's/^\(outfile="ceph-$ver\)sion"/\1"/g' \
+                -e 's/\(--prefix ceph-$ver\)sion/\1/g' \
+          | sh
+    fi
     # Set up build area
     setup_rpmmacros
     if [ "$suse" = true ] ; then