summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2013-08-18 16:41:09 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2013-08-18 16:41:09 +0000
commita57e8fabef3984a59531e0a05006c150c101ab6e (patch)
treed33e24457b3e1c70750c22815359dc3d51b7b4ef /media-video/ushare
parentfix Manifest (diff)
downloadgentoo-2-a57e8fabef3984a59531e0a05006c150c101ab6e.tar.gz
gentoo-2-a57e8fabef3984a59531e0a05006c150c101ab6e.tar.bz2
gentoo-2-a57e8fabef3984a59531e0a05006c150c101ab6e.zip
bring back sysconf option. Add systemd unit file
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)
Diffstat (limited to 'media-video/ushare')
-rw-r--r--media-video/ushare/ChangeLog9
-rw-r--r--media-video/ushare/files/ushare.init.d.ng36
-rw-r--r--media-video/ushare/files/ushare.service11
-rw-r--r--media-video/ushare/ushare-1.1a-r6.ebuild (renamed from media-video/ushare/ushare-1.1a-r4.ebuild)33
4 files changed, 78 insertions, 11 deletions
diff --git a/media-video/ushare/ChangeLog b/media-video/ushare/ChangeLog
index 7bf9be7f730f..f3406c54c531 100644
--- a/media-video/ushare/ChangeLog
+++ b/media-video/ushare/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-video/ushare
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ChangeLog,v 1.24 2013/02/16 08:36:16 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ChangeLog,v 1.25 2013/08/18 16:41:09 hwoarang Exp $
+
+*ushare-1.1a-r6 (18 Aug 2013)
+
+ 18 Aug 2013; Markos Chandras <hwoarang@gentoo.org> -ushare-1.1a-r4.ebuild,
+ +ushare-1.1a-r6.ebuild, +files/ushare.init.d.ng, +files/ushare.service:
+ Revbump to bring back the sysconf support and migrate away from the
+ /etc/conf.d/ushare file. This also allows easier intergration with systemd.
16 Feb 2013; Pacho Ramos <pacho@gentoo.org> ushare-1.1a-r5.ebuild:
Don't show elog messages always (#457596)
diff --git a/media-video/ushare/files/ushare.init.d.ng b/media-video/ushare/files/ushare.init.d.ng
new file mode 100644
index 000000000000..7f9920ab1b38
--- /dev/null
+++ b/media-video/ushare/files/ushare.init.d.ng
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/files/ushare.init.d.ng,v 1.1 2013/08/18 16:41:08 hwoarang Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting uShare"
+
+ if [[ ! -f /etc/ushare.conf && -f /etc/conf.d/ushare ]]; then
+ ewarn "Please migrate your settings from"
+ ewarn "/etc/conf.d/ushare to the new /etc/ushare.conf file"
+ ewarn "and then delete the /etc/conf.d/ushare file."
+ eerror "User migration steps are needed!"
+ fi
+
+ if [[ -f /etc/ushare.conf && -f /etc/conf.d/ushare ]]; then
+ ewarn "Old configuration file /etc/conf.d/ushare detected!"
+ ewarn "Please migrate your settings to the new /etc/ushare.conf file"
+ ewarn "and then delete the old one."
+ eerror "Use migration steps are needed!"
+ fi
+
+ start-stop-daemon --start --quiet -u ushare \
+ --exec /usr/bin/ushare -- -D --cfg=/etc/ushare.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uShare"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ushare
+ eend $?
+}
diff --git a/media-video/ushare/files/ushare.service b/media-video/ushare/files/ushare.service
new file mode 100644
index 000000000000..a1ea1080fce6
--- /dev/null
+++ b/media-video/ushare/files/ushare.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ushare Media Server
+Requires=network.target
+
+[Service]
+Type=forking
+User=ushare
+ExecStart=/usr/bin/ushare -D --cfg=/etc/ushare.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-video/ushare/ushare-1.1a-r4.ebuild b/media-video/ushare/ushare-1.1a-r6.ebuild
index 3b740456a4b6..46d3758d5b26 100644
--- a/media-video/ushare/ushare-1.1a-r4.ebuild
+++ b/media-video/ushare/ushare-1.1a-r6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ushare-1.1a-r4.ebuild,v 1.1 2012/08/18 15:06:05 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ushare-1.1a-r6.ebuild,v 1.1 2013/08/18 16:41:09 hwoarang Exp $
EAPI=4
-inherit eutils multilib user
+inherit eutils multilib readme.gentoo toolchain-funcs user systemd
DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
HOMEPAGE="http://ushare.geexbox.org/"
@@ -11,7 +11,7 @@ SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 x86"
+KEYWORDS="~amd64 ~x86"
IUSE="dlna nls"
RDEPEND=">=net-libs/libupnp-1.6.14
@@ -20,32 +20,45 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
+ EPATCH_EXCLUDE="06_all_ushare_disable_sysconf.patch"
EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \
EPATCH_OPTS="-p1" epatch
+
+ DOC_CONTENTS="Please edit /etc/ushare.conf to set the shared directories
+ and other important settings. Check system log if ushare is
+ not booting."
}
src_configure() {
local myconf
- myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)"
+ myconf="--prefix=/usr --sysconfdir=/etc --disable-strip $(use_enable dlna)"
# nls can only be disabled, on by default.
use nls || myconf="${myconf} --disable-nls"
# I can't use econf
# --host is not implemented in ./configure file
+ tc-export CC CXX
+
./configure ${myconf} || die "./configure failed"
}
src_install() {
emake DESTDIR="${D}" install
doman src/ushare.1
- newconfd "${FILESDIR}"/ushare.conf.d ushare
- newinitd "${FILESDIR}"/ushare.init.d ushare
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}.init.d.ng ${PN}
dodoc NEWS README TODO THANKS AUTHORS
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ readme.gentoo_create_doc
}
pkg_postinst() {
enewuser ushare
- elog "Please edit /etc/conf.d/ushare to set the shared directories"
- elog "and other important settings. Check system log if ushare is"
- elog "not booting."
+ readme.gentoo_print_elog
+ elog
+ elog "The config file has been moved to /etc/ushare.conf"
+ elog "Please migrate your settings from /etc/conf.d/ushare"
+ elog "to /etc/ushare.conf in order to use the ushare init script"
+ elog "and systemd unit service."
+ elog
}