1
0
mirror of synced 2024-11-11 07:28:58 +01:00
TheChymera-overlay/net-p2p/btsync/btsync-1.1.82.ebuild

64 lines
1.5 KiB
Bash
Raw Normal View History

2013-10-20 03:01:00 +02:00
# Copyright (C) 2013 Jonathan Vasquez
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
inherit systemd user
DESCRIPTION="Automatically sync files via secure, distributed technology."
HOMEPAGE="http://labs.bittorrent.com/experiments/sync.html"
SRC_URI="
amd64? ( http://syncapp.bittorrent.com/${PV}/${PN}_x64-${PV}.tar.gz )
x86? ( http://syncapp.bittorrent.com/${PV}/${PN}_i386-${PV}.tar.gz )
arm? ( http://syncapp.bittorrent.com/${PV}/${PN}_arm-${PV}.tar.gz )
ppc? ( http://syncapp.bittorrent.com/${PV}/${PN}_powerpc-${PV}.tar.gz )"
RESTRICT="mirror strip"
LICENSE="BitTorrent"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
QA_PREBUILT="opt/${PN}/${PN}"
S="${WORKDIR}"
pkg_setup() {
enewgroup btsync
}
src_install() {
exeinto "/opt/${PN}"
doexe btsync
insinto "/etc/${PN}"
doins "${FILESDIR}/config"
doinitd "${FILESDIR}/init.d/${PN}"
cp ${FILESDIR}/btsync.service ${D}/btsync@.service
systemd_dounit "${D}/btsync@.service"
mkdir ${D}/opt/${PN}/pid/
fowners -R root:btsync /opt/${PN}
fperms -R 775 /opt/${PN}
}
pkg_postinst() {
ewarn "You have to add your user to the btsync group to use btsync.
Do this by running the following command from a root terminal:
usermod -a -G btsync your_user
If you are using systemd you should start the service per user:
systemctl start btsync@your_user
You may also tell your system to automatically launch btsync:
systemctl enable btsync@your_user
You may access the web-GUI at localhost:8888.
"
}