%define prefix %{_prefix} Summary: Perl-Compatible Regular Expression library and pcregrep Name: pcre Version: 3.7 Release: 3 Source: ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/%{name}-%{version}.tar.bz2 Source1: IBM_ILA Patch0: %{name}-%{version}-aix.patch Patch1: %{name}-%{version}-CAN-2005-2491.patch URL: http://www.pcre.org License: IBM_ILA Group: System Environment/Libraries BuildRoot: /var/tmp/%{name}-%{version}-root %define DEFCC cc %description PCRE stands for the Perl-Compatible Regular Expression library. It contains routines to match text against regular expressions similar to perl's. It also contains a library with a POSIX-compatible regex interface, and the pcregrep utility, which is a grep that lets you use perl-compatible regular expressions. %package devel Summary: Static library and header files for pcre development Group: Development/Libraries %description devel This package contains the pcre static libraries and the header files required to develop pcre-based applications. %prep %setup -q %patch0 -p0 -b .aix %patch1 -p0 -b .aix # Add license info cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat LICENCE >> LICENSE %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi CC=gcc CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-static %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install chmod +x $RPM_BUILD_ROOT%{prefix}/lib/lib*.a strip $RPM_BUILD_ROOT%{prefix}/bin/* || : strip $RPM_BUILD_ROOT%{prefix}/lib/lib*.a || : #make links ( cd $RPM_BUILD_ROOT for dir in bin include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done ) %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog LICENSE README doc/Tech.Notes %{prefix}/lib/lib*.a %{prefix}/bin/pcregrep %attr(-,root,root) %{prefix}/man/man3/* %attr(-,root,root) %{prefix}/man/man1/* #links /usr/lib/lib*.a /usr/bin/pcregrep %files devel %defattr(-,root,root) %doc LICENSE %{prefix}/bin/pcre-config %{prefix}/include/* %{prefix}/lib/lib*.a %{prefix}/lib/lib*.la #links /usr/bin/pcre-config /usr/include/* /usr/lib/lib*.a /usr/lib/lib*.la %changelog * Thu Feb 16 2006 Reza Arbab - Add patch for CAN-2005-2491. * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Tue Jun 25 2002 Chris Tysor - Update to 3.7 * Fri May 4 2001 Reza Arbab - Modified for AIX freeware distribution. * Sat Sep 23 2000 Wayne Davison [3.4-1] - Added %{prefix} to allow easy prefix changes. - Got rid of the separate pgrep rpm, instead installing pcregrep (its new name) in the default rpm. - Edited the summary and description text. - Upped the version number and fixed the license value. * Sun Jul 30 2000 Arne Coucheron [3.2-1] - added a devel package - added support for compiling in multiprocessor environment * Fri Nov 05 1999 Arne Coucheron [2.08-1] - using name and version macros - changed Group to comply with RH 6.x - using make install - using install -d instead of mkdir -p - removing RPM_BUILD_ROOT before installing - some changes in the files section * Fri May 28 1999 Damien Miller - Built RPMs