|  02-16-2009, 01:46 AM | #16 | 
| Member  Posts: 16 Karma: 10 Join Date: Dec 2007 Location: New Hampshire, USA Device: Cybook Gen3/Palm Zire | 
			
			Hooray, I had success building calibre-0.4.137-1.x86_64.rpm and its src.rpm for Fedora 10, using the system odfpy, pyPdf, and python-{cherrypy,cssutils} packages. I wound up deleting the bits about the postinstall, as I wasn't in the mood to solve that one (possibly don't execute that section if RPM_BUILD_ROOT is defined, but I don't know, nor do I feel like messing with exceptions from os.environ for a simple unset envvar. I did mention I dislike coding in python...  ) I also made good use of the packaging info here, as I tend not to package python much: http://fedoraproject.org/wiki/Packaging/Python | 
|   |   | 
|  02-16-2009, 06:47 AM | #17 | ||
| Sigil & calibre developer            Posts: 2,487 Karma: 1063785 Join Date: Jan 2009 Location: Florida, USA Device: Nook STR | Quote: 
 Quote: 
 | ||
|   |   | 
|  02-16-2009, 08:02 AM | #18 | 
| Reticulator of Tharn            Posts: 618 Karma: 400000 Join Date: Jan 2007 Location: EST Device: Sony PRS-505 | 
			
			The 'cssutils' package has a change calibre requires for Mobipocket and LIT generation which has been pushed upstream but exists only in the most recently released 'cssutils'. The 'odf' package has a change that I haven't push upstream yet, but it's only a fairly minor enhancement.
		 | 
|   |   | 
|  02-21-2009, 02:34 AM | #19 | 
| Member  Posts: 16 Karma: 10 Join Date: Dec 2007 Location: New Hampshire, USA Device: Cybook Gen3/Palm Zire | 
			
			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. | 
|   |   | 
|  02-21-2009, 03:18 AM | #20 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			If the rpm package manager is going to ensure an appropriate version of Qt then checking the Qt ersion in calibre-Postinstall is perfectly harmless. As for the require root have you run calibre_postinstall --help It has various options, including an option to skip the root check. | 
|   |   | 
|  02-21-2009, 07:24 AM | #21 | 
| Sigil & calibre developer            Posts: 2,487 Karma: 1063785 Join Date: Jan 2009 Location: Florida, USA Device: Nook STR | 
			
			Take a look at the Debian package. I realize it's pretty different than RPM but looking at how they're handing the install might help.
		 | 
|   |   | 
|  02-21-2009, 02:42 PM | #22 | 
| Member  Posts: 16 Karma: 10 Join Date: Dec 2007 Location: New Hampshire, USA Device: Cybook Gen3/Palm Zire | 
			
			Cool, will have look to see what others are doing with the packaging; will also try to see what's going on with the post-install.  Probably next weekend, the way things are going.  Thanks.
		 | 
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| [Old Thread] New to Calibre--problems converting files | rxmom03 | Calibre | 4 | 07-04-2012 09:46 PM | 
| Converting Mobipocket PRC files | HarryT | Sony Reader | 7 | 12-16-2011 01:46 PM | 
| Help! Newbie having problems converting HTML/CSS files | jackie_w | Calibre | 6 | 09-14-2009 04:53 PM | 
| Error in converting files html --> Mobipocket | adamsloco | Calibre | 0 | 08-29-2009 10:30 PM | 
| Problems Converting files using libprs500 | nosfuerato | Calibre | 3 | 12-27-2007 08:33 AM |