rosbe-1.4-1kkr2009.0.spec

%define distname   RosBE-Unix
%define name       rosbe
%define version    1.4
%define release    %mkrel 1


Summary:        ReactOS Build Environment for Unix-compatible operating system
Summary(ja):    Unix互換オペレーティングシステム向けのReactOSビルド環境
Name:           %{name}
Version:        %{version}
Release:        %{release}
Source:         http://downloads.sourceforge.net/reactos/%{distname}-%{version}.tar.bz2
  # Size  : 39,914,026
  # MD5   : fd63e6ad11b2bc64c995ce6a6e7bc849
  # SHA-1 : 287e562a5d1c5589cc63a9b1a20dc98149e4f3ff
URL:            http://www.reactos.org/wiki/index.php/Build_Environment
License:        GPLv2+ LGPLv2
Group:          Development/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:  bison flex texinfo rosbe-data
Requires:       rosbe-data xdg-user-dirs


%description
RosBE is an official Build Environment to build ReactOS.

%description -l ja
RosBEはReactOSをビルドするための公式のビルド環境です。


%prep
%setup -q -n %{distname}-%{version}
# disable user check
%{__sed} -i 's:\[ ! "`whoami`" = "root" \]:false:' scripts/rosbelibrary.sh
# default shortcut dir improvement
%{__sed} -i 's:$HOME/Desktop:$(xdg-user-dir DESKTOP):' scripts/createshortcut.sh
# don't process mingw-runtime and w32api here
%{__sed} -i \
	-e 's:\(	process_mingwruntime=\)true:\1false:' \
	-e 's:\(	process_w32api=\)true:\1false:' RosBE-Builder.sh
# make non-interactive / set directories
%{__sed} -i \
	-e 's:read -p "\[$DEFAULT_INSTALL_DIR\] " installdir:installdir="%{buildroot}/%{_prefix}/RosBE":' \
	-e 's:^read$::' \
	-e 's:\(configure\) --prefix="$installdir:\1 --libdir=%{_prefix}/RosBE/$TARGET_ARCH/%{_lib} --prefix="%{_prefix}/RosBE:' \
	-e 's:\(makecmd install\):\1 DESTDIR=%{buildroot} INSTALLROOT=%{buildroot}:' RosBE-Builder.sh
# avoid "sys-include" problem while building GCC
%{__sed} -i \
	-e 's:\(cd "gcc\-build"\):%{__sed} -i \"s/sys-\\\(include\\\)/\\1/g\" %{_builddir}/%{distname}-%{version}/sources/gcc/{,gcc/}Makefile.in %{_builddir}/%{distname}-%{version}/sources/gcc/{,gcc/}configure\n\t\1:' RosBE-Builder.sh
# don't strip here
%{__sed} -i 's:	strip "$file":true:' RosBE-Builder.sh
# space needed?
%{__sed} -i 's:"\(\-\-with\-gcc\):" \1:' RosBE-Builder.sh
# don't detect existing RosBE
%{__sed} -i 's:\[ -f "/usr/RosBE/RosBE-Version" \]:false:' RosBE-Builder.sh


%install
%{__rm} %{buildroot} -fr
./RosBE-Builder.sh
%{__lzma} README


%clean
%{__rm} %{buildroot} -fr


%files
%defattr(-, root, root)
%{_prefix}/RosBE/
%doc README.*


%changelog
* Wed Feb 18 2009 kakurasan <kakurasan AT gmail DOT com> 1.4-1kkr2009.0
- initial build