Add ASLP patch
[platform/upstream/expat.git] / packaging / expat.spec
index d65ce70..51880f5 100644 (file)
@@ -1,12 +1,19 @@
+
+%if "%{run_tests}" == "1"
+    # check is defined off at .rpmmacros file.
+    %define check %%check
+%endif
+
 Name:           expat
-Version:        2.1.0
+Version:        2.2.4
 Release:        0
 Url:            http://expat.sourceforge.net/
 Summary:        XML Parser Toolkit
 License:        MIT
-Group:          Development/Libraries/C and C++
-Source0:        %{name}-%{version}.tar.bz2
+Group:          System/Libraries
+Source0:        %{name}-%{version}.tar.gz
 Source1:        baselibs.conf
+Source1001:    expat.manifest
 BuildRequires:  gcc-c++
 BuildRequires:  libtool
 BuildRequires:  pkg-config
@@ -36,7 +43,7 @@ declaration).
 
 %package -n libexpat
 Summary:        XML Parser Toolkit
-Group:          Development/Libraries/C and C++
+Group:          System/Libraries
 
 %description -n libexpat
 Expat is an XML 1.0 parser written in C. It aims to be fully
@@ -63,7 +70,7 @@ declaration).
 
 %package -n libexpat-devel
 Summary:        XML Parser Toolkit
-Group:          Development/Libraries/C and C++
+Group:          Development/Libraries
 Requires:       glibc-devel
 Requires:       libexpat = %{version}
 Provides:      expat-devel
@@ -92,36 +99,43 @@ internal subset or it is declared as stand-alone in the XML
 declaration).
 
 %prep
-%setup -q 
-
+%setup -q
+cp %{SOURCE1001} .
 rm -f examples/*.dsp
+
 %build
-autoreconf -fi
-%configure --disable-static --with-pic
+export CFLAGS="${CFLAGS} -fPIC"
+export CXXFLAGS="${CXXFLAGS} -fPIC"
+export LDFLAGS="${LDFLAGS} -pie"
+
+%reconfigure --disable-static --with-pic
 make %{?_smp_mflags}
 
 %check
-make check
+    %__make check || exit 0
 
 %install
 %make_install
 rm doc/xmlwf.1
+%remove_docs
 
 %post -n libexpat -p /sbin/ldconfig
 
 %postun -n libexpat -p /sbin/ldconfig
 
 %files
+%manifest %{name}.manifest
 %defattr(-, root, root)
-%doc COPYING 
-%doc %{_mandir}/man?/*
+%license COPYING
 %{_bindir}/xmlwf
 
 %files -n libexpat
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libdir}/libexpat.so.*
 
 %files -n libexpat-devel
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_includedir}/*
 %{_libdir}/libexpat.so