File cross-sh4-pcre.spec of Package cross-sh4-pcre
#
# spec file for package pcre (Version 7.1)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: cross-sh4-pcre
BuildRequires: gcc-c++
BuildRequires: cross-sh4-kernel-headers cross-sh4-glibc cross-sh4-gcc
Version: 7.1
Release: 1
Summary: A library for Perl-compatible regular expressions
License: BSD License and BSD-like, Other uncritical OpenSource License
Group: System/Libraries
Autoreqprov: off
Provides: cross-sh4-pcre
URL: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
Source: pcre-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package devel
Summary: A library for Perl-compatible regular expressions
Autoreqprov: off
Provides: cross-sh4-pcre-devel
Group: System/Libraries
Requires: cross-sh4-pcre
%if "%{name}" != "pcre"
%define TARGET %(echo %{name}|sed -e "s/cross-\\(.*\\)-pcre/\\1/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%define _prefix /opt/cross/%{TARGET}-linux/sys-root/usr
%define _lib lib
%else
%define _prefix
%endif
%define HOST %(echo %{_target_cpu}|sed -e "s/parisc/hppa/" -e "s/i.86/i586/" -e "s/ppc/powerpc/")-suse-linux
%description
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics as Perl
5, with very few differences. The current implementation corresponds to
Perl 5.005.
Authors:
--------
Philip Hazel <ph10@cam.ac.uk>
%description devel
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics as Perl
5, with very few differences. The current implementation corresponds to
Perl 5.005.
Authors:
--------
Philip Hazel <ph10@cam.ac.uk>
%prep
#%setup -D -T -q -n pcre-%version
%setup -D -q -n pcre-%version
%build
#export CFLAGS="$RPM_OPT_FLAGS -fstack-protector"
#export CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector"
#export CFLAGS="-fstack-protector"
#export CXXFLAGS="-fstack-protector"
bash
CC=%TARGET-linux-gcc ./configure --mandir=$RPM_BUILD_ROOT/%_mandir \
--prefix=$RPM_BUILD_ROOT/%_prefix \
--libdir=$RPM_BUILD_ROOT/%_libdir \
--includedir=$RPM_BUILD_ROOT/%_prefix/include \
--host=%TARGET-linux \
--with-link-size=2 \
--with-match-limit=10000000 \
--enable-newline-is-lf \
--enable-utf8
CC=%TARGET-gcc make
export LANG=POSIX
#%ifarch %arm
#make test || echo make test failed
#%else
#make test
#%endif
%install
#make DESTDIR=$RPM_BUILD_ROOT install
make install
%define _defaultdocdir %_prefix/share/doc/packages
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}
mv $RPM_BUILD_ROOT/%_prefix/share/doc/pcre $RPM_BUILD_ROOT/%{_defaultdocdir}/cross-sh4-pcre
gzip $RPM_BUILD_ROOT/%_mandir/man1/*
gzip $RPM_BUILD_ROOT/%_mandir/man3/*
%clean
#rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL LICENCE NEWS NON-UNIX-USE README
%doc doc/html doc/*.txt
%_libdir/*.so.*
%_prefix/bin/pcregrep
%_prefix/bin/pcretest
%_mandir/man1/*.gz
%files devel
%defattr(-,root,root)
%_prefix/bin/pcre-config
%_prefix/include/*
%_libdir/*.so
%_libdir/*.a
%_libdir/*.la
%_libdir/pkgconfig/libpcre.pc
%_libdir/pkgconfig/libpcrecpp.pc
%_mandir/man3/*.gz
%changelog -n cross-sh4-pcre