diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-01-14 18:27:01 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-01-14 18:27:01 +0000 |
commit | 04d69616c17f081f60763d739e2110f15c7e14ae (patch) | |
tree | 147145f3556f6f301b97f7954e79b683e2eee448 /app-text/calibre | |
parent | Version bump wrt #395721 (diff) | |
download | historical-04d69616c17f081f60763d739e2110f15c7e14ae.tar.gz historical-04d69616c17f081f60763d739e2110f15c7e14ae.tar.bz2 historical-04d69616c17f081f60763d739e2110f15c7e14ae.zip |
0.8.35 version bump, with calibre-server init script thanks to Erik Zeek <zeekec@mad.scientist.com> from bug #397913.
Package-Manager: portage-2.2.0_alpha84/cvs/Linux i686
Diffstat (limited to 'app-text/calibre')
-rw-r--r-- | app-text/calibre/ChangeLog | 10 | ||||
-rw-r--r-- | app-text/calibre/Manifest | 14 | ||||
-rw-r--r-- | app-text/calibre/calibre-0.8.35.ebuild (renamed from app-text/calibre/calibre-0.8.33.ebuild) | 17 | ||||
-rw-r--r-- | app-text/calibre/files/calibre-server.conf | 13 | ||||
-rw-r--r-- | app-text/calibre/files/calibre-server.init | 59 |
5 files changed, 103 insertions, 10 deletions
diff --git a/app-text/calibre/ChangeLog b/app-text/calibre/ChangeLog index d3a8f71a8351..bed16f57bdf6 100644 --- a/app-text/calibre/ChangeLog +++ b/app-text/calibre/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-text/calibre # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.179 2012/01/06 09:42:16 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.180 2012/01/14 18:27:01 zmedico Exp $ + +*calibre-0.8.35 (14 Jan 2012) + + 14 Jan 2012; Zac Medico <zmedico@gentoo.org> +calibre-0.8.35.ebuild, + +files/calibre-server.conf, +files/calibre-server.init, + -calibre-0.8.33.ebuild: + 0.8.35 version bump, with calibre-server init script thanks to Erik Zeek + <zeekec@mad.scientist.com> from bug #397913. *calibre-0.8.34 (06 Jan 2012) diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest index c6199646b33c..fa37d4ff14e1 100644 --- a/app-text/calibre/Manifest +++ b/app-text/calibre/Manifest @@ -1,16 +1,18 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -DIST calibre-0.8.33.tar.xz 21848976 RMD160 c96db47b9d5590003865aeebc803befbc0cc60e1 SHA1 ac2ddfe17ccd70a6c045528e99e0904ad78a7ead SHA256 885baed4810a92ceea78c49e4780a00aed19166b2475b430c9491396d3c0b74d +AUX calibre-server.conf 523 RMD160 4cae757bc84775b66304d969f241b5e377b0e469 SHA1 4b88e517fb24c2b306e12d306bdcff4709f4820e SHA256 55b20e6a208f7eb7128e0f8e0f8ead83a55ef80bcb62737d1658074141a5b213 +AUX calibre-server.init 1928 RMD160 673b3128df7c24151a74a5c87b54020cb63bee62 SHA1 8192780f7c70a027fa962619d519b136d3d8a7b8 SHA256 d5632da5955d1304a0b750850b8933eb053ee3462d0a9f74c941a45d8b65707b DIST calibre-0.8.34.tar.xz 22016360 RMD160 a74a1768c2df5edf016f34e15523c3c8dd5ed902 SHA1 3e24379b6e9402311eb3673ca98e5964c50710c1 SHA256 33ce60f601cc4a9bb95ef4acac3b8cffa82b544acc515515bb3e47e032912234 -EBUILD calibre-0.8.33.ebuild 5501 RMD160 480e332f6a7019144154e952f605743441598e92 SHA1 268e88e1110b86712f22f68abf4e748187d02125 SHA256 0e6643b94da6a7e72c1fe5f9aa1c24009941544bcb60efc7359601aed0ed692b +DIST calibre-0.8.35.tar.xz 23557860 RMD160 d445ed6deb4c7d9586799eef307f4d15a96486ef SHA1 3a1fa9d9096998a9bc0b811b769d9e60eec10dc4 SHA256 3ddd9c0f332bfaebca9de6dd0cc6b59e13cf38931532eddfa8e317d078711337 EBUILD calibre-0.8.34.ebuild 5501 RMD160 0704f11ea6f7e6960b63263decaddd9abd1f6ea6 SHA1 f96f23657cc0656b15a1a5d38e391a1c267aa622 SHA256 2d1b472df9ce49a9fb0361f3d228d5044bb0f727ada506545abb13609fdddae8 -MISC ChangeLog 29078 RMD160 fd9f46df85185288d463a30f0cafdd3ff19475fa SHA1 fec0de31a3596ead37682ba7d17a043b2c392c77 SHA256 cb62c6ae92fa9f30dc79cfe4d47b283c369b3e8b27122ae291a514e3cf93a3b5 +EBUILD calibre-0.8.35.ebuild 6010 RMD160 fe58d1e3b0998fce4309aa28c5a1c176997c9216 SHA1 b32dc59052e45da9a8bacc4152f008cc6ea0ddd0 SHA256 e2d7df71b4dbfe3e68f422609525baab1889951dbf4bdf8fed0173224b7f08ef +MISC ChangeLog 29387 RMD160 121a68594fb9a99bfb9732314778fe2ad54cc230 SHA1 e6394fd7a8ee9503acef2923538d2e4c4a94fde8 SHA256 5298c89339f79099cc305d8fee368fb37b2902e9857dd8661905ee3cc05087d7 MISC metadata.xml 340 RMD160 87b372ab564a33c6eb65bc2656e39cafe431ee97 SHA1 3b79f0e21800238651f138d5e1f7101bb80c8f5a SHA256 db5a0163e41af3aa60492fbffbbd971e2ca9d76097d5da9d3aabf3c16e4294b9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAk8Gwf0ACgkQ/ejvha5XGaPQlQCg6Q6GubOBZZr4nsnLd0qROpcT -XKQAnivMlW+MtDPMrWdi9EN9s0fJz41f -=Z63f +iEYEARECAAYFAk8RyPsACgkQ/ejvha5XGaNHUwCfcSbJALm6AMaMb0rQQaZcAiRK +P40AmgJplUV+wjKKWXvWsu/qpNUZua1I +=IWqO -----END PGP SIGNATURE----- diff --git a/app-text/calibre/calibre-0.8.33.ebuild b/app-text/calibre/calibre-0.8.35.ebuild index f3573777998a..b0db591b210b 100644 --- a/app-text/calibre/calibre-0.8.33.ebuild +++ b/app-text/calibre/calibre-0.8.35.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.8.33.ebuild,v 1.1 2011/12/30 22:06:55 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.8.35.ebuild,v 1.1 2012/01/14 18:27:01 zmedico Exp $ EAPI=4 PYTHON_DEPEND=2:2.7 @@ -73,6 +73,14 @@ src_prepare() { sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ -i setup/install.py || die "sed failed to patch install.py" + sed -e "/^ self\\.check_call(qmc + \\[ext\\.name+'\\.pro'\\])$/a\ +\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ +'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ +'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ +'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ +'-i', 'Makefile'])" \ + -i setup/extensions.py || die "sed failed to patch extensions.py" + distutils_src_prepare } @@ -109,7 +117,7 @@ src_install() { mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" # Bug #334243 - respect LDFLAGS when building calibre-mount-helper - export OVERRIDE_CFLAGS="$CFLAGS $LDFLAGS" + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" local libdir=$(get_libdir) [[ -n $libdir ]] || die "get_libdir returned an empty string" @@ -159,6 +167,9 @@ src_install() { find "${ED}"usr/etc -type d -empty -delete python_convert_shebangs -r $(python_get_version) "${ED}" + + newinitd "${FILESDIR}"/calibre-server.init calibre-server + newconfd "${FILESDIR}"/calibre-server.conf calibre-server } pkg_postinst() { diff --git a/app-text/calibre/files/calibre-server.conf b/app-text/calibre/files/calibre-server.conf new file mode 100644 index 000000000000..c1bed84289cc --- /dev/null +++ b/app-text/calibre/files/calibre-server.conf @@ -0,0 +1,13 @@ +# /etc/conf.d/calibre-server +# Change this to the user you want to run calibre-server as. +# You may specify a group too, after a colon +# NOTE: This must be set and not to root! +CALIBRE_USER= + +# Set the path of the library to serve. +# Defaults to the default location for CALIBRE_USER. +#CALIBRE_LIBRARY='<user home directory>/Calibre Library' + +# Extra options to pass to calibre-server. +# See the calibre-server man page for more options. +#CALIBRE_OPTS="--username calibre --password password --thread-pool 10 --port 8080" diff --git a/app-text/calibre/files/calibre-server.init b/app-text/calibre/files/calibre-server.init new file mode 100644 index 000000000000..f17270721bf4 --- /dev/null +++ b/app-text/calibre/files/calibre-server.init @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/files/calibre-server.init,v 1.1 2012/01/14 18:27:01 zmedico Exp $ + +depend() { + need net + need localmount + after bootmisc +} + +checkconfig() { + if [ "${CALIBRE_USER}" = "" -o "${CALIBRE_USER}" = "root" ] ; then + eerror "Please edit /etc/conf.d/calibre-server" + eerror "You have to specify a user to run calibre-server as, as we will not run it as root!" + eerror "Modify CALIBRE_USER to your needs (you can also add a group, after a colon)" + return 1 + fi + if ! getent passwd "${CALIBRE_USER%:*}" >/dev/null ; then + eerror "Please edit /etc/conf.d/calibre-server" + eerror "Your user has to exist!" + return 1 + fi + if [ "${CALIBRE_USER%:*}" != "${CALIBRE_USER}" ] ; then + if ! getent group "${CALIBRE_USER#*:}" >/dev/null ; then + eerror "Please edit /etc/conf.d/calibre-server" + eerror "Your group has to exist too!" + return 1 + fi + fi + if [ "${CALIBRE_LIBRARY}" = "" ] ; then + CALIBRE_USER_HOME=$(getent passwd "${CALIBRE_USER%:*}" | cut -d ':' -f 6) + CALIBRE_LIBRARY="${CALIBRE_USER_HOME}/Calibre Library" + fi + if [ ! -d "${CALIBRE_LIBRARY}" ] ; then + eerror "Please edit /etc/conf.d/calibre-server" + eerror "The Calibre library, '${CALIBRE_LIBRARY},' does not exist." + eerror "Please modify CALIBRE_LIBRARY to point to a valid library." + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + local pidfile=/var/run/calibre-server.pid + ebegin "Starting calibre-server" + start-stop-daemon --user "${CALIBRE_USER}" \ + --pidfile "${pidfile}" --make-pidfile --background --exec /usr/bin/calibre-server \ + -- --with-library "${CALIBRE_LIBRARY}" ${CALIBRE_OPTS} + eend $? +} + +stop() { + ebegin "Stopping calibre-server" + start-stop-daemon --stop --user "${CALIBRE_USER}" \ + --pidfile /var/run/calibre-server.pid + eend $? +} |