1
0
mirror of synced 2024-12-22 21:00:20 +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) *bittorrent-sync-9999 (21 Jan 2016)
21 Jan 2016; <chymera@gentoo.org> +bittorrent-sync-9999.ebuild: 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 # Distributed under the terms of the GNU General Public License v2
# Authors: Horea Christian, Robert Walker
EAPI=5 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" NAME="btsync"
HOMEPAGE="http://labs.bittorrent.com/experiments/sync.html" 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 ) 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 ) 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 )" arm? ( https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz )"
@ -15,63 +15,43 @@ RESTRICT="mirror strip"
LICENSE="BitTorrent" LICENSE="BitTorrent"
SLOT="0" SLOT="0"
KEYWORDS="" KEYWORDS=""
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}" S="${WORKDIR}"
QA_PREBUILT="/opt/${PN}/" pkg_setup() {
local btsyncuser="btsync"
src_install() { enewgroup ${btsyncuser}
dodoc "${S}/LICENSE.TXT" enewuser btsync -1 -1 /var/lib/${NAME} ${btsyncuser}
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_preinst() { src_install() {
enewgroup "${PN}" # Install the executable
enewuser "${PN}" -1 -1 -1 "${PN}" exeinto "/opt/${NAME}"
dodir "/run/${PN}" doexe "${S}/${NAME}"
fowners "${PN}":"${PN}" "/run/${PN}"
dodir "/var/lib/${PN}" # Install a default configuration file
fowners "${PN}":"${PN}" "/var/lib/${PN}" 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() { pkg_postinst() {
einfo "Auto-generated configuration file is located at /etc/btsync.conf" elog "In order for shared files between local users to be as easy as possible,"
einfo "(use this file as a template for user-level privilege service units)" elog "please set up ACLs on your system."
einfo "" elog ""
einfo "systemd" elog "You will also need to configure btsync by editing /etc/btsync/config"
einfo "btsync.service:" elog ""
einfo " run as a system service as user/group btsync:btsync" elog "After checking your config, start the service and point your browser to"
einfo " uses /var/lib/btsync for btsync working data" elog "http://localhost:8888 , the default username and password is admin/admin."
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)"
} }