From 0c268dfad8ebc764d9309f93d6455ff3ea7597be Mon Sep 17 00:00:00 2001 From: Jonathan Robie Date: Feb 04 2010 22:01:41 +0000 Subject: Fixing errors in encoding and line endings. --- diff --git a/xerces-c.spec b/xerces-c.spec index 30134da..6012745 100644 --- a/xerces-c.spec +++ b/xerces-c.spec @@ -1,13 +1,15 @@ Summary: Validating XML Parser Name: xerces-c Version: 3.0.1 -Release: 7%{?dist} +Release: 8%{?dist} License: ASL 2.0 Group: System Environment/Libraries URL: http://xml.apache.org/xerces-c/ Source0: http://archive.apache.org/dist/xml/xerces-c/Xerces-C_3_0_1/sources/xerces-c-3.0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: dos2unix iconv + %description Xerces-C is a validating XML parser written in a portable subset of C++. Xerces-C makes it easy to give your application the ability to @@ -51,17 +53,6 @@ manipulating, and validating XML documents. %setup -q %{__perl} -pi.orig -e 's|(PREFIX.)/lib\b|$1/%{_lib}|g' ./configure ./Makefile.in -# make rpmlint happy - -# changing the line ending from dos/win to unix. -# sed -i 's/\r//' doc/*.xml - -# convert the documents to utf8 -# iconv -f iso8859-1 -t utf-8 credits.txt > credits.utf8 && mv -f credits.{utf8,txt} -# iconv -f iso8859-1 -t utf-8 doc/feedback.xml > doc/feedback.utf8 && mv -f doc/feedback.{utf8,xml} -# iconv -f iso8859-1 -t utf-8 doc/migration.xml > doc/migration.utf8 && mv -f doc/migration.{utf8,xml} -# iconv -f iso8859-1 -t utf-8 doc/releases_archive.xml > doc/releases_archive.utf8 && mv -f doc/releases_archive.{utf8,xml} - %build %configure make @@ -69,7 +60,11 @@ make %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} install DESTDIR="$RPM_BUILD_ROOT" -cd samples; make clean +# get rid of files not allowed in a doc rpm +pushd samples; make clean; rm -rf src/*/.deps; rm -rf src/*/.dirstamp; popd +# correct errors in line endings and encoding +iconv -f iso8859-1 -t utf-8 CREDITS +pushd doc; dos2unix -U *.xml; %post -p /sbin/ldconfig %postun -p /sbin/ldconfig