[Bug 1702] New: Review Request: imagination - A lightweight and
simple GTK based DVD slide show creator
Richard Shaw
hobbes1069 at gmail.com
Sat Apr 16 20:50:49 CEST 2011
On Sat, Apr 16, 2011 at 10:12 AM, Michael Schwendt <mschwendt at gmail.com> wrote:
> 1.) Verify that the app does not expect the documentation to be
> located in its original path. Moving it could break the app at run-time
> (e.g. a Help menu). It may be necessary to patch/reconfigure the app,
> so it would look for the doc files in another location
It does expect it in that directory and unfortunately it does not give
an error, it just fails silently. There's not even any console output.
I was going to create a separate -doc package but looks like it needs
to stay together.
I found the code where it sets the doc dir and it should be easy (if I
was a C programmer) to create a patch. I think I can manage it but it
may take me a few tries:
static void img_show_uri(GtkMenuItem *menuitem, img_window_struct *img)
{
gchar *file = NULL;
gchar *lang = NULL;
lang = g_strndup(g_getenv("LANG"),2);
file = g_strconcat("file://",DATADIR,"/doc/",PACKAGE,"/html/",lang,"/index.html",NULL);
g_free(lang);
img_message (img, FALSE, "%s\n", file);
/* If help is not localized yet, show default language (english) */
if ( !gtk_show_uri(NULL,file, GDK_CURRENT_TIME, NULL))
{
g_free( file );
file =
g_strconcat("file://",DATADIR,"/doc/",PACKAGE,"/html/en/index.html",NULL);
gtk_show_uri(NULL,file, GDK_CURRENT_TIME, NULL);
}
g_free(file);
}
---
There's a C variable, PACKAGE_VERSION, for the version as well. We
should just be able to add it to the concatenation function I would
think.
> Once you are certain that you can move the doc files without breaking
> anything:
>
> 2.) Install them into a temporary location and make them available
> somewhere below $(pwd), which is within the space of your extracted
> package below %_builddir. Clean up and set up that temporary location
> in %install. Then you can use %doc to include those doc files. E.g.
>
> %install
> ...
> rm -rf %(pwd)/_tmpdoc ; mkdir $(pwd)/_tmpdoc
> mv %{buildroot}%{_docdir}/%{name} $(pwd)/_tmpdoc
>
>
> %files
> ...
> %doc _tmpdoc/*
I kinda see show this works, however, till the %doc move it to the
right directory this way? I though if it had a path in it, rpm would
just mark it as documentation but not move it?
Thanks,
Richard
More information about the rpmfusion-developers
mailing list