Bug 180046 - Update ports deskutils/calibre to 0.9.36
Summary: Update ports deskutils/calibre to 0.9.36
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-28 02:00 UTC by rnejdl
Modified: 2013-07-01 19:40 UTC (History)
1 user (show)

See Also:


Attachments
calibre-0.9.36.diff (8.28 KB, patch)
2013-06-28 02:00 UTC, rnejdl
no flags Details | Diff
calibre.diff (8.93 KB, patch)
2013-06-30 23:43 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rnejdl 2013-06-28 02:00:00 UTC
	This updates calibre to 0.9.36 and also adds a new startup script submitted by anthony@found-it.net.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-28 02:00:15 UTC
Class Changed
From-To: update->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2013-06-28 09:05:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->madpilot

I'll take it.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2013-06-30 23:43:49 UTC
Hi,

I have made a few changes to your patch. The rc script needed a few fixes.

You should test rc scripts using the devel/rclint script to check them 
for correctness and compliance to style guides.

The set_rcvar macro has been continued and should not be used anymore.

I used the default variable construct for the user variable and the 
calibre_library too. I made calibre_library a required directory.

I choose to assign a a random non existent directory to calibre_library, 
but this isn't really a good choice, perhaps a reasonable default should 
be chosen.

I made the var directory owned by the ${calibre_user} user, since the 
"calibre" user is not guaranteed to exist if the user chooses to run it 
as another user.

To er rclint errors I also moved the command_args login into the start 
function.

And the rc script will have problems if calibre_library has spaces in 
it. But this seems like a common rc script problem.

Also, rc script don't use the sh suffix anymore. This ccreated a problem 
though, when the ports system Makefiles tried to create a file named 
"calibre" in WRKDIR, where the "calibre" directory already exists by 
extracting the distribution. I added the line "EXTRACT_BEFORE_ARGS=   -x 
-s '/^calibre/~-src/' -f" to force tar to extract the distribution to a 
directory named "calibre-src" to avoid this problem. I adapted WRKSRC 
accordingly.

While testing I noticed 0.9.37 got out, so I also updated to it.

Can you approve the attached patch?

Thanks in advance.

-- 
Guido Falsi <madpilot@FreeBSD.org>
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2013-06-30 23:44:20 UTC
State Changed
From-To: open->feedback

Ask for maintainer approval.
Comment 5 rnejdl 2013-07-01 15:16:27 UTC
 

Guido, 

Good suggestion on the rclint and I will do that going forward. I
haven't done one of these before so my apologies for the errors. 

I had banged my head against the wall for some time on the work src rc
conflict and like how you resolved that: 

EXTRACT_BEFORE_ARGS= -x -s '/^calibre/~-src/' -f 

As for 0.9.37, calibre releases a new version every 2 weeks and I have a
hard time keeping up with all of them. I was planning to pick up the
next version after this was committed. But, thank you very much and this
indeed looks good and I approve this patch. 

Rusty 

On 2013-06-30 17:43, Guido Falsi wrote: 

> Hi,
> 
> I have made a few changes to your patch. The rc script needed a few fixes.
> 
> You should test rc scripts using the devel/rclint script to check them 
> for correctness and compliance to style guides.
> 
> The set_rcvar macro has been continued and should not be used anymore.
> 
> I used the default variable construct for the user variable and the 
> calibre_library too. I made calibre_library a required directory.
> 
> I choose to assign a a random non existent directory to calibre_library, 
> but this isn't really a good choice, perhaps a reasonable default should 
> be chosen.
> 
> I made the var directory owned by the ${calibre_user} user, since the 
> "calibre" user is not guaranteed to exist if the user chooses to run it 
> as another user.
> 
> To er rclint errors I also moved the command_args login into the start 
> function.
> 
> And the rc script will have problems if calibre_library has spaces in 
> it. But this seems like a common rc script problem.
> 
> Also, rc script don't use the sh suffix anymore. This ccreated a problem 
> though, when the ports system Makefiles tried to create a file named 
> "calibre" in WRKDIR, where the "calibre" directory already exists by 
> extracting the distribution. I added the line "EXTRACT_BEFORE_ARGS= -x 
> -s '/^calibre/~-src/' -f" to force tar to extract the distribution to a 
> directory named "calibre-src" to avoid this problem. I adapted WRKSRC 
> accordingly.
> 
> While testing I noticed 0.9.37 got out, so I also updated to it.
> 
> Can you approve the attached patch?
> 
> Thanks in advance.

 
Comment 6 Guido Falsi freebsd_committer freebsd_triage 2013-07-01 19:34:59 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-07-01 19:34:59 UTC
Author: madpilot
Date: Mon Jul  1 18:34:45 2013
New Revision: 322136
URL: http://svnweb.freebsd.org/changeset/ports/322136

Log:
  - Update to 0.9.37
  - Add rc script for calibre-server
  
  PR:		ports/180046
  Submitted by:	Rusty Nejdl <rnejdl@ringofsaturn.com> (maintainer)

Added:
  head/deskutils/calibre/files/calibre.in   (contents, props changed)
Modified:
  head/deskutils/calibre/Makefile
  head/deskutils/calibre/distinfo
  head/deskutils/calibre/pkg-plist

Modified: head/deskutils/calibre/Makefile
==============================================================================
--- head/deskutils/calibre/Makefile	Mon Jul  1 18:23:37 2013	(r322135)
+++ head/deskutils/calibre/Makefile	Mon Jul  1 18:34:45 2013	(r322136)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	calibre
-PORTVERSION=	0.9.30
+PORTVERSION=	0.9.37
 CATEGORIES=	deskutils python
 MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}/
 
@@ -46,12 +46,15 @@ RUN_DEPENDS=	xdg-open:${PORTSDIR}/devel/
 		pdftohtml:${PORTSDIR}/graphics/poppler-utils \
 		lshal:${PORTSDIR}/sysutils/hal
 
+USE_RC_SUBR=	calibre
+EXTRACT_BEFORE_ARGS=	-x -s '/^calibre/~-src/' -f
+
 USES=		shared-mime-info
 USE_XZ=		yes
 USE_PYTHON=	2.7
 USE_QT4=	qmake_build moc_build
 INSTALLS_ICONS=	yes
-WRKSRC=		${WRKDIR}/${PORTNAME}
+WRKSRC=		${WRKDIR}/${PORTNAME}-src
 CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 MAKE_ENV+=	FC_INC_DIR="${LOCALBASE}/include/fontconfig" \

Modified: head/deskutils/calibre/distinfo
==============================================================================
--- head/deskutils/calibre/distinfo	Mon Jul  1 18:23:37 2013	(r322135)
+++ head/deskutils/calibre/distinfo	Mon Jul  1 18:34:45 2013	(r322136)
@@ -1,2 +1,2 @@
-SHA256 (calibre-0.9.30.tar.xz) = eab88d0d5ade70dd1bae9522f444ddd3ab71b2d57a159d6ecc6276cd674fc927
-SIZE (calibre-0.9.30.tar.xz) = 28894864
+SHA256 (calibre-0.9.37.tar.xz) = b0c88ae578b192a4906f40c497c075fcf5edc887e1878a8800512abcdd255daf
+SIZE (calibre-0.9.37.tar.xz) = 29203040

Added: head/deskutils/calibre/files/calibre.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/calibre/files/calibre.in	Mon Jul  1 18:34:45 2013	(r322136)
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: calibre
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable calibre_server:
+#
+# calibre_enable (bool):        Set it to "YES" to enable calibre
+#                               Default is "NO".
+# calibre_port (int):		port that calibre_server listens on
+#				Default is 8080
+# calibre_user (string):	user that calibre_server runs as
+#				Default is calibre
+# calibre_username (string):	username for calibre authentication
+#				Default is calibre
+# calibre_password (string):	If set then access is restricted
+#				default is unrestricted
+# calibre_url_prefix (string):  prefix to append to all URLs
+#				default is unset
+# calibre_library (string):	path to library folder to serve content from
+#
+#
+##########################################################
+
+. /etc/rc.subr
+
+name=calibre
+rcvar=calibre_enable
+
+load_rc_config $name
+
+: ${calibre_enable:=NO}
+: ${calibre_user:=calibre}
+: ${calibre_library:=/nonexistent}
+
+pidfile=/var/run/${name}/${name}.pid
+command=/usr/local/bin/calibre-server
+command_interpreter=python2.7
+required_dirs=${calibre_library}
+
+start_cmd=${name}_start
+
+start_precmd="install -d -o ${calibre_user} -m755 /var/run/${name}"
+
+calibre_start()
+{
+	if [ ! -z "${calibre_port}" ]; then
+		command_args="${command_args} --port=${calibre_port}"
+	fi
+	if [ ! -z "${calibre_username}" ]; then
+		command_args="${command_args} --username=${calibre_username}"
+	fi
+	if [ ! -z "${calibre_password}" ]; then
+		command_args="${command_args} --password=${calibre_password}"
+	fi
+	if [ ! -z "${calibre_url_prefix}" ]; then
+		command_args="${command_args} --url_prefx=${calibre_url_prefix}"
+	fi
+
+	/usr/sbin/daemon -f -u ${calibre_user} -p ${pidfile} ${command} ${command_args} --with-library ${calibre_library}
+}
+
+run_rc_command "$1"

Modified: head/deskutils/calibre/pkg-plist
==============================================================================
--- head/deskutils/calibre/pkg-plist	Mon Jul  1 18:23:37 2013	(r322135)
+++ head/deskutils/calibre/pkg-plist	Mon Jul  1 18:34:45 2013	(r322136)
@@ -82,6 +82,9 @@ lib/calibre/calibre/devices/hanlin/__ini
 lib/calibre/calibre/devices/hanlin/driver.py
 lib/calibre/calibre/devices/hanvon/__init__.py
 lib/calibre/calibre/devices/hanvon/driver.py
+lib/calibre/calibre/devices/idevice/libimobiledevice.py
+lib/calibre/calibre/devices/idevice/parse_xml.py
+lib/calibre/calibre/devices/idevice/__init__.py
 lib/calibre/calibre/devices/iliad/__init__.py
 lib/calibre/calibre/devices/iliad/driver.py
 lib/calibre/calibre/devices/interface.py
@@ -166,6 +169,7 @@ lib/calibre/calibre/ebooks/conversion/pl
 lib/calibre/calibre/ebooks/conversion/plugins/chm_input.py
 lib/calibre/calibre/ebooks/conversion/plugins/comic_input.py
 lib/calibre/calibre/ebooks/conversion/plugins/djvu_input.py
+lib/calibre/calibre/ebooks/conversion/plugins/docx_input.py
 lib/calibre/calibre/ebooks/conversion/plugins/epub_input.py
 lib/calibre/calibre/ebooks/conversion/plugins/epub_output.py
 lib/calibre/calibre/ebooks/conversion/plugins/fb2_input.py
@@ -209,8 +213,17 @@ lib/calibre/calibre/ebooks/docx/names.py
 lib/calibre/calibre/ebooks/docx/styles.py
 lib/calibre/calibre/ebooks/docx/__init__.py
 lib/calibre/calibre/ebooks/docx/char_styles.py
+lib/calibre/calibre/ebooks/docx/cleanup.py
 lib/calibre/calibre/ebooks/docx/container.py
+lib/calibre/calibre/ebooks/docx/dump.py
+lib/calibre/calibre/ebooks/docx/fonts.py
+lib/calibre/calibre/ebooks/docx/footnotes.py
+lib/calibre/calibre/ebooks/docx/images.py
+lib/calibre/calibre/ebooks/docx/numbering.py
+lib/calibre/calibre/ebooks/docx/tables.py
+lib/calibre/calibre/ebooks/docx/theme.py
 lib/calibre/calibre/ebooks/docx/to_html.py
+lib/calibre/calibre/ebooks/docx/toc.py
 lib/calibre/calibre/ebooks/docx/block_styles.py
 lib/calibre/calibre/ebooks/docx/lcid.py
 lib/calibre/calibre/ebooks/epub/__init__.py
@@ -396,6 +409,7 @@ lib/calibre/calibre/ebooks/oeb/reader.py
 lib/calibre/calibre/ebooks/oeb/stylizer.py
 lib/calibre/calibre/ebooks/oeb/transforms/__init__.py
 lib/calibre/calibre/ebooks/oeb/transforms/cover.py
+lib/calibre/calibre/ebooks/oeb/transforms/embed_fonts.py
 lib/calibre/calibre/ebooks/oeb/transforms/filenames.py
 lib/calibre/calibre/ebooks/oeb/transforms/flatcss.py
 lib/calibre/calibre/ebooks/oeb/transforms/guide.py
@@ -451,6 +465,7 @@ lib/calibre/calibre/ebooks/pdf/render/gr
 lib/calibre/calibre/ebooks/pdf/render/links.py
 lib/calibre/calibre/ebooks/pdf/render/serialize.py
 lib/calibre/calibre/ebooks/pdf/render/test.py
+lib/calibre/calibre/ebooks/pdf/render/toc.py
 lib/calibre/calibre/ebooks/pdf/writer.py
 lib/calibre/calibre/ebooks/pml/__init__.py
 lib/calibre/calibre/ebooks/pml/pmlconverter.py
@@ -604,6 +619,8 @@ lib/calibre/calibre/gui2/convert/comic_i
 lib/calibre/calibre/gui2/convert/comic_input_ui.py
 lib/calibre/calibre/gui2/convert/debug.py
 lib/calibre/calibre/gui2/convert/debug_ui.py
+lib/calibre/calibre/gui2/convert/docx_input_ui.py
+lib/calibre/calibre/gui2/convert/docx_input.py
 lib/calibre/calibre/gui2/convert/djvu_input.py
 lib/calibre/calibre/gui2/convert/djvu_input_ui.py
 lib/calibre/calibre/gui2/convert/epub_output.py
@@ -873,7 +890,6 @@ lib/calibre/calibre/gui2/store/stores/eb
 lib/calibre/calibre/gui2/store/stores/eharlequin_plugin.py
 lib/calibre/calibre/gui2/store/stores/eknigi_plugin.py
 lib/calibre/calibre/gui2/store/stores/empik_plugin.py
-lib/calibre/calibre/gui2/store/stores/escapemagazine_plugin.py
 lib/calibre/calibre/gui2/store/stores/feedbooks_plugin.py
 lib/calibre/calibre/gui2/store/stores/foyles_uk_plugin.py
 lib/calibre/calibre/gui2/store/stores/google_books_plugin.py
@@ -904,6 +920,7 @@ lib/calibre/calibre/gui2/store/stores/pu
 lib/calibre/calibre/gui2/store/stores/rw2010_plugin.py
 lib/calibre/calibre/gui2/store/stores/smashwords_plugin.py
 lib/calibre/calibre/gui2/store/stores/sony_plugin.py
+lib/calibre/calibre/gui2/store/stores/sony_au_plugin.py
 lib/calibre/calibre/gui2/store/stores/virtualo_plugin.py
 lib/calibre/calibre/gui2/store/stores/waterstones_uk_plugin.py
 lib/calibre/calibre/gui2/store/stores/weightless_books_plugin.py
@@ -943,6 +960,7 @@ lib/calibre/calibre/gui2/viewer/printing
 lib/calibre/calibre/gui2/viewer/table_popup.py
 lib/calibre/calibre/gui2/viewer/toc.py
 lib/calibre/calibre/gui2/widgets.py
+lib/calibre/calibre/gui2/widgets2.py
 lib/calibre/calibre/gui2/wizard/__init__.py
 lib/calibre/calibre/gui2/wizard/device_ui.py
 lib/calibre/calibre/gui2/wizard/finish_ui.py
@@ -1008,8 +1026,6 @@ lib/calibre/calibre/plugins/woff.so
 lib/calibre/calibre/ptempfile.py
 lib/calibre/calibre/startup.py
 lib/calibre/calibre/test_build.py
-lib/calibre/calibre/trac/__init__.py
-lib/calibre/calibre/trac/bzr_commit_plugin.py
 lib/calibre/calibre/translations/__init__.py
 lib/calibre/calibre/translations/dynamic.py
 lib/calibre/calibre/translations/msgfmt.py
@@ -1120,12 +1136,14 @@ lib/calibre/calibre/utils/zipfile.py
 lib/calibre/calibre/web/__init__.py
 lib/calibre/calibre/web/feeds/__init__.py
 lib/calibre/calibre/web/feeds/feedparser.py
+lib/calibre/calibre/web/feeds/jsnews.py
 lib/calibre/calibre/web/feeds/news.py
 lib/calibre/calibre/web/feeds/recipes/__init__.py
 lib/calibre/calibre/web/feeds/recipes/collection.py
 lib/calibre/calibre/web/feeds/recipes/model.py
 lib/calibre/calibre/web/feeds/templates.py
 lib/calibre/calibre/web/fetch/__init__.py
+lib/calibre/calibre/web/fetch/javascript.py
 lib/calibre/calibre/web/fetch/simple.py
 lib/calibre/calibre/web/jsbrowser/__init__.py
 lib/calibre/calibre/web/jsbrowser/browser.py
@@ -1932,7 +1950,6 @@ share/zsh/site-functions/_calibre
 @dirrm lib/calibre/calibre/utils/chm
 @dirrm lib/calibre/calibre/utils
 @dirrm lib/calibre/calibre/translations
-@dirrm lib/calibre/calibre/trac
 @dirrm lib/calibre/calibre/plugins
 @dirrm lib/calibre/calibre/library/server
 @dirrm lib/calibre/calibre/library/catalogs
@@ -2039,6 +2056,7 @@ share/zsh/site-functions/_calibre
 @dirrm lib/calibre/calibre/devices/iriver
 @dirrm lib/calibre/calibre/devices/irexdr
 @dirrm lib/calibre/calibre/devices/iliad
+@dirrm lib/calibre/calibre/devices/idevice
 @dirrm lib/calibre/calibre/devices/hanvon
 @dirrm lib/calibre/calibre/devices/hanlin
 @dirrm lib/calibre/calibre/devices/folder_device
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"