Last I looked, calibre_postinstall also does inappropriate things for an RPM, such as checking the Qt version (4.4.2, unlike the 4.4.0 in the install info on the wiki). That sort of thing is done with a 'Requires:', and the package doesn't get onto the system without the right Qt version. (The right version should be automagically pulled in by the package manager, if needed.)
Can you do a 'calibre_rpm_postinstall' that can be run once all the dependencies are met, and which can be easily called from the %post of an RPM?
Once the other changes are pushed upstream (cssutils/other forks), everything else pretty much works. The "because Windows doesn't have it" stuff is deleted in the .spec file I've written. It would be a minor time-saver to avoid building it if not isWindows (or isRpmLinux).
Right now, a default rpmbuild of 0.4.139 on Fedora 10 gives me:
You must be root to run this command.
Traceback (most recent call last):
File "setup.py", line 183, in <module>
subprocess.check_call('calibre_postinstall', shell=True)
File "/usr/lib64/python2.5/subprocess.py", line 462, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'calibre_postinstall' returned non-zero exit status 1
error: Bad exit status from /var/tmp/rpm-tmp.bOlTyc (%install)
So I'll have to re-hack that for the time being.
|