1
0
mirror of synced 2024-12-22 12:50:33 +01:00

net-p2p/bittorrent-sync: updated ebuild

Package-Manager: portage-2.2.26
This commit is contained in:
Horea Christian 2016-01-21 01:55:25 +01:00
parent a5c4106227
commit 38ad95ee9d
No known key found for this signature in database
GPG Key ID: 0D5087BE29AA1C79
2 changed files with 39 additions and 56 deletions

View File

@ -1,3 +1,6 @@
21 Jan 2016; <chymera@gentoo.org> bittorrent-sync-9999.ebuild:
net-p2p/bittorrent-sync: updated ebuild
*bittorrent-sync-9999 (21 Jan 2016)
21 Jan 2016; <chymera@gentoo.org> +bittorrent-sync-9999.ebuild:

View File

@ -1,12 +1,12 @@
# Distributed under the terms of the GNU General Public License v3
# Authors: Horea Christian, Robert Walker
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils pax-utils user flag-o-matic multilib autotools pam systemd versionator
inherit user systemd
DESCRIPTION="Sync files & folders using BitTorrent protocol"
HOMEPAGE="http://labs.bittorrent.com/experiments/sync.html"
NAME="btsync"
DESCRIPTION="Fast, unlimited and secure file-syncing. Free from the cloud."
HOMEPAGE="http://www.getsync.com/"
SRC_URI="amd64? ( https://download-cdn.getsync.com/stable/linux-x64/BitTorrent-Sync_x64.tar.gz )
x86? ( https://download-cdn.getsync.com/stable/linux-i386/BitTorrent-Sync_i386.tar.gz )
arm? ( https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz )"
@ -15,63 +15,43 @@ RESTRICT="mirror strip"
LICENSE="BitTorrent"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}"
QA_PREBUILT="/opt/${PN}/"
src_install() {
dodoc "${S}/LICENSE.TXT"
newconfd "${FILESDIR}/${PN}_confd" "/${PN}"
# system-v-init support
newinitd "${FILESDIR}/${PN}_initd" "/${PN}"
# systemd support
systemd_dounit "${FILESDIR}/${PN}.service"
systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
#systemd_newuserunit "${FILESDIR}/${PN}_user.service" "${PN}.service"
insinto "$(systemd_get_userunitdir)"
newins "${FILESDIR}/${PN}_user.service" "${PN}.service"
exeinto "/opt/${PN}/bin/"
doexe "${FILESDIR}/${PN}_setup"
doexe "${PN}"
pkg_setup() {
local btsyncuser="btsync"
enewgroup ${btsyncuser}
enewuser btsync -1 -1 /var/lib/${NAME} ${btsyncuser}
}
pkg_preinst() {
enewgroup "${PN}"
enewuser "${PN}" -1 -1 -1 "${PN}"
dodir "/run/${PN}"
fowners "${PN}":"${PN}" "/run/${PN}"
dodir "/var/lib/${PN}"
fowners "${PN}":"${PN}" "/var/lib/${PN}"
src_install() {
# Install the executable
exeinto "/opt/${NAME}"
doexe "${S}/${NAME}"
# Install a default configuration file
insinto "/etc/${NAME}"
newins "${FILESDIR}/btsync.conf" "${NAME}.conf"
# Install the OpenRC init file
doinitd "${FILESDIR}/init.d/${NAME}"
# Install the systemd unit file
systemd_dounit "${FILESDIR}/systemd/${NAME}.service"
for x in {/var/lib,/run}/${NAME}; do
keepdir "${x}"
fowners btsync:btsync "${x}"
done
}
pkg_postinst() {
einfo "Auto-generated configuration file is located at /etc/btsync.conf"
einfo "(use this file as a template for user-level privilege service units)"
einfo ""
einfo "systemd"
einfo "btsync.service:"
einfo " run as a system service as user/group btsync:btsync"
einfo " uses /var/lib/btsync for btsync working data"
einfo "btsync@<user>.service"
einfo " run as a system service but with user privilege"
einfo " uses /home/<user>/.btsync/btsync.conf for btsync working data"
einfo "btsync_user.service"
einfo " run as a standard user service"
einfo " uses /home/<user>/.btsync/btsync.conf for btsync working data"
einfo ""
einfo "Ensure you open the following ports in your firewall:"
einfo " btsync.conf specified sync listening port (UDP/TCP)"
einfo " port 3838 (UDP) for DHT tracking"
einfo ""
einfo "WebUI listens on: localhost:(8888), nominally localhost:(7888+UID)"
elog "In order for shared files between local users to be as easy as possible,"
elog "please set up ACLs on your system."
elog ""
elog "You will also need to configure btsync by editing /etc/btsync/config"
elog ""
elog "After checking your config, start the service and point your browser to"
elog "http://localhost:8888 , the default username and password is admin/admin."
}