CBEenv.spec
author laca
Thu, 12 Jun 2008 11:11:47 +0000
changeset 11 6769bf4088b7
parent 10 a65a967018ee
child 13 1669a54e47a8
permissions -rw-r--r--
2008-06-12 Laszlo (Laca) Peter <[email protected]> * CBEenv.spec: add cbe-env dir and preun script for deleting the env files * cbe-install: implement compiler selection and environment config files * ext-sources/env.sh: enhance to work in either source or subshell mode; use env config files for setting up compilers * ext-sources/env.csh: same again * include/CBE.inc: avoid warning when CC is unset

#
# spec file for package CBEenv
#
# Copyright 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

%include CBE.inc

Name:			CBEenv
Version:		%{?cbe_version}%{?!cbe_version:0.0}
Vendor:			Sun Microsystems, Inc.
Summary:		Desktop CBE: env setup scripts for the Desktop CBE
Source:			env.sh
Source1:                env.csh
Source2:                ld-wrapper
BuildRoot:		%{_tmppath}/%{name}-%{version}-build
SUNW_BaseDir:		%{_prefix}
SUNW_Category:          CBE,KDE,JDS,application
%include default-depend.inc

%prep
mkdir -p %name-%version

%define relroot %(echo %{_bindir} | sed -e 's,[^/][^/]*,..,g' | cut -c2-)

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp %SOURCE0 $RPM_BUILD_ROOT%{_bindir}
cp %SOURCE1 $RPM_BUILD_ROOT%{_bindir}
cp %SOURCE2 $RPM_BUILD_ROOT%{_bindir}
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
mkdir -p $RPM_BUILD_ROOT%{_libdir}/cbe-env

%if %(pkginfo -q CBEautomake && echo 0 || echo 1)
# create the "automake" symlink to automake 1.10 when using the
# Solaris default automake, because it only includes versioned
# entries in /usr/bin
test -f %{?altroot}/usr/bin/automake-1.10 && {
    cd $RPM_BUILD_ROOT%{_bindir}
    ln -s %relroot/usr/bin/automake-1.10 automake
} || {
    echo 'automake-1.10 not found'
    exit 1
}
test -f %{?altroot}/usr/bin/aclocal-1.10 && {
    cd $RPM_BUILD_ROOT%{_bindir}
    ln -s %relroot/usr/bin/aclocal-1.10 aclocal
} || {
    echo 'aclocal-1.10 not found'
    exit 1
}
%endif

%if %(pkginfo -q CBEmake && echo 0 || echo 1)
# create the "make" symlink to gmake when using SUNWgmake
GMAKE=xx
for f in /usr/gnu/bin/make /usr/bin/gmake /usr/sfw/bin/gmake; do
    test -f %{?altroot}$f && GMAKE=$f
done
if [ "x$GMAKE" == xxx ]; then
    echo 'GNU make not found, please install SUNWgmake or CBEmake'
    exit 1
fi
cd $RPM_BUILD_ROOT%{_bindir}
ln -s %relroot$GMAKE make
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%preun
rm -f $BASEDIR/lib/cbe-env/*

%files
%defattr(-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, %build_user, other) %{_libdir}/cbe-env

%changelog
* Thu Jun 12 2008  <[email protected]>
- add cbe-env dir and preun script for deleting the env files
* Wed Jun 11 2008  <[email protected]>
- update version, create symlinks for [Open]Solaris gnu make, automake, aclocal
* Mon Apr 14 2008 - [email protected]
- update deps
- use CBE.inc
* Fri Oct 14 2005  <[email protected]>
- add ld-wrapper
* Mon Sep 06 2004  <[email protected]>
- update version, fix Summary
* Mon May 24 2004  <[email protected]>
- initial version