save some space

This commit is contained in:
Matthias Clasen 2008-01-16 06:51:16 +00:00
parent 18f164a3c3
commit 7941e17e08
2 changed files with 40 additions and 1 deletions

30
copy.xsl Normal file
View File

@ -0,0 +1,30 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
<xsl:output method="xml" doctype-system="location.dtd"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="name">
<xsl:choose>
<xsl:when test="@xml:lang">
<xsl:variable name="ctext" select="../name[1]"/>
<xsl:variable name="thistext" select="."/>
<xsl:if test="$ctext != $thistext">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,12 +1,13 @@
Name: libgweather
Version: 2.21.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A library for weather information
Group: System Environment/Libraries
License: GPLv2+
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/libgweather/2.21/%{name}-%{version}.tar.bz2
Source1: copy.xsl
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: GConf2-devel >= 2.8.0
@ -42,6 +43,11 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# waste less space
xsltproc %{SOURCE1} data/Locations.xml > loc.xml
sed -e "s/^\s*//" -e "/^$/d" loc.xml > data/Locations.xml
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
@ -85,6 +91,9 @@ fi
%changelog
* Wed Jan 16 2008 Matthias Clasen <mclasen@redhat.com> 2.21.2-3
- Carry over space-saving hack from gnome-applets
* Tue Jan 15 2008 Matthias Clasen <mclasen@redhat.com> 2.21.2-2
- Incorporate review feedback (#428739)