cleanup spec
authorAnas Nashif <anas.nashif@intel.com>
Sun, 4 Nov 2012 23:59:03 +0000 (15:59 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 4 Nov 2012 23:59:03 +0000 (15:59 -0800)
packaging/expat.spec

index 841cbe8..4f0b226 100644 (file)
 Name:           expat
 Version:        2.1.0
-Release:        1
-Summary:        An XML parser library
-Group:          System/Libraries
-Source:         %{name}-%{version}.tar.bz2
-Source1001:     expat.manifest
-
+Release:        0
+Url:            http://expat.sourceforge.net/
+Summary:        XML Parser Toolkit
 License:        MIT
-Url:            http://www.libexpat.org/
+Group:          Development/Libraries/C and C++
+Source0:        %{name}-%{version}.tar.bz2
+Source1:        baselibs.conf
+Patch2:         expat-visibility.patch
+Patch3:         expat-alloc-size.patch
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+BuildRequires:  pkg-config
 
 %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:        Libraries and header files to develop applications using expat
-Group:          Development/Libraries
-Requires:       expat = %{version}
-
-%description devel
-The expat-devel package contains the libraries, include files and documentation
-to develop XML applications with expat.
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
+
+%package -n libexpat
+Summary:        XML Parser Toolkit
+Group:          Development/Libraries/C and C++
+
+%description -n libexpat
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
+
+%package -n libexpat-devel
+Summary:        XML Parser Toolkit
+Group:          Development/Libraries/C and C++
+Requires:       glibc-devel
+Requires:       libexpat = %{version}
+Provides:      expat-devel
+
+%description -n libexpat-devel
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
 
 %prep
-%setup -q
+%setup -q 
+%patch2 -p1
+%patch3
+rm -f examples/*.dsp
+
 %build
-cp %{SOURCE1001} .
-%configure
+autoreconf -fi
+%configure --disable-static --with-pic
 make %{?_smp_mflags}
 
-%install
-rm -f examples/*.dsp
+%check
+make check
 
+%install
 %make_install
+rm doc/xmlwf.1
 
-%remove_docs
-
-%post -p /sbin/ldconfig
+%post -n libexpat -p /sbin/ldconfig
 
-%postun -p /sbin/ldconfig
+%postun -n libexpat -p /sbin/ldconfig
 
 %files
-%manifest expat.manifest
-%{_bindir}/*
-/%{_libdir}/lib*.so.*
+%defattr(-, root, root)
+%doc COPYING 
+%doc %{_mandir}/man?/*
+%{_bindir}/xmlwf
+
+%files -n libexpat
+%defattr(-, root, root)
+%{_libdir}/libexpat.so.*
 
-%files devel
-%manifest expat.manifest
-%{_libdir}/lib*.so
-%{_libdir}/pkgconfig/*.pc
-%{_includedir}/*.h
+%files -n libexpat-devel
+%defattr(-, root, root)
+%{_includedir}/*
+%{_libdir}/libexpat.so
+%{_libdir}/pkgconfig/expat.pc
 
+%changelog