Blob Blame History Raw
Name: pcre
Version: 3.4
Release: 2
Summary: Perl-compatible regular expression library
URL: http://www.pcre.org/
Source: ftp://ftp.sourceforge.net/projects/pcre/%{name}-%{version}.tar.bz2
License: GPL
Group: System Environment/Libraries
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-root

%description
Perl-compatible regular expression library.
PCRE has its own native API, but a set of "wrapper" functions that are based on
the POSIX API are also supplied in the library libpcreposix. Note that this
just provides a POSIX calling interface to PCRE: the regular expressions
themselves still follow Perl syntax and semantics. The header file
for the POSIX-style functions is called pcreposix.h.

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Development files (Headers, libraries for static linking, etc) for %{name}.

%prep
%setup
%configure --includedir=%{_includedir}/%{name}

%build
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/lib
mv $RPM_BUILD_ROOT%{_libdir}/libpcre.so* $RPM_BUILD_ROOT/lib
sed -e "s,/usr/lib,/lib,g" $RPM_BUILD_ROOT%{_libdir}/libpcre.la >$RPM_BUILD_ROOT/lib/libpcre.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libpcre.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/lib/*.so.*
%{_libdir}/*.so.*
%{_mandir}/man1/*
%{_bindir}/pcregrep

%files devel
%defattr(-,root,root)
/lib/*.so
/lib/*.la
%{_libdir}/*.so
%{_libdir}/*.la
%{_libdir}/*.a
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_mandir}/man3/*
%{_bindir}/pcre-config

%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}

%changelog
* Thu May 17 2001 Bernhard Rosenkraenzer <bero@redhat.com> 3.4-2
- Move libpcre to /lib, grep uses it these days (#41104)

* Wed Apr 18 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Move this to a separate package, used to be in kdesupport, but it's
  generally useful...