--- binutils.spec.orig	2015-09-30 14:48:25.000000000 +0000
+++ binutils.spec	2016-01-20 14:42:17.856037134 +0000
@@ -17,7 +17,7 @@
 %define enable_deterministic_archives 1
 
 Summary: A GNU collection of binary utilities
-Name: %{?cross}binutils%{?_with_debug:-debug}
+Name: scylla-%{?cross}binutils%{?_with_debug:-debug}
 Version: 2.25
 Release: 15%{?dist}
 License: GPLv3+
@@ -29,6 +29,7 @@
 # instead.
 
 Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
+%define _prefix /opt/scylladb
 
 Source2: binutils-2.19.50.0.1-output-format.sed
 Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
@@ -89,6 +90,9 @@
 BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
 # BZ 920545: We need pod2man in order to build the manual pages.
 BuildRequires: /usr/bin/pod2man
+
+Requires: scylla-env
+
 # Required for: ld-bootstrap/bootstrap.exp bootstrap with --static
 # It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array
 %if %{run_testsuite}
@@ -112,8 +116,8 @@
 
 %if "%{build_gold}" == "both"
 Requires(post): coreutils
-Requires(post): %{_sbindir}/alternatives
-Requires(preun): %{_sbindir}/alternatives
+Requires(post): /sbin/alternatives
+Requires(preun): /sbin/alternatives
 %endif
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
@@ -138,11 +142,12 @@
 %package devel
 Summary: BFD and opcodes static and dynamic libraries and header files
 Group: System Environment/Libraries
-Provides: binutils-static = %{version}-%{release}
+Provides: scylla-binutils-static = %{version}-%{release}
+Requires: scylla-env
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 Requires: zlib-devel
-Requires: binutils = %{version}-%{release}
+Requires: scylla-binutils = %{version}-%{release}
 # BZ 1215242: We need touch...
 Requires: coreutils
 
@@ -426,11 +431,11 @@
 %post
 %if "%{build_gold}" == "both"
 %__rm -f %{_bindir}/%{?cross}ld
-%{_sbindir}/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \
+/sbin/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \
   %{_bindir}/%{?cross}ld.bfd %{ld_bfd_priority}
-%{_sbindir}/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \
+/sbin/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \
   %{_bindir}/%{?cross}ld.gold %{ld_gold_priority}
-%{_sbindir}/alternatives --auto %{?cross}ld 
+/sbin/alternatives --auto %{?cross}ld 
 %endif
 %if %{isnative}
 /sbin/ldconfig
@@ -448,8 +453,8 @@
 %preun
 %if "%{build_gold}" == "both"
 if [ $1 = 0 ]; then
-  %{_sbindir}/alternatives --remove %{?cross}ld %{_bindir}/%{?cross}ld.bfd
-  %{_sbindir}/alternatives --remove %{?cross}ld %{_bindir}/%{?cross}ld.gold
+  /sbin/alternatives --remove %{?cross}ld %{_bindir}/%{?cross}ld.bfd
+  /sbin/alternatives --remove %{?cross}ld %{_bindir}/%{?cross}ld.gold
 fi
 %endif
 %if %{isnative}
