Files
harbour-core/package/harbour-win.spec.in
vszakats 306fdd0446 2013-03-15 18:27 UTC+0100 Viktor Szakats (harbour syenar.net)
* package/*
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
  * src/macro/macro.y
  * src/macro/macro.yyc
  * src/pp/hbpp.1
  * tests/*/*
  * utils/*
    * stripped svn header manually

  * tests/hbdocext.hb
  * tests/lang2po.hb
  * tests/big5_gen.prg
  * tests/uc16_gen.prg
    * do not add svn ids to generated sources

  + tests/stripsvn.hb
    + added script to strip svn header from sources
2013-03-15 18:30:08 +01:00

167 lines
5.0 KiB
RPMSpec

# ---------------------------------------------------------------
# Copyright 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl),
# Harbour-MinGW cross build RPM spec file
#
# See COPYING.txt for licensing terms.
# ---------------------------------------------------------------
######################################################################
## Definitions.
######################################################################
%define name harbour-win
%define version 3.2.0
%define releasen dev
# Workaround for the problem of /usr/bin/strip not handling PE binaries.
%define hb_ccpath /opt/xmingw/bin
%define hb_ccpref i386-mingw-
%define __strip %{hb_ccpath}/%{hb_ccpref}strip
%define __objdump %{hb_ccpath}/%{hb_ccpref}objdump
######################################################################
## Preamble.
######################################################################
Summary: Free software Clipper compatible compiler
Summary(pl): Darmowy kompilator kompatybilny z językiem Clipper.
Name: %{name}
Version: %{version}
Release: %{releasen}
License: GPL (plus exception)
Group: Development/Languages
URL: http://harbour-project.org/
Source: harbour-%{version}.src.tar.gz
BuildPrereq: gcc binutils bash
Requires: gcc binutils bash sh-utils harbour = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}
BuildRoot: /tmp/%{name}-%{version}-root
%define _noautoreq 'libharbour.*'
%description
Harbour is a CA-Cl*pper compatible compiler for multiple platforms. This
package includes a compiler, pre-processor, header files, virtual machine
and libraries for creating MS-Windows application in Linux box using MinGW
GCC port.
%description -l pl
Harbour to kompatybilny z językiem CA-Cl*pper kompilator rozwijany na
wielu różnych platformach. Ten pakiet zawiera kompilator, preprocesor,
zbiory nagłówkowe, wirtualn+ maszynę oraz biblioteki pozwalaj+ce na
tworzenie aplikacji dla WinCE-PocketPC przy użyciu MinGW-CE GCC.
######################################################################
## Preperation.
######################################################################
%prep
%setup -c harbour
rm -fR $RPM_BUILD_ROOT
######################################################################
## Build.
######################################################################
%build
export HB_BUILD_CONTRIBS=no
export HB_PLATFORM=linux
export HB_COMPILER=gcc
make %{?_smp_mflags}
unset HB_COMPILER
unset HB_BUILD_CONTRIBS
export HB_BUILD_PARTS=lib
export HB_PLATFORM=win
export HB_HOST_BIN="$(pwd)/bin/linux/gcc"
make %{?_smp_mflags}
######################################################################
## Install.
######################################################################
%install
# Install harbour itself.
unset HB_COMPILER
export HB_BUILD_PARTS=lib
export HB_PLATFORM=win
export HB_HOST_BIN="$(pwd)/bin/linux/gcc"
export HB_INSTALL_PKG_ROOT=${RPM_BUILD_ROOT}
export HB_INSTALL_PREFIX=${RPM_BUILD_ROOT}
export HB_INSTALL_BIN=${RPM_BUILD_ROOT}/%{_bindir}
export HB_INSTALL_INC=${RPM_BUILD_ROOT}/%{_includedir}/%{name}
export HB_INSTALL_LIB=${RPM_BUILD_ROOT}/%{_libdir}/%{name}
export HB_INSTALL_DYN=${HB_INSTALL_LIB}
export HB_INSTALL_DOC=no
export HB_BUILD_STRIP=lib
mkdir -p $HB_INSTALL_BIN
export HB_MK2WRAP=$HB_INSTALL_BIN/hbwmk2
export HB_INSTALL_SCRIPT=$HB_MK2WRAP.tmp
echo "#!/bin/sh" > $HB_INSTALL_SCRIPT
echo "echo export HB_CCPREFIX=\$HB_CCPREFIX >> $HB_MK2WRAP" > $HB_INSTALL_SCRIPT
chmod +x $HB_INSTALL_SCRIPT
echo "#!/bin/sh" > $HB_MK2WRAP
echo "export HB_INSTALL_LIB=%{_libdir}/%{name}" >> $HB_MK2WRAP
echo "export HB_INSTALL_INC=%{_includedir}/%{name}" >> $HB_MK2WRAP
make install %{?_smp_mflags}
echo "hbmk2 -plat=win -comp=mingw \"\$@\"" >> $HB_MK2WRAP
rm -fR $HB_INSTALL_SCRIPT
######################################################################
## Post install
######################################################################
#%post lib
#/sbin/ldconfig
######################################################################
## Post uninstall
######################################################################
#%postun lib
#/sbin/ldconfig
######################################################################
## Clean.
######################################################################
%clean
rm -fR $RPM_BUILD_ROOT
######################################################################
## File list.
######################################################################
%files
%defattr(755,root,root,755)
%{_bindir}/*
%defattr(644,root,root,755)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.a
%defattr(755,root,root,755)
%{_libdir}/%{name}/*.dll
######################################################################
## Spec file Changelog.
######################################################################
%changelog
* Thu Oct 23 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
- initial release