Thanks for the replies.
BuildRequires is one of the things that gives me problems for the 'generic' RPM. Each distro seems to have different names for things. The last time I did this I found these:What's missing here are the BuildRequires.
This is so that the binary (in e.g. /usr/bin) knows where the application data is (in e.g. /usr/share/tesseracttrainer-0.1.4). The scripts just cd to the datadir and runs the binary with datadir as cwd. I didn't want to put these into source files as the source tar.gz doesn't really 'know' about %{_bindir} and %{_datadir}, which are more a property of the distro than of the (common to all distros) tar.gz. However it's not nice If you have a better way I'd like to hear it.%post
rm -f %{RUNFILE}
Ouch!...(***)
echo #!/bin/sh > %{RUNFILE}
echo cd %{_datadir}/%{name}/system >> %{RUNFILE}
echo exec %{_bindir}/tesseracttrainerbinary >> %{RUNFILE}
chmod 0755 %{RUNFILE}
rm -f %{RUNFILESAFE}
echo #!/bin/sh > %{RUNFILESAAFE}
echo cd %{_datadir}/%{name}/system >> %{RUNFILESAFE}
echo "exec %{_bindir}/tesseracttrainerbinary \"load('start_safe.txt')\"" >> %{RUNFILESAFE}
chmod 0755 %{RUNFILESAFE}
(***)... rather include these two files as source files and install them in %install.
Yours, Andy S.