usr/src/cmd/gui-install/SUNWgui-install.spec
author Alasdair Lumsden <al@everycity.co.uk>
Tue, 16 Aug 2011 20:54:07 +0000
branchoi_151a
changeset 1398 3cd5b2156d4c
parent 37 829190321f53
permissions -rw-r--r--
imported patch oi-branding-cmd-gui-install

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#

#
# spec file for package SUNWgui-install
#
#
%include Solaris.inc

Name:                    SUNWgui-install
Summary:                Updated OpenIndiana installation GUI
Version:                 0.2
Source:                  gui-install-%{version}.tar.bz2
Source1:                 gui-install-01-locale-data.tar.bz2
Source2:		 gui-install-orchestrator-libs.tar.bz2
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
BuildRequires: SUNWgnome-libs-devel
Requires: SUNWgnome-libs

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%prep
%setup -q -n gui-install-%version
touch NEWS

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi
export CFLAGS="%optflags -DANSICPP"
export RPM_OPT_FLAGS="$CFLAGS"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export MSGFMT="/usr/bin/msgfmt"

# Switch to running configure when po directory is fixed
./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} \
            --libdir=%{_libdir}              \
            --libexecdir=%{_libexecdir}      \
            --sysconfdir=%{_sysconfdir}

make -j$CPUS 

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# contains gui-install/data/lib/locale/* and gui-install/locale/*
cd $RPM_BUILD_ROOT%{_datadir}
bzcat %SOURCE1|tar -xf -

# contains bin/dummy_install and lib/lib*
cd $RPM_BUILD_ROOT%{_prefix}
bzcat %SOURCE2|tar -xf -

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gui-install
%{_datadir}/gui-install/*

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog

* Wed Apr 26 2007 - [email protected]
- Initial spec file created