From 66e633800b1e655a8755e0a9601b1198f711ec9a Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Nov 21 2007 17:25:03 +0000 Subject: - rebuild for libgpod-0.6.0 - apply upstream patch to fix smart playlist play time bug - Requires: which (used in some of the provided scripts) --- diff --git a/gtkpod-0.99.10-spl-tracklen.patch b/gtkpod-0.99.10-spl-tracklen.patch new file mode 100644 index 0000000..f139713 --- /dev/null +++ b/gtkpod-0.99.10-spl-tracklen.patch @@ -0,0 +1,110 @@ +Index: src/display_spl.c +=================================================================== +--- src/display_spl.c (revision 1797) ++++ src/display_spl.c (revision 1798) +@@ -91,7 +91,7 @@ + { ITDB_SPLFIELD_DATE_MODIFIED, N_("Date modified") }, + { ITDB_SPLFIELD_TRACKNUMBER, N_("Track number") }, + { ITDB_SPLFIELD_SIZE, N_("Size") }, +- { ITDB_SPLFIELD_TIME, N_("Time") }, ++ { ITDB_SPLFIELD_TIME, N_("Play time") }, + { ITDB_SPLFIELD_COMMENT, N_("Comment") }, + { ITDB_SPLFIELD_DATE_ADDED, N_("Date added") }, + { ITDB_SPLFIELD_COMPOSER, N_("Composer") }, +@@ -635,10 +635,17 @@ + switch (type) + { + case spl_ET_FROMVALUE: +- splr->fromvalue = atol (str); +- if (splr->field == ITDB_SPLFIELD_RATING) ++ switch (splr->field) + { +- splr->fromvalue *= ITDB_RATING_STEP; ++ case ITDB_SPLFIELD_RATING: ++ splr->fromvalue = ITDB_RATING_STEP * atol (str); ++ break; ++ case ITDB_SPLFIELD_TIME: ++ splr->fromvalue = 1000 * strtod (str, NULL); ++ break; ++ default: ++ splr->fromvalue = atol (str); ++ break; + } + break; + case spl_ET_FROMVALUE_DATE: +@@ -650,10 +657,17 @@ + splr->fromdate = atol (str); + break; + case spl_ET_TOVALUE: +- splr->tovalue = atol (str); +- if (splr->field == ITDB_SPLFIELD_RATING) ++ switch (splr->field) + { +- splr->tovalue *= ITDB_RATING_STEP; ++ case ITDB_SPLFIELD_RATING: ++ splr->tovalue = ITDB_RATING_STEP * atol (str); ++ break; ++ case ITDB_SPLFIELD_TIME: ++ splr->tovalue = 1000 * strtod (str, NULL); ++ break; ++ default: ++ splr->tovalue = atol (str); ++ break; + } + break; + case spl_ET_TOVALUE_DATE: +@@ -1004,22 +1018,27 @@ + enum entrytype et) + { + gchar *strp = str; +- gint stepsize = 1; /* for FROMVALUE/TOVALUE (20 for rating) */ + + g_return_val_if_fail (str, NULL); + g_return_val_if_fail (splr, NULL); + +- if (splr->field == ITDB_SPLFIELD_RATING) +- { +- stepsize = ITDB_RATING_STEP; +- } +- + switch (et) + { + case spl_ET_FROMVALUE: + if (splr->fromvalue == ITDB_SPL_DATE_IDENTIFIER) + splr->fromvalue = 0; +- snprintf (str, WNLEN, "%lld", (long long int)(splr->fromvalue / stepsize)); ++ switch (splr->field) ++ { ++ case ITDB_SPLFIELD_RATING: ++ snprintf (str, WNLEN, "%lld", (long long int)(splr->fromvalue / ITDB_RATING_STEP)); ++ break; ++ case ITDB_SPLFIELD_TIME: ++ snprintf (str, WNLEN, "%.10g", ((gdouble)splr->fromvalue/1000)); ++ break; ++ default: ++ snprintf (str, WNLEN, "%lld", (long long int)(splr->fromvalue)); ++ break; ++ } + break; + case spl_ET_FROMVALUE_DATE: + if (splr->fromvalue == ITDB_SPL_DATE_IDENTIFIER) +@@ -1032,7 +1051,18 @@ + case spl_ET_TOVALUE: + if (splr->tovalue == ITDB_SPL_DATE_IDENTIFIER) + splr->tovalue = 0; +- snprintf (str, WNLEN, "%lld", (long long int)(splr->tovalue / stepsize)); ++ switch (splr->field ) ++ { ++ case ITDB_SPLFIELD_RATING: ++ snprintf (str, WNLEN, "%lld", (long long int)(splr->tovalue / ITDB_RATING_STEP)); ++ break; ++ case ITDB_SPLFIELD_TIME: ++ snprintf (str, WNLEN, "%.10g", ((gdouble)splr->tovalue/1000)); ++ break; ++ default: ++ snprintf (str, WNLEN, "%lld", (long long int)(splr->tovalue)); ++ break; ++ } + break; + case spl_ET_TOVALUE_DATE: + if (splr->tovalue == ITDB_SPL_DATE_IDENTIFIER) diff --git a/gtkpod.spec b/gtkpod.spec index 2d317ec..5c97640 100644 --- a/gtkpod.spec +++ b/gtkpod.spec @@ -1,12 +1,13 @@ Name: gtkpod Version: 0.99.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Graphical song management program for Apple's iPod Group: Applications/Multimedia License: GPLv2+ URL: http://www.gtkpod.org Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: gtkpod-0.99.10-spl-tracklen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: curl-devel @@ -18,12 +19,15 @@ BuildRequires: gnome-vfs2-devel BuildRequires: hal-devel BuildRequires: libglade2-devel BuildRequires: libgnomecanvas-devel -BuildRequires: libgpod-devel >= 0.5.2 +BuildRequires: libgpod-devel >= 0.6.0 BuildRequires: libid3tag-devel BuildRequires: libmp4v2-devel BuildRequires: libvorbis-devel BuildRequires: perl(XML::Parser) +# some of the scripts in %{_datadir}/%{name}/scripts use which +Requires: which + %description gtkpod is a platform independent Graphical User Interface for Apple's iPod using GTK2. It supports the first to fifth Generation including @@ -32,6 +36,7 @@ the iPod mini, iPod Photo, iPod Shuffle, iPod nano, and iPod Video. %prep %setup -q +%patch -p0 -b .spl-tracklen %build @@ -80,6 +85,11 @@ fi %changelog +* Wed Nov 21 2007 Todd Zullinger - 0.99.10-2 +- rebuild for libgpod-0.6.0 +- apply upstream patch to fix smart playlist play time bug +- Requires: which (used in some of the provided scripts) + * Sat Aug 04 2007 Todd Zullinger - 0.99.10-1 - update to 0.99.10 - use upstream .desktop file