| 1 | Name: pcre | 
|---|
| 2 | Version: 8.12 | 
|---|
| 3 | Release: 2%{?dist} | 
|---|
| 4 | Summary: Perl-compatible regular expression library | 
|---|
| 5 | URL: http://www.pcre.org/ | 
|---|
| 6 | Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.gz | 
|---|
| 7 | License: BSD | 
|---|
| 8 | Group: System Environment/Libraries | 
|---|
| 9 |  | 
|---|
| 10 | Patch0: pcre-os2.diff | 
|---|
| 11 |  | 
|---|
| 12 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | 
|---|
| 13 | # New libtool to get rid of rpath | 
|---|
| 14 | #BuildRequires: autoconf, automake, libtool | 
|---|
| 15 |  | 
|---|
| 16 | %description | 
|---|
| 17 | Perl-compatible regular expression library. | 
|---|
| 18 | PCRE has its own native API, but a set of "wrapper" functions that are based on | 
|---|
| 19 | the POSIX API are also supplied in the library libpcreposix. Note that this | 
|---|
| 20 | just provides a POSIX calling interface to PCRE: the regular expressions | 
|---|
| 21 | themselves still follow Perl syntax and semantics. The header file | 
|---|
| 22 | for the POSIX-style functions is called pcreposix.h. | 
|---|
| 23 |  | 
|---|
| 24 | %package devel | 
|---|
| 25 | Summary: Development files for %{name} | 
|---|
| 26 | Group: Development/Libraries | 
|---|
| 27 | Requires: %{name} = %{version}-%{release} | 
|---|
| 28 |  | 
|---|
| 29 | %description devel | 
|---|
| 30 | Development files (Headers, libraries for dynamic linking, etc) for %{name}. | 
|---|
| 31 |  | 
|---|
| 32 | %package static | 
|---|
| 33 | Summary: Static library for %{name} | 
|---|
| 34 | Group: Development/Libraries | 
|---|
| 35 |  | 
|---|
| 36 | %description static | 
|---|
| 37 | Library for static linking for %{name}. | 
|---|
| 38 |  | 
|---|
| 39 | %prep | 
|---|
| 40 | %setup -q | 
|---|
| 41 | # Get rid of rpath | 
|---|
| 42 | %patch0 -p1 -b .os2~ | 
|---|
| 43 |  | 
|---|
| 44 | #libtoolize --copy --force && autoreconf | 
|---|
| 45 | # One contributor's name is non-UTF-8 | 
|---|
| 46 | #for F in ChangeLog; do | 
|---|
| 47 | #    iconv -f latin1 -t utf8 "$F" >"${F}.utf8" | 
|---|
| 48 | #    touch --reference "$F" "${F}.utf8" | 
|---|
| 49 | #    mv "${F}.utf8" "$F" | 
|---|
| 50 | #done | 
|---|
| 51 |  | 
|---|
| 52 | %build | 
|---|
| 53 | export CONFIG_SHELL="/bin/sh" | 
|---|
| 54 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \ | 
|---|
| 55 | %configure \ | 
|---|
| 56 | --disable-shared --enable-static \ | 
|---|
| 57 | --enable-newline-is-any \ | 
|---|
| 58 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache" | 
|---|
| 59 |  | 
|---|
| 60 | make %{?_smp_mflags} | 
|---|
| 61 |  | 
|---|
| 62 | %install | 
|---|
| 63 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 64 |  | 
|---|
| 65 | make install DESTDIR=$RPM_BUILD_ROOT | 
|---|
| 66 |  | 
|---|
| 67 | cp .libs/pcre_s.a $RPM_BUILD_ROOT%{_libdir} | 
|---|
| 68 | cp pcre*.dll $RPM_BUILD_ROOT%{_libdir} | 
|---|
| 69 |  | 
|---|
| 70 | # libpcre.so.*() needed by grep during system start (bug #41104) | 
|---|
| 71 | #mkdir -p $RPM_BUILD_ROOT/%{_lib} | 
|---|
| 72 | #mv $RPM_BUILD_ROOT%{_libdir}/libpcre.so.* $RPM_BUILD_ROOT/%{_lib}/ | 
|---|
| 73 | #pushd $RPM_BUILD_ROOT%{_libdir} | 
|---|
| 74 | #ln -fs ../../%{_lib}/libpcre.so.0 libpcre.so | 
|---|
| 75 | #popd | 
|---|
| 76 |  | 
|---|
| 77 | # get rid of unneeded *.la files | 
|---|
| 78 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la | 
|---|
| 79 |  | 
|---|
| 80 | # These are handled by %%doc in %%files | 
|---|
| 81 | rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre | 
|---|
| 82 |  | 
|---|
| 83 | #%check | 
|---|
| 84 | #make check | 
|---|
| 85 |  | 
|---|
| 86 | #%post -p /sbin/ldconfig | 
|---|
| 87 |  | 
|---|
| 88 | #%postun -p /sbin/ldconfig | 
|---|
| 89 |  | 
|---|
| 90 | %clean | 
|---|
| 91 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 92 |  | 
|---|
| 93 | %files | 
|---|
| 94 | %defattr(-,root,root) | 
|---|
| 95 | %{_libdir}/*.dll | 
|---|
| 96 | %{_mandir}/man1/* | 
|---|
| 97 | %{_bindir}/pcregrep.exe | 
|---|
| 98 | %{_bindir}/pcretest.exe | 
|---|
| 99 | %doc AUTHORS COPYING LICENCE NEWS README ChangeLog | 
|---|
| 100 |  | 
|---|
| 101 | %files devel | 
|---|
| 102 | %defattr(-,root,root) | 
|---|
| 103 | %{_libdir}/*.dll | 
|---|
| 104 | %{_libdir}/*.a | 
|---|
| 105 | %{_libdir}/pkgconfig/* | 
|---|
| 106 | %{_includedir}/*.h | 
|---|
| 107 | %{_mandir}/man3/* | 
|---|
| 108 | %{_bindir}/pcre-config | 
|---|
| 109 | %doc doc/*.txt doc/html | 
|---|
| 110 | %doc HACKING | 
|---|
| 111 |  | 
|---|
| 112 | %files static | 
|---|
| 113 | %defattr(-,root,root) | 
|---|
| 114 | %{_libdir}/pcre_s.a | 
|---|
| 115 | %doc COPYING LICENCE | 
|---|
| 116 |  | 
|---|
| 117 | %changelog | 
|---|