[mingw-libgnurx: 2/15] Initial import

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 19:20:10 UTC 2012


commit f6e7f68b1ee8997e9c7c4d1087fc4ca4c1cc20f5
Author: epienbro <epienbro at fedoraproject.org>
Date:   Tue Jun 2 14:58:37 2009 +0000

    Initial import

 .cvsignore                           |    1 +
 mingw32-libgnurx-Makefile.am         |    8 +++
 mingw32-libgnurx-configure.ac        |   12 ++++
 mingw32-libgnurx-honor-destdir.patch |   26 +++++++++
 mingw32-libgnurx.spec                |  104 ++++++++++++++++++++++++++++++++++
 sources                              |    1 +
 6 files changed, 152 insertions(+), 0 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index e69de29..a407e3e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+mingw-libgnurx-2.5.1-src.tar.gz
diff --git a/mingw32-libgnurx-Makefile.am b/mingw32-libgnurx-Makefile.am
new file mode 100644
index 0000000..30afd11
--- /dev/null
+++ b/mingw32-libgnurx-Makefile.am
@@ -0,0 +1,8 @@
+lib_LTLIBRARIES = libgnurx.la
+
+libgnurx_la_SOURCES = regex.c
+libgnurx_la_includedir = $(includedir)
+libgnurx_la_include_HEADERS = regex.h
+libgnurx_la_CFLAGS = -I$(top_srcdir)
+libgnurx_la_LDFLAGS = -no-undefined -version-info 0:0:0 -export-dynamic
+
diff --git a/mingw32-libgnurx-configure.ac b/mingw32-libgnurx-configure.ac
new file mode 100644
index 0000000..9a642e8
--- /dev/null
+++ b/mingw32-libgnurx-configure.ac
@@ -0,0 +1,12 @@
+# configure.ac  -*- Autoconf -*-
+# Process this file with autoconf, to generate a configure script.
+
+AC_INIT(libgnurx, 2.5.1)
+AM_INIT_AUTOMAKE
+AC_PROG_INSTALL
+AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AC_OUTPUT([Makefile])
+
diff --git a/mingw32-libgnurx-honor-destdir.patch b/mingw32-libgnurx-honor-destdir.patch
new file mode 100644
index 0000000..2a2e879
--- /dev/null
+++ b/mingw32-libgnurx-honor-destdir.patch
@@ -0,0 +1,26 @@
+--- Makefile.in.orig	2009-05-24 20:09:25.598720854 +0200
++++ Makefile.in	2009-05-24 20:10:24.541471779 +0200
+@@ -78,16 +78,16 @@
+ install: install-dll @install_dev@
+ 
+ install-dll:
+-	mkdir -p ${bindir}
+-	cp -p $(BINDIST_FILES) ${bindir}
++	mkdir -p $(DESTDIR)${bindir}
++	cp -p $(BINDIST_FILES) $(DESTDIR)${bindir}
+ 
+ install-dev:
+-	mkdir -p ${includedir} ${libdir}
+-	cp -p ${srcdir}/regex.h ${includedir}
+-	cp -p $(DEVDIST_FILES) ${libdir}
++	mkdir -p ${includedir} $(DESTDIR)${libdir}
++	cp -p ${srcdir}/regex.h $(DESTDIR)${includedir}
++	cp -p $(DEVDIST_FILES) $(DESTDIR)${libdir}
+ 	for s in 3 7; do \
+-	  mkdir -p ${mandir}/man$$s; \
+-	  gzip -c ${srcdir}/regex.$$s > ${mandir}/man$$s/regex.$$s.gz; \
++	  mkdir -p $(DESTDIR)${mandir}/man$$s; \
++	  gzip -c ${srcdir}/regex.$$s > $(DESTDIR)${mandir}/man$$s/regex.$$s.gz; \
+ 	done
+ 
+ dist:	 bindist devdist srcdist
diff --git a/mingw32-libgnurx.spec b/mingw32-libgnurx.spec
new file mode 100644
index 0000000..a371dc3
--- /dev/null
+++ b/mingw32-libgnurx.spec
@@ -0,0 +1,104 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+
+Name:           mingw32-libgnurx
+Version:        2.5.1
+Release:        2%{?dist}
+Summary:        MinGW Regex library
+
+License:        LGPLv2+
+Group:          Development/Libraries
+URL:            http://mingw.sourceforge.net/
+Source0:        http://kent.dl.sourceforge.net/sourceforge/mingw/mingw-libgnurx-%{version}-src.tar.gz
+Source1:        mingw32-libgnurx-configure.ac
+Source2:        mingw32-libgnurx-Makefile.am
+Patch0:         mingw32-libgnurx-honor-destdir.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  autoconf automake libtool
+BuildRequires:  mingw32-filesystem >= 23
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+
+%description
+MinGW Windows regular expression library.
+
+
+%package static
+Summary:        Static version of the MinGW Windows regular expression library
+Requires:       %{name} = %{version}-%{release}
+Group:          Development/Libraries
+
+%description static
+Static version of the MinGW Windows regular expression library.
+
+
+%prep
+%setup -q -n mingw-libgnurx-%{version}
+%patch0 -p0
+
+# The Makefile which is delivered with this package can't create static
+# libraries and misnames the resulting import libraries
+# So replace the buildsystem by a more proper one
+cp %{SOURCE1} configure.ac
+cp %{SOURCE2} Makefile.am
+touch NEWS
+touch AUTHORS
+libtoolize --copy
+aclocal
+autoconf
+automake --add-missing
+
+%build
+%{_mingw32_configure} --enable-static --enable-shared
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# make install expects %{_mingw32_includedir} to exist
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# make install installs two import libraries named libgnurx.a and
+# libgnurx.dll.a. As most applications requiring regex functions
+# try to perform 'gcc -lregex' we rename the import libraries for this to work
+mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libgnurx.a $RPM_BUILD_ROOT%{_mingw32_libdir}/libregex.a
+mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libgnurx.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}/libregex.dll.a
+mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libgnurx.la $RPM_BUILD_ROOT%{_mingw32_libdir}/libregex.la
+
+# Drop the man pages
+rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/man
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files 
+%defattr(-,root,root,-)
+%doc COPYING.LIB
+%{_mingw32_bindir}/libgnurx-0.dll
+%{_mingw32_includedir}/regex.h
+%{_mingw32_libdir}/libregex.dll.a
+%{_mingw32_libdir}/libregex.la
+
+%files static
+%defattr(-,root,root,-)
+%{_mingw32_libdir}/libregex.a
+
+
+%changelog
+* Tue May 26 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.5.1-2
+- Fixed license tag
+
+* Sun May 24 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.5.1-1
+- Initial release
+
diff --git a/sources b/sources
index e69de29..7511325 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+35c8fed3101ca1f253e9b6b1966661f6  mingw-libgnurx-2.5.1-src.tar.gz


More information about the scm-commits mailing list