summaryrefslogtreecommitdiffstats
path: root/cygwin-pcre.spec
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-02-17 22:01:32 -0600
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-02-17 22:01:32 -0600
commit7e4d13e800b8cda99355b820994e3d5e1f16959b (patch)
treecdf1fc1dcff1f2d4867c5492e01c32e268edff6a /cygwin-pcre.spec
downloadcygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.tar.gz
cygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.tar.xz
cygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.zip
8.12-1
Diffstat (limited to 'cygwin-pcre.spec')
-rw-r--r--cygwin-pcre.spec102
1 files changed, 102 insertions, 0 deletions
diff --git a/cygwin-pcre.spec b/cygwin-pcre.spec
new file mode 100644
index 0000000..8c3f318
--- /dev/null
+++ b/cygwin-pcre.spec
@@ -0,0 +1,102 @@
+%global __strip %{_cygwin_strip}
+%global __objdump %{_cygwin_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_cygwin_findrequires}
+%global __find_provides %{_cygwin_findprovides}
+%define __debug_install_post %{_cygwin_debug_install_post}
+
+Name: cygwin-pcre
+Version: 8.12
+Release: 1%{?dist}
+Summary: Cygwin pcre library
+
+Group: Development/Libraries
+License: BSD
+URL: http://www.pcre.org/
+Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{version}.tar.gz
+Patch0: pcre-8.10-multilib.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+Requires: pkgconfig
+
+BuildRequires: cygwin-filesystem
+BuildRequires: cygwin-gcc
+BuildRequires: cygwin-gcc-c++
+BuildRequires: cygwin-binutils
+
+# New libtool to get rid of rpath
+BuildRequires: autoconf, automake, libtool
+
+%{?_cygwin_debug_package}
+
+%description
+Cross compiled Perl-compatible regular expression library for use with cygwin.
+
+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 static
+Summary: Static version of the Cygwin PCRE library
+Requires: %{name} = %{version}-%{release}
+Group: Development/Libraries
+
+%description static
+Static version of the Cygwin PCRE library.
+
+
+%prep
+%setup -q -n pcre-%{version}
+
+# Get rid of rpath
+%patch0 -p1 -b .multilib
+libtoolize --copy --force && autoreconf
+# One contributor's name is non-UTF-8
+for F in ChangeLog; do
+ iconv -f latin1 -t utf8 "$F" >"${F}.utf8"
+ touch --reference "$F" "${F}.utf8"
+ mv "${F}.utf8" "$F"
+done
+
+%build
+%{_cygwin_configure} --enable-utf8 --enable-unicode-properties
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# same documentation as from native pcre
+rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/doc/*
+rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/man/*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_cygwin_bindir}/pcre-config
+%{_cygwin_bindir}/pcregrep.exe
+%{_cygwin_bindir}/pcretest.exe
+%{_cygwin_bindir}/cygpcre*.dll
+%{_cygwin_libdir}/libpcre*.dll.a
+%{_cygwin_libdir}/libpcre*.la
+%{_cygwin_libdir}/pkgconfig/libpcre*.pc
+%{_cygwin_includedir}/*.h
+%doc AUTHORS COPYING LICENCE NEWS README ChangeLog
+
+
+%files static
+%defattr(-,root,root,-)
+%{_cygwin_libdir}/libpcre.a
+%{_cygwin_libdir}/libpcrecpp.a
+%{_cygwin_libdir}/libpcreposix.a
+
+
+%changelog
+* Thu Feb 17 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 8.12-1
+- Initial spec file, largely based on mingw32-pcre.