diff options
author | Naohiro Aota <naota@gentoo.org> | 2012-05-16 12:46:14 +0000 |
---|---|---|
committer | Naohiro Aota <naota@gentoo.org> | 2012-05-16 12:46:14 +0000 |
commit | 8484928983d6b9b3c2bb2a7f96bf64c922858271 (patch) | |
tree | 1f1a8c1babef64dea3eaae534d35a10c447017d4 /net-misc | |
parent | Depend on virtual/ffmpeg and bump to eapi4. Fixes bug#362163. (diff) | |
download | gentoo-2-8484928983d6b9b3c2bb2a7f96bf64c922858271.tar.gz gentoo-2-8484928983d6b9b3c2bb2a7f96bf64c922858271.tar.bz2 gentoo-2-8484928983d6b9b3c2bb2a7f96bf64c922858271.zip |
Add init script. #376703; Depend on librsync only when USE=-librsync-bundled #406089; Version bumped. #415545
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/dropbox/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/dropbox/dropbox-1.4.3.ebuild | 79 | ||||
-rw-r--r-- | net-misc/dropbox/files/dropbox.conf | 14 | ||||
-rw-r--r-- | net-misc/dropbox/files/dropbox.initd | 67 |
4 files changed, 168 insertions, 1 deletions
diff --git a/net-misc/dropbox/ChangeLog b/net-misc/dropbox/ChangeLog index 80ee22fa9068..0495f5f823c3 100644 --- a/net-misc/dropbox/ChangeLog +++ b/net-misc/dropbox/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/dropbox # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbox/ChangeLog,v 1.19 2012/05/12 08:53:38 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbox/ChangeLog,v 1.20 2012/05/16 12:46:14 naota Exp $ + +*dropbox-1.4.3 (16 May 2012) + + 16 May 2012; Naohiro Aota <naota@gentoo.org> +dropbox-1.4.3.ebuild, + +files/dropbox.conf, +files/dropbox.initd: + Add init script. #376703; Depend on librsync only when USE=-librsync-bundled + #406089; Version bumped. #415545 12 May 2012; Pacho Ramos <pacho@gentoo.org> dropbox-1.2.51-r2.ebuild: Use bundled rsync by default (as previous versions) because dropbox completely diff --git a/net-misc/dropbox/dropbox-1.4.3.ebuild b/net-misc/dropbox/dropbox-1.4.3.ebuild new file mode 100644 index 000000000000..544aeaf5bfbd --- /dev/null +++ b/net-misc/dropbox/dropbox-1.4.3.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbox/dropbox-1.4.3.ebuild,v 1.1 2012/05/16 12:46:14 naota Exp $ + +EAPI="4" + +inherit gnome2-utils pax-utils + +DESCRIPTION="Dropbox daemon (pretends to be GUI-less)" +HOMEPAGE="http://dropbox.com/" +SRC_URI="x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz ) + amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )" + +LICENSE="CCPL-Attribution-NoDerivs-3.0 FTL MIT LGPL-2 openssl dropbox" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+librsync-bundled" +RESTRICT="mirror strip" + +QA_DT_HASH="opt/${PN}/.*" +QA_EXECSTACK_x86="opt/dropbox/_ctypes.so" +QA_EXECSTACK_amd64="opt/dropbox/_ctypes.so" + +DEPEND="x11-themes/hicolor-icon-theme" +# Be sure to have GLIBCXX_3.4.9, #393125 +RDEPEND=" + app-arch/bzip2 + dev-libs/popt + dev-libs/openssl:0.9.8 + media-libs/libpng:1.2 + !librsync-bundled? ( net-libs/librsync ) + net-misc/wget + >=sys-devel/gcc-4.2.0 + sys-libs/zlib +" + +src_unpack() { + unpack ${A} + mkdir -p "${S}" + mv "${WORKDIR}/.dropbox-dist" "${S}"/src || die + cd "${S}"/src + rm -vf libstdc++.so.6 libz* libssl* libbz2* libpopt.so.0 libcrypto.so.0.9.8 libpng12.so.0 || die + if ! use librsync-bundled; then + rm -vf librsync.so.1 || die + fi + pax-mark cm "${S}/src/dropbox" + cd "${WORKDIR}" +} + +src_install() { + cd src || die + dodoc README ACKNOWLEDGEMENTS + rm README ACKNOWLEDGEMENTS || die + + local targetdir="/opt/dropbox" + insinto "${targetdir}" + doins -r * + fperms a+x "${targetdir}/dropbox" + fperms a+x "${targetdir}/dropboxd" + dosym "${targetdir}/dropboxd" "/opt/bin/dropbox" + + insinto /usr/share + doins -r icons + + newinitd "${FILESDIR}"/dropbox.initd dropbox + newconfd "${FILESDIR}"/dropbox.conf dropbox +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/net-misc/dropbox/files/dropbox.conf b/net-misc/dropbox/files/dropbox.conf new file mode 100644 index 000000000000..c20c3c4694ef --- /dev/null +++ b/net-misc/dropbox/files/dropbox.conf @@ -0,0 +1,14 @@ +# /etc/conf.d/dropbox.conf: config file for /etc/init.d/dropbox + +# Users to run dropbox +DROPBOX_USERS="" + +# integer [-20 .. 19 ] default 0 +# change the priority of the server -20 (high) to 19 (low) +# see nice(1) for description +#NICE=0 + +# See start-stop-daemon(8) for possible settings +#IONICE=2 + +PID_DIR=/var/run/dropbox diff --git a/net-misc/dropbox/files/dropbox.initd b/net-misc/dropbox/files/dropbox.initd new file mode 100644 index 000000000000..84c159fb3297 --- /dev/null +++ b/net-misc/dropbox/files/dropbox.initd @@ -0,0 +1,67 @@ +#!/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/net-misc/dropbox/files/dropbox.initd,v 1.1 2012/05/16 12:46:14 naota Exp $ + +PID_DIR=/var/run/dropbox + +depend() { + need localmount net + after bootmisc +} + +start() { + local tmpnice="${NICE:+"--nicelevel "}${NICE}" + local tmpionice="${IONICE:+"--ionice "}${IONICE}" + local started="" + + mkdir -p ${PID_DIR} + + ebegin "Starting dropbox" + for dbuser in ${DROPBOX_USERS}; do + local homedir=$(eval echo ~${dbuser}) + if test -d "${homedir}" && \ + start-stop-daemon -S -b \ + -m --pidfile ${PID_DIR}/$dbuser.pid \ + ${tmpnice} ${tmpionice} \ + -u ${dbuser} -v \ + -e HOME=${homedir} \ + -x /opt/bin/dropbox; then + started="${started} ${dbuser}" + else + eend $? + eerror "Failed to start dropbox for ${dbuser}" + if [ -n "${started}" ]; then + eerror "Stopping already started dropbox" + DROPBOX_USERS=${started} stop + fi + return 1 + fi + done + if [ -z "${started}" ];then + eerror "No dropbox started" + eend 1 + else + eend 0 + fi +} + +stop() { + local retval=0 + ebegin "Stopping dropbox" + for dbuser in ${DROPBOX_USERS}; do + start-stop-daemon --stop \ + --pidfile ${PID_DIR}/${dbuser}.pid || retval=$? + done + eend ${retval} +} + +status() { + for dbuser in ${DROPBOX_USERS}; do + if [ -e /var/run/dropbox-$dbuser.pid ] ; then + echo "dropboxd for USER $dbuser: running." + else + echo "dropboxd for USER $dbuser: not running." + fi + done +} |