Friday, October 17, 2008

Scons for Solaris - lol, no really..

Due to popular demand, here is a spec file to build Scons for SXCE and Solaris 10.
OpenSolaris is useless for building anything past HTML thus I don't care if it does not work on OpenSolaris.

Thanks for everyones feedback on my last post.
The following can be build as follows; N.B. you will need CBE installed.

First save the below file in a file called EVOscons.spec
Then follows this;

Intel(r) Pentium(r) Dual CPU E2180 @ 2.00GHz
[edward@SXCE-Workstation]:/export/home/edward:~>/opt/dtbld/bin/env.sh
Desktop CBE version 1.7.0-rc1 built on 2008-10-07 by edward@SXCE-Workstation
Unsetting ORBIT_SOCKETDIR
Unsetting DTSOURCEPROFILE
Unsetting SDT_NO_TOOLTALK
Unsetting GTK_RC_FILES
Unsetting WINDOWID
Unsetting DTHELPSEARCHPATH
Unsetting USER
Unsetting DTDEVROOT
Unsetting OPENWINHOME
Unsetting DTXSERVERLOCATION
Unsetting XMBINDDIR
Unsetting GNOME_KEYRING_SOCKET
Unsetting SESSION_SVR
Unsetting HELPPATH
Unsetting START_SPECKEYSD
Unsetting LANG
Unsetting GNOME_KEYRING_PID
Unsetting DTAPPSEARCHPATH
Unsetting SDT_NO_DTDBCACHE
Unsetting XFILESEARCHPATH
Unsetting VTE_CJK_WIDTH
Unsetting SESSIONTYPE
Unsetting DTSCREENSAVERLIST
Unsetting GNOME_DESKTOP_SESSION_ID
Unsetting G_FILENAME_ENCODING
Unsetting AB_CARDCATALOG
Unsetting DTDATABASESEARCHPATH
Unsetting XMICONSEARCHPATH
Unsetting DTUSERSESSION
Unsetting XMICONBMSEARCHPATH
Unsetting G_BROKEN_FILENAMES
Unsetting dtstart_sessionlogfile
Unsetting COLORTERM
Using CC=/usr/bin/cc
Using CXX=/usr/bin/CC
Setting PATH=/opt/dtbld/bin:/usr/ccs/bin:/usr/gnu/bin:/usr/bin:/usr/sbin:/bin:/usr/sfw/bin
Setting CONFIG_SHELL=/bin/bash
Setting MAKESHELL=/bin/bash
Setting MAKE=/opt/dtbld/bin/make
Setting M4=/opt/dtbld/bin/m4
Starting subshell /bin/ksh93 -p
$pkgtool -v --pkgformat=ds build-only EVOscons.spec


------------------------ Start of EVOscons.spec --------------------------------
#
# spec file for package EVOscons.spec
#
# includes module(s): SCons
#
%include Solaris.inc

%define src_name scons
%define src_url http://waix.dl.sourceforge.net/sourceforge

Name: EVOCscons
Summary: Substitute for the classic Make utility.
Version: 1.0.1
Release: 1
Source: %{src_url}/%{src_name}/%{src_name}-%{version}.tar.gz
SUNW_BaseDir: %{_basedir}
Vendor: Refer URL
URL: http://ultravioletos.blogspot.com/
Packager: EdwardOCallaghan
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: SUNWPython
BuildRequires: SUNWPython-devel

%include default-depend.inc

%prep
%ifarch sparc
echo "Sorry no sparc version yet! - Need testing.."
exit 1
%endif

%setup -q -n scons-%version

%build
# python bootstrap.py build/scons
python setup.py build --build-base=$RPM_BUILD_ROOT%{_prefix}

%install
rm -rf $RPM_BUILD_ROOT
python setup.py install --prefix=$RPM_BUILD_ROOT%{_prefix}
mkdir $RPM_BUILD_ROOT%{_datadir}
mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/scons-*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man*/*

%changelog
* Fri Sep 10 2008 - edwardoc _@_ blastwave.org
- Initial version

------------------------ End of EVOscons.spec --------------------------------

Thanks,
Edward.

3 comments:

UX-admin said...

"OpenSolaris is useless for building anything past HTML thus I don't care if it does not work on OpenSolaris."

It was about time. I applaud you for standing up and writing the truth. Finally somebody had the guts to write it.

Pilli said...

Hi.

"OpenSolaris is useless for building anything past HTML thus I don't care if it does not work on OpenSolaris."

Why? I newbie with Solaris and I don't know what version install. I doubt between OpenSolaris and SXDE.

Thanks.

.:: Aurora ::. said...

Hi pilli,

Yes, I would recommend you install SXCE (latest snv_101 as of today).

Then grab SS12 and install that with all the latest patches.
Also, grab CBE1.7RC and install that too.

Some info there for installing CBE;
http://techbase.kde.org/Projects/KDE_on_Solaris

Your good to go then.

Thanks,
Edward.