]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: rpm: introduce _remote_tarball_prefix macro
authorNathan Cutler <ncutler@suse.com>
Sat, 25 Nov 2017 17:45:58 +0000 (18:45 +0100)
committerNathan Cutler <ncutler@suse.com>
Wed, 24 Jan 2018 16:16:26 +0000 (17:16 +0100)
With this macro, we can use a single Source0 line for all supported distros.
RH/CentOS/Fedora needs the prefix, while SUSE builds in the OBS use a local
tarball.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
ceph.spec.in

index 947db58190eae9bf434402656bfa23cd1d13657a..412dadaa672207201175b42c6840233a6c627c61 100644 (file)
@@ -28,6 +28,7 @@
 %bcond_without cephfs_java
 %bcond_with lowmem_builder
 %bcond_without lttng
+%global _remote_tarball_prefix https://download.ceph.com/tarballs/
 %endif
 %if 0%{?suse_version}
 %bcond_with selinux
@@ -36,7 +37,7 @@
 %bcond_without lowmem_builder
 #Compat macro for new _fillupdir macro introduced in Nov 2017
 %if ! %{defined _fillupdir}
-  %define _fillupdir /var/adm/fillup-templates
+%global _fillupdir /var/adm/fillup-templates
 %endif
 %if 0%{?is_opensuse}
 %bcond_without lttng
@@ -84,8 +85,9 @@ License:      LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and
 Group:         System/Filesystems
 %endif
 URL:           http://ceph.com/
-Source0:       https://download.ceph.com/tarballs/@TARBALL_BASENAME@.tar.bz2
+Source0:       %{?_remote_tarball_prefix}@TARBALL_BASENAME@.tar.bz2
 %if 0%{?suse_version}
+# _insert_obs_source_lines_here
 %if 0%{?is_opensuse}
 ExclusiveArch:  x86_64 aarch64 ppc64 ppc64le
 %else