+Summary: X.Org X11 ICE runtime library
+Name: libICE
+Version: 1.0.8
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
-Name: libICE
-Summary: X.Org X11 libICE runtime library
-Version: 1.0.7
-Release: 0
-Group: System/Libraries
-License: MIT/X11
-URL: http://www.x.org
-Source0: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig
BuildRequires: pkgconfig(xproto)
-BuildRequires: pkgconfig(xtrans)
BuildRequires: pkgconfig(xorg-macros)
-
+BuildRequires: xorg-x11-xtrans-devel >= 1.0.3-5
%description
The X.Org X11 ICE (Inter-Client Exchange) runtime library.
-
%package devel
-Summary: X.Org X11 libICE development package
-Group: System/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: xorg-x11-filesystem
+Summary: X.Org X11 ICE development package
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
%description devel
The X.Org X11 ICE (Inter-Client Exchange) development package.
-
%prep
-%setup -q -n %{name}-%{version}
-
+%setup -q
%build
-
-%reconfigure --disable-static
+%reconfigure --disable-static \
+ LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
make %{?jobs:-j%jobs}
%install
-rm -rf %{buildroot}
-%make_install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+%remove_docs
-%post -p /sbin/ldconfig
+%clean
+rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-
-
-
-
-
-
%files
%defattr(-,root,root,-)
-%doc AUTHORS COPYING README ChangeLog
+%doc AUTHORS COPYING ChangeLog
%{_libdir}/libICE.so.6
%{_libdir}/libICE.so.6.3.0
-%exclude /usr/share/doc/libICE/ICElib.xml
-%exclude /usr/share/doc/libICE/ice.xml
-
%files devel
%defattr(-,root,root,-)
-%dir %{_includedir}/X11
-%dir %{_includedir}/X11/ICE
-%{_includedir}/X11/ICE/*.h
+#%{_docdir}/%{name}
+%{_includedir}/X11/ICE
%{_libdir}/libICE.so
%{_libdir}/pkgconfig/ice.pc
-