[expat21/el5] initial import (#1094038)
Björn Esser
besser82 at fedoraproject.org
Mon May 5 12:48:14 UTC 2014
commit 07f62d365d5ef09a2caaeb8c570cd945fb2d2ee6
Author: Björn Esser <bjoern.esser at gmail.com>
Date: Mon May 5 14:47:27 2014 +0200
initial import (#1094038)
.gitignore | 1 +
expat-2.1.0-xmlwfargs.patch | 14 +++++
expat21.spec | 133 +++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 149 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0568b8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/expat-2.1.0.tar.gz
diff --git a/expat-2.1.0-xmlwfargs.patch b/expat-2.1.0-xmlwfargs.patch
new file mode 100644
index 0000000..f539bed
--- /dev/null
+++ b/expat-2.1.0-xmlwfargs.patch
@@ -0,0 +1,14 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=948534
+
+--- expat-2.1.0/xmlwf/xmlwf.c.xmlwfargs
++++ expat-2.1.0/xmlwf/xmlwf.c
+@@ -634,7 +634,7 @@ static void
+ usage(const XML_Char *prog, int rc)
+ {
+ ftprintf(stderr,
+- T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] "
++ T("usage: %s [-s] [-n] [-p] [-x] [-w] [-d output-dir] [-c] [-m] [-r] [-t] [-v] "
+ "[-e encoding] file ...\n"), prog);
+ exit(rc);
+ }
diff --git a/expat21.spec b/expat21.spec
new file mode 100644
index 0000000..b44e373
--- /dev/null
+++ b/expat21.spec
@@ -0,0 +1,133 @@
+%global orig_name expat
+%global compat_ver 21
+
+Name: %{orig_name}%{compat_ver}
+Version: 2.1.0
+Release: 1%{?dist}
+Summary: An XML parser library
+%{?el5:Group: System Environment/Libraries}
+
+License: MIT
+URL: http://www.lib%{orig_name}.org/
+Source0: http://downloads.sourceforge.net/%{orig_name}/%{orig_name}-%{version}.tar.gz
+
+Patch0: expat-2.1.0-xmlwfargs.patch
+
+%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: check-devel
+
+Provides: %{orig_name} == %{version}-%{release}
+
+%description
+This is expat, the C library for parsing XML, written by James Clark.
+Expat is a stream oriented XML parser. This means that you register
+handlers with the parser prior to starting the parse. These handlers
+are called when the parser discovers the associated structures in the
+document being parsed. A start tag is an example of the kind of
+structures for which you may register handlers.
+
+
+%package devel
+Summary: Files for developing applications using %{orig_name}-%{version}
+%{?el5:Group: Development/Libraries}
+
+Requires: %{name}%{?_isa} == %{version}-%{release}
+%{?el5:Requires: pkgconfig}
+
+Provides: %{orig_name}-devel == %{version}-%{release}
+%{?el5:Provides: pkgconfig(%{name}) == %{version}}
+
+%description devel
+The expat-devel package contains the libraries, include files and
+documentation to develop XML applications with expat.
+
+
+%prep
+%setup -qn %{orig_name}-%{version}
+%patch0 -p1 -b .xmlwfargs
+
+# Fix perms on sources.
+find . -type f -name '*.c' -print0 | xargs -0 chmod 0644
+find . -type f -name '*.h' -print0 | xargs -0 chmod 0644
+
+# Adjust pkg-config-file
+mv -f %{orig_name}.pc.in %{name}.pc.in
+sed -i.pkg-conf -e 's!%{orig_name}.pc!%{name}.pc!g' configure.in Makefile.in
+_file="%{name}.pc.in"
+sed -e 's!-lexpat!&%{compat_ver}!' -e 's!^Cflags:.*!&/%{name}!' \
+ < ${_file} > ${_file}.new
+touch -r ${_file} ${_file}.new
+mv -f ${_file}.new ${_file}
+
+# Regenerate build-sys.
+rm -rf autom4te*.cache
+%{!?el5:sed -i.lt -e 's!^AC_PROG_LIBTOOL!LT_INIT!' configure.in}
+sed -i.lib -e 's!lib%{orig_name}.la$!lib%{name}.la!' Makefile.in
+autoreconf -vfi
+
+
+%build
+%configure
+make %{?_smp_mflags}
+
+
+%install
+%{?el5:rm -rf %{buildroot}}
+make install DESTDIR=%{buildroot}
+
+# We don't want the static-lib.
+rm -f %{buildroot}%{_libdir}/*.*a
+
+# Move headers to subdir.
+mkdir -p %{buildroot}%{_includedir}/%{name}
+mv -f %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/%{name}
+
+# Rename conflicting files.
+for _file in %{buildroot}%{_bindir}/* %{buildroot}%{_mandir}/*/*
+do
+ _dir="`dirname ${_file}`"
+ _file="`echo ${_file} | sed -e "s~^${_dir}~~"`"
+ _new="`echo ${_file} | sed -e 's!\\..*!!'`%{compat_ver}"
+ [[ "`echo ${_file} | sed -e 's!.*\\.!!'`" != "${_file}" ]] && \
+ _new="$_new.`echo ${_file} | sed -e 's!.*\\.!!'`"
+ mv -f ${_dir}${_file} ${_dir}${_new}
+done
+
+# Prepare the docs for inclusion.
+rm -f examples/*.dsp
+chmod 644 README COPYING Changes doc/* examples/*
+
+
+%check
+make check
+
+
+%{?el5:%clean}
+%{?el5:rm -rf %{buildroot}}
+
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc README COPYING
+%{_bindir}/*
+%{_libdir}/lib%{name}.so.*
+%{_mandir}/*/*
+
+%files devel
+%doc Changes doc examples
+%{_libdir}/lib%{name}.so
+%{_libdir}/pkgconfig/%{name}.pc
+%{_includedir}/%{name}
+
+
+%changelog
+* Sun May 04 2014 Björn Esser <bjoern.esser at gmail.com> - 2.1.0-1
+- initial rpm release (#1094038)
+- based on
+ http://pkgs.fedoraproject.org/cgit/expat.git/tree/expat.spec?id=a6feb8c0e5caef1f1e5cf79362bf346f17f090fb
diff --git a/sources b/sources
index e69de29..7107749 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+dd7dab7a5fea97d2a6a43f511449b7cd expat-2.1.0.tar.gz
More information about the scm-commits
mailing list