diff --git a/net-p2p/btsync/Manifest b/net-p2p/btsync/Manifest index 5e9bf20..b2cb870 100644 --- a/net-p2p/btsync/Manifest +++ b/net-p2p/btsync/Manifest @@ -1,12 +1,26 @@ +AUX btsync@.service 227 SHA256 642a86e82ae572413076aec85437c4e339eb3643f10028fc9b0bc55010864fe4 SHA512 bb80ec245e457769a2afe2b43c90a47a055fa0e9c07cfbe458e700690ce33dfaa39c98360ebbb424ea4500cc47c53801d76e817d159e4b50b78d885bf47ad8dd WHIRLPOOL 9a0cc2c7c1ce3a2aa94cab074dbe059ae24eb12c30264874e3e9088ad248c25a33b84de59324de3f652b16c5fa8834bcefa59db8e4ab9d7271266c153ba4b876 +AUX btsync.service 218 SHA256 dd9a145f089ec2420f31e9b5caf8277942c7b6f9c9b341f6707f1435d43cd165 SHA512 ba6f7301b3edc7f2a3c925d9951bb02846224e1892da7e18997a54162efc35b730a1a4da2747b886323f5cfd739f34f5e71851a668a6fbb11f1012eb1d1da543 WHIRLPOOL a7bca1c94ef6ccda8457417182c5686ebfa4a78a8716045daf633c8904b40af93414b6c1ccf2f1a93cb5c82dff4cc557ca3717d374c6a35b17d4710afe56111b +AUX btsync_confd 101 SHA256 4b49669c0900eb34bbe10c28f2c0ea2b55aa390faf321089cfb14fcbc0ff63aa SHA512 53450a2b14f99eb9ef2d6f5116798ce052e6e2360b61ca14aea390136a081226373e9a3d3d50941648050125b84828a530f95fd5faaf46334070f3273f033c72 WHIRLPOOL 3e9c05c1a5043e32d10bb338099a9ddf6e44cfa0a6a7f7bd39d7e20af8af85e092c38d66f3905883145c5e471f00dc6f63a111b4fe6b0b8bb1c77ddfa91c0039 +AUX btsync_initd 750 SHA256 94110485db134e3c0d8a891da3058ff26f8bba39f62a8a6756088ecfcc260a4c SHA512 8fd145f350d1f2294ebba117f2da4b0573ad17a09108867802680ee487b143f80a244755601deb7d9ca539dd5e009b53691e6ba8173ab4dabaabacef6789f5de WHIRLPOOL 9a1a15ecfcf4e1c84c42f361463f4035464082bfd6c8e04fb753303b497973329303214eda42d41ef1262128a8fd337b5941fbc9e0f13f4b549be4ae903bcad1 +AUX btsync_user.service 212 SHA256 dcef7bb26cd8c41df60f6970ed8d28839592f59046d4c1a53461c78edbbb7e8b SHA512 b9fbd3ec4de5f2aee42ebb0c7d18156acf8f84634a586c43f6fe8ff8061da3087ec2ef3fae0f1cb947e766e976f5250a0164f99dc35d918828088e61d48a6953 WHIRLPOOL 1c848008fb2e45c2cdcd42d5e0c315c4418ab60c5fc8cba9001c414423f0705e1237c341f71711586b53220dcc7e5013b7d98465ce7f0b8053c6a4ce922cf35c DIST btsync_arm-1.1.70.tar.gz 1279220 SHA256 d79b3cf1881fcab95614693569c950d07dd93ffb70cefd901963dec54b75a05b SHA512 321079de894170eafdd8f923f2e1bfd0909904d350b678707f67566ed0afd1ef8af333270b791d6a429774d7e454da4ef064b417be36b338de2e53599e699bd3 WHIRLPOOL f6499199eae078bc7609aa190a61800866dffbc40fcf08f1ae65456ab6ebf36123e5542b3bbff39f0e61d7ae7161d97684ebed3f091145a90e6eb0b789d3db41 DIST btsync_arm-1.1.82.tar.gz 1287272 SHA256 c1502fb7d907caf105c7aa5403f4d575f86aa8ca57817ca90aa4ba1398181a3e SHA512 627e24495f3ee1f48f666a85df8d053f5f7ed51784c23d454410d468773c0d6251211ea188f8235b1cb3c14da20e01a5d4cfdc28b0e16de841a4c805ed2bfbe4 WHIRLPOOL 9d58ff32d68e969a64f2c51cae865b5372f69835b90855de61e927355e794d686760ddef8a651076a6bfb01e4269d15c1e2883f0910f7ac25c3c989097bdf4ed DIST btsync_arm-1.2.82.tar.gz 2244128 SHA256 e9f1a3aacfda8e1b5002228de134e5798ff4e0a69ca749fcde6f803c5b500885 SHA512 203806be2d7f066420b006a3eb3897a67d02fde4edef7778cbf6c17b057e8e5102aeefd08f446854fe7db0a595f2dc0468d6ea5b7d8db110a5d3fafc46656182 WHIRLPOOL 8746e9e924b48429d8847a3a190ebd5db9d9bea1b36c23a05d3e5258908741c3740c28d93d488608d3df36d7466da2d1887df30dd524e5c3bedbd9296c3efebc +DIST btsync_arm-1.3.94.tar.gz 2355923 SHA256 82f3e5a01c81723a2586e8db733127a91572527f7574425ba812b0fcafeba4d5 SHA512 a16412abea6ce7c08311771e30b1e30a354756081ca8f2765497c0ae55889f7dca8efe4bc7972a53ca632d83831d14075447d32072db0980c8260248b9a23495 WHIRLPOOL 59460634541ff6d10ff7cf5f2c67b4d2116ff77d7266b2e58e64dd75aa1ba6199239e13dd0d4a626ee37e05fc127a73683d106860785976ab4e26ea5e7f1d2f2 DIST btsync_i386-1.1.70.tar.gz 1367784 SHA256 25161852b8eaddf50ae385771f79bac47818467bc5cabc539a64d985e8af4dc6 SHA512 ac18a91a2d9549388541c2c7dabcae1e8b04534115d3c7e5d93b3fe984c801ebdeed931d63d59e7e7e767587fe42d2bb80e6833127b4cf475d30130314f5c864 WHIRLPOOL a5b12b32a521b7f730b8e9cd1505ac4b7ccd56f0d5f91a1988192b32a539a48380d040d6485327153051708c4d5919d517202d90aaf3c8033bdb730b72981314 DIST btsync_i386-1.1.82.tar.gz 1375007 SHA256 1b163881631d008ea5472b1f03a49e96f2a107b9565c5d8ae48124042e3a4def SHA512 2f7f24989412945f1da18d88760e955fa55ca8e97a75e2e72e48a001e6a3d9253a7c0856e5b8dfc5bef9dcd8c405f76f1aed6f05fdb0ae7f2bdffe0c6f90a1a8 WHIRLPOOL daf2af288b1e55bd3700bfba600eab9b975ad3701cf41b921554bcc5760096c8afba90ef70a3e4972d73eaf92fd82815f0d19d36de55547529f0eba175b094bd DIST btsync_i386-1.2.82.tar.gz 2044500 SHA256 3a1ed93c2b27be0ca9711bd4736de3dd62d6527b1cbbbdfc0f124e0ea6b339ad SHA512 71d34dbb006ada48a51d3cb9528f62c1607d91b808cdb21b3b19b67c90fc5c85143b251dad48831941b5c93f95fba1d74e3a7a82e8b4bf2831bbfbf083c4402b WHIRLPOOL 6b65873441594bb449c50019e955a2ce6ac1fabc0fff4739f1467232b174b4c03df1cec9b29e236f1bcdef31e045640468ef681107b595434cd73c66b0e60bcf +DIST btsync_i386-1.3.94.tar.gz 2157170 SHA256 d39dbaf08c66f2dcdcf9c22c9a95727ba7da2030b092c5be1922f548190fb482 SHA512 d1abf01d7c5191590a50cb3445cae95cb0bcda8a1705dde3452eae588fa00995b8c766abb5a203dc5e6a073293f7db437a851c153f1f43cfe03c249772e66f02 WHIRLPOOL e1859c305f131b90e2a9a2d61f951a8a644ad3ca9b6039bc0d20ae53c8a5bb9784e4cc635727c1e25fb73ff79af2068d1397a7f34c25f4f59e407581f9d69f4c DIST btsync_powerpc-1.1.70.tar.gz 1451029 SHA256 7d68783020627a019363c20d776aaf017bde023886989cac4bd96528fdae9faf SHA512 7f0e22d1cf10e7ebbae78e43cbd84d4d4de2b20478a6605534ee4c04ade68b2bbdea33049a9861cfd53badc4e7e7b2ff24e35c3156d3cf62a8828300094ba5ba WHIRLPOOL ab33985672e29c69c7aaa9729c93dd35a78152fde6b64adaba8a04f93f3ef4006defe240d127e33f6f348a7b825a3ce2e642228f43beb64ecd2fb811f300bdf3 DIST btsync_powerpc-1.1.82.tar.gz 1458242 SHA256 076f92c1b4340eb1283e053065df6156b43730c5603961eb6f127d38792aebf3 SHA512 ad96616c3b2edcb5a7829a4d9dd4d82aa3bf60d66d1c0b0f40697510786e83682c7348dd4be6ec35e553544d3ccadf08e1f5f073032995b87cfc8aa586570fe7 WHIRLPOOL 0eb2969d376b172a7550c1f050cfe55c817a1cd12282e0ec8bc95fb0f0ad860494d3afb53e328d8a482e39cf4f4d813cf9ef63d1c7dfcefbcd2728a2f9764d7c DIST btsync_powerpc-1.2.82.tar.gz 2188642 SHA256 d89ed515e968a9f92784b2e65ad23ff4488ea36ddc826651dce5ac78ae37d90b SHA512 85c7e9674dd85cef3587dcac29ada8dc6bc2b8ba63d70fea8924384ac15aaa0e38a6e7f85ce52b8c804dd364f1fd4c2de85d327b0bbebbf232b7b70203328e01 WHIRLPOOL abc5202f87cb3135277b9933c7b13e8558fd40b6cde5703fb849801ad60eae3694ff661a13beea7d559b6dfc6e9420c6a344e63f76452e053b1537ef5cd8819b +DIST btsync_powerpc-1.3.94.tar.gz 2293294 SHA256 7b274385a80a819b51b49f9e3bb1916d85f9453116603540c7ca9a4cb793c06f SHA512 762f4ed5f8ec5830cf1266fae02460622b4c06b82f0aa733024dfb0e544cd9085394f0a3f80529ddd02afc84375a646fc975a1c75ae3731c5f016aa31fc35471 WHIRLPOOL 392ac4520059e782d4faebba9a43b776ca6529edeb4be1ba7c1ace96cd905184606816140525efbd895b690587ff75ad6d3281ab51bf1e62707c8bd6a6fafc19 DIST btsync_x64-1.1.70.tar.gz 1449204 SHA256 7197ac1a23ff593b1cc6ef124cb2555376aac4637f368483ed2e0d5230b3dec2 SHA512 768f960935cacd1ccc655e9182ada0ddf61d4b8fd0dc8a5386182a46014e6bd11f1743a78884f17b9d3b04d6668bb98c56bce8019c902a216ed26d65a60492c7 WHIRLPOOL 6261713d643ef0eb9816837975a0d0af534819cf978de8370b088c93bd86770f3053c0976e27aee32fc00b0ecf1a9a01cf083e95c1325dcd632896a6e6b5bf2c DIST btsync_x64-1.1.82.tar.gz 1457129 SHA256 3cefbef2af6323dfdb7ccfaad32f7d0c8ed5cb4ebbab58936a479f0c30804bbb SHA512 513048820cdfa02bf90bb731479baf84f7e43947cd3794d3d867f785ed7750b50518b5ed1f5447d78d563eaf25079669293d4da66624c0c8cc501213e1ec8808 WHIRLPOOL 7eab7873aefb8ef704082d782c2df4b3193ce9a0073e725180e3d1c4daa721d1a5110de698cfe07882351ed96ca4a87e84cc3b0ed2e8959d04aed0491a0d08cb DIST btsync_x64-1.2.82.tar.gz 2218854 SHA256 2a87c4ec255b3669decb9746d54f52ec7cc3bb019e9ba7f2f9bc9fb215d31933 SHA512 e1b47e13d35080c4f1275bc671581ce13690ca30ca7bbd6ce8d3598e35c79939b9a2d20aab2c7d566d10f603758487d670081e0bec8207039f90eca881d4c526 WHIRLPOOL ea05e594378e8ba6cd4f1f2429830b04cd8e3b4ac763fc2d9fb9f76e9075a59560123ba6112fd1e55c53f2a6b9da37cb737acdcba1881006b9fff2b11b6d1d81 +DIST btsync_x64-1.3.94.tar.gz 2328717 SHA256 3e1681379206fd5b857a3bb89367e7496e42a69bdceb12097a93f04236076af5 SHA512 9a44abf4386247fd18462780528d7e62a84599fc6f1439f7a453ad0e4795e2db161a7d18057fa1cf228513123e8df4e87fa7978b436381d1c72ef0a95238e37f WHIRLPOOL 586007436a55591442bf9de4eeb99ac2c0b915e7dfe3f616c66eca3bafe4cad17571aaa4b7a50e326c072b7261784ee83b4099f97a2209156552efd8325afced +EBUILD btsync-1.1.70.ebuild 2417 SHA256 16bac57bffbf25e192e73230b2412d66dd651c99c2af6bccfaa3fdb9f30a9fa4 SHA512 321df7d575f2f19a14cc5bb3ecf94859fa5710777cd8c16109fffec5da15c4a4b1cc55ee66e5c2ee70fd81723c610548ecb456bacfad109fcec9461f5824e227 WHIRLPOOL 8b874b2cd3696d217c10674d8a1f2420b19c54a55b8b22f3c2ca51fc38a2a390db1fb77687afa577c71d689d8e10d76c04768f800abb19d99d7b2b7789e7a460 +EBUILD btsync-1.1.82.ebuild 2417 SHA256 16bac57bffbf25e192e73230b2412d66dd651c99c2af6bccfaa3fdb9f30a9fa4 SHA512 321df7d575f2f19a14cc5bb3ecf94859fa5710777cd8c16109fffec5da15c4a4b1cc55ee66e5c2ee70fd81723c610548ecb456bacfad109fcec9461f5824e227 WHIRLPOOL 8b874b2cd3696d217c10674d8a1f2420b19c54a55b8b22f3c2ca51fc38a2a390db1fb77687afa577c71d689d8e10d76c04768f800abb19d99d7b2b7789e7a460 +EBUILD btsync-1.2.82.ebuild 2417 SHA256 16bac57bffbf25e192e73230b2412d66dd651c99c2af6bccfaa3fdb9f30a9fa4 SHA512 321df7d575f2f19a14cc5bb3ecf94859fa5710777cd8c16109fffec5da15c4a4b1cc55ee66e5c2ee70fd81723c610548ecb456bacfad109fcec9461f5824e227 WHIRLPOOL 8b874b2cd3696d217c10674d8a1f2420b19c54a55b8b22f3c2ca51fc38a2a390db1fb77687afa577c71d689d8e10d76c04768f800abb19d99d7b2b7789e7a460 +EBUILD btsync-1.3.94.ebuild 2417 SHA256 16bac57bffbf25e192e73230b2412d66dd651c99c2af6bccfaa3fdb9f30a9fa4 SHA512 321df7d575f2f19a14cc5bb3ecf94859fa5710777cd8c16109fffec5da15c4a4b1cc55ee66e5c2ee70fd81723c610548ecb456bacfad109fcec9461f5824e227 WHIRLPOOL 8b874b2cd3696d217c10674d8a1f2420b19c54a55b8b22f3c2ca51fc38a2a390db1fb77687afa577c71d689d8e10d76c04768f800abb19d99d7b2b7789e7a460 +MISC metadata.xml 568 SHA256 b1d3e7890f091cd427ad778d1e5b427c169aa2224cd96186cc8c1b710d2195e5 SHA512 a2b5cb56caea4f5288058d760e12a294ba644cda7e5cb0dc5350bfa077e6f7c09841701aa20e1124d49f554028dee4d8db7c8ae006f8c2ee9682654e1ae92fd9 WHIRLPOOL 061bcd4b8650a7b26e1c0361a3dea5df2470228d87f51c4e5d15bfaccc83f7171acb1818d3b46466980c1b3d35a7eacf37b24ba9f09704297d7244f8af65fe99 diff --git a/net-p2p/btsync/btsync-1.1.70.ebuild b/net-p2p/btsync/btsync-1.1.70.ebuild index dece564..c3332a0 100644 --- a/net-p2p/btsync/btsync-1.1.70.ebuild +++ b/net-p2p/btsync/btsync-1.1.70.ebuild @@ -1,63 +1,77 @@ -# Copyright (C) 2013 Jonathan Vasquez +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -EAPI="4" +EAPI=5 -inherit systemd user +inherit eutils pax-utils user flag-o-matic multilib autotools pam systemd versionator -DESCRIPTION="Automatically sync files via secure, distributed technology." +DESCRIPTION="Sync stuff via BitTorrent" 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 )" +SRC_URI="amd64? ( http://syncapp.bittorrent.com/${PV}/${PN}_x64-${PV}.tar.gz ) + x86? ( http://syncapp.bittorrent.com/${PV}/${PN}_i386-${PV}.tar.gz ) + ppc? ( http://syncapp.bittorrent.com/${PV}/${PN}_powerpc-${PV}.tar.gz ) + arm? ( http://syncapp.bittorrent.com/${PV}/${PN}_arm-${PV}.tar.gz )" RESTRICT="mirror strip" LICENSE="BitTorrent" SLOT="0" -KEYWORDS="amd64 ~x86" +KEYWORDS="amd64 ~x86 ~arm ~ppc" IUSE="" DEPEND="" RDEPEND="${DEPEND}" -QA_PREBUILT="opt/${PN}/${PN}" - S="${WORKDIR}" -pkg_setup() { - enewgroup btsync -} +QA_PREBUILT="usr/bin/btsync" + src_install() { - exeinto "/opt/${PN}" - doexe btsync - insinto "/etc/${PN}" - doins "${FILESDIR}/btsync.conf" - 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} + dodoc "${S}"/LICENSE.TXT + + newconfd "${FILESDIR}/btsync_confd" btsync + "{S}/btsync" --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > "btsync.conf" + insinto /etc + doins "btsync.conf" + + # system-v-init support + newinitd "${FILESDIR}/btsync_initd" btsync + + # systemd support + systemd_dounit "${FILESDIR}/btsync.service" + systemd_newunit "${FILESDIR}/btsync.service" 'btsync.service' + systemd_dounit "${FILESDIR}/btsync@.service" + systemd_newunit "${FILESDIR}/btsync@.service" 'btsync@.service' + systemd_dounit "${FILESDIR}/btsync_user.service" + systemd_newunit "${FILESDIR}/btsync_user.service" 'btsync_user.service' + into /usr/ + dobin btsync +} + +pkg_preinst() { + enewgroup btsync + enewuser btsync -1 /bin/false /dev/null btsync + dodir "/run/btsync" + fowners btsync:btsync "/run/btsync" } 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. - -" +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 " use /var/lib/btsync for btsync working data" +einfo "btsync@.service" +einfo " run as a system service but with user privilege" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "btsync_user.service" +einfo " run as a standard user service" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "" +einfo "Ensure you open the following ports in your firewall:" +einfo " btsync.conf specified listening port (UDP/TCP)" +einfo " port 3838 (UDP) for DHT tracking" } diff --git a/net-p2p/btsync/btsync-1.1.82.ebuild b/net-p2p/btsync/btsync-1.1.82.ebuild index dece564..c3332a0 100644 --- a/net-p2p/btsync/btsync-1.1.82.ebuild +++ b/net-p2p/btsync/btsync-1.1.82.ebuild @@ -1,63 +1,77 @@ -# Copyright (C) 2013 Jonathan Vasquez +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -EAPI="4" +EAPI=5 -inherit systemd user +inherit eutils pax-utils user flag-o-matic multilib autotools pam systemd versionator -DESCRIPTION="Automatically sync files via secure, distributed technology." +DESCRIPTION="Sync stuff via BitTorrent" 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 )" +SRC_URI="amd64? ( http://syncapp.bittorrent.com/${PV}/${PN}_x64-${PV}.tar.gz ) + x86? ( http://syncapp.bittorrent.com/${PV}/${PN}_i386-${PV}.tar.gz ) + ppc? ( http://syncapp.bittorrent.com/${PV}/${PN}_powerpc-${PV}.tar.gz ) + arm? ( http://syncapp.bittorrent.com/${PV}/${PN}_arm-${PV}.tar.gz )" RESTRICT="mirror strip" LICENSE="BitTorrent" SLOT="0" -KEYWORDS="amd64 ~x86" +KEYWORDS="amd64 ~x86 ~arm ~ppc" IUSE="" DEPEND="" RDEPEND="${DEPEND}" -QA_PREBUILT="opt/${PN}/${PN}" - S="${WORKDIR}" -pkg_setup() { - enewgroup btsync -} +QA_PREBUILT="usr/bin/btsync" + src_install() { - exeinto "/opt/${PN}" - doexe btsync - insinto "/etc/${PN}" - doins "${FILESDIR}/btsync.conf" - 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} + dodoc "${S}"/LICENSE.TXT + + newconfd "${FILESDIR}/btsync_confd" btsync + "{S}/btsync" --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > "btsync.conf" + insinto /etc + doins "btsync.conf" + + # system-v-init support + newinitd "${FILESDIR}/btsync_initd" btsync + + # systemd support + systemd_dounit "${FILESDIR}/btsync.service" + systemd_newunit "${FILESDIR}/btsync.service" 'btsync.service' + systemd_dounit "${FILESDIR}/btsync@.service" + systemd_newunit "${FILESDIR}/btsync@.service" 'btsync@.service' + systemd_dounit "${FILESDIR}/btsync_user.service" + systemd_newunit "${FILESDIR}/btsync_user.service" 'btsync_user.service' + into /usr/ + dobin btsync +} + +pkg_preinst() { + enewgroup btsync + enewuser btsync -1 /bin/false /dev/null btsync + dodir "/run/btsync" + fowners btsync:btsync "/run/btsync" } 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. - -" +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 " use /var/lib/btsync for btsync working data" +einfo "btsync@.service" +einfo " run as a system service but with user privilege" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "btsync_user.service" +einfo " run as a standard user service" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "" +einfo "Ensure you open the following ports in your firewall:" +einfo " btsync.conf specified listening port (UDP/TCP)" +einfo " port 3838 (UDP) for DHT tracking" } diff --git a/net-p2p/btsync/btsync-1.2.82.ebuild b/net-p2p/btsync/btsync-1.2.82.ebuild index dece564..c3332a0 100644 --- a/net-p2p/btsync/btsync-1.2.82.ebuild +++ b/net-p2p/btsync/btsync-1.2.82.ebuild @@ -1,63 +1,77 @@ -# Copyright (C) 2013 Jonathan Vasquez +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -EAPI="4" +EAPI=5 -inherit systemd user +inherit eutils pax-utils user flag-o-matic multilib autotools pam systemd versionator -DESCRIPTION="Automatically sync files via secure, distributed technology." +DESCRIPTION="Sync stuff via BitTorrent" 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 )" +SRC_URI="amd64? ( http://syncapp.bittorrent.com/${PV}/${PN}_x64-${PV}.tar.gz ) + x86? ( http://syncapp.bittorrent.com/${PV}/${PN}_i386-${PV}.tar.gz ) + ppc? ( http://syncapp.bittorrent.com/${PV}/${PN}_powerpc-${PV}.tar.gz ) + arm? ( http://syncapp.bittorrent.com/${PV}/${PN}_arm-${PV}.tar.gz )" RESTRICT="mirror strip" LICENSE="BitTorrent" SLOT="0" -KEYWORDS="amd64 ~x86" +KEYWORDS="amd64 ~x86 ~arm ~ppc" IUSE="" DEPEND="" RDEPEND="${DEPEND}" -QA_PREBUILT="opt/${PN}/${PN}" - S="${WORKDIR}" -pkg_setup() { - enewgroup btsync -} +QA_PREBUILT="usr/bin/btsync" + src_install() { - exeinto "/opt/${PN}" - doexe btsync - insinto "/etc/${PN}" - doins "${FILESDIR}/btsync.conf" - 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} + dodoc "${S}"/LICENSE.TXT + + newconfd "${FILESDIR}/btsync_confd" btsync + "{S}/btsync" --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > "btsync.conf" + insinto /etc + doins "btsync.conf" + + # system-v-init support + newinitd "${FILESDIR}/btsync_initd" btsync + + # systemd support + systemd_dounit "${FILESDIR}/btsync.service" + systemd_newunit "${FILESDIR}/btsync.service" 'btsync.service' + systemd_dounit "${FILESDIR}/btsync@.service" + systemd_newunit "${FILESDIR}/btsync@.service" 'btsync@.service' + systemd_dounit "${FILESDIR}/btsync_user.service" + systemd_newunit "${FILESDIR}/btsync_user.service" 'btsync_user.service' + into /usr/ + dobin btsync +} + +pkg_preinst() { + enewgroup btsync + enewuser btsync -1 /bin/false /dev/null btsync + dodir "/run/btsync" + fowners btsync:btsync "/run/btsync" } 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. - -" +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 " use /var/lib/btsync for btsync working data" +einfo "btsync@.service" +einfo " run as a system service but with user privilege" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "btsync_user.service" +einfo " run as a standard user service" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "" +einfo "Ensure you open the following ports in your firewall:" +einfo " btsync.conf specified listening port (UDP/TCP)" +einfo " port 3838 (UDP) for DHT tracking" } diff --git a/net-p2p/btsync/btsync-1.3.94.ebuild b/net-p2p/btsync/btsync-1.3.94.ebuild new file mode 100644 index 0000000..c3332a0 --- /dev/null +++ b/net-p2p/btsync/btsync-1.3.94.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils pax-utils user flag-o-matic multilib autotools pam systemd versionator + +DESCRIPTION="Sync stuff via BitTorrent" +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 ) + ppc? ( http://syncapp.bittorrent.com/${PV}/${PN}_powerpc-${PV}.tar.gz ) + arm? ( http://syncapp.bittorrent.com/${PV}/${PN}_arm-${PV}.tar.gz )" + +RESTRICT="mirror strip" +LICENSE="BitTorrent" +SLOT="0" +KEYWORDS="amd64 ~x86 ~arm ~ppc" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +QA_PREBUILT="usr/bin/btsync" + + +src_install() { + dodoc "${S}"/LICENSE.TXT + + newconfd "${FILESDIR}/btsync_confd" btsync + "{S}/btsync" --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > "btsync.conf" + insinto /etc + doins "btsync.conf" + + # system-v-init support + newinitd "${FILESDIR}/btsync_initd" btsync + + # systemd support + systemd_dounit "${FILESDIR}/btsync.service" + systemd_newunit "${FILESDIR}/btsync.service" 'btsync.service' + systemd_dounit "${FILESDIR}/btsync@.service" + systemd_newunit "${FILESDIR}/btsync@.service" 'btsync@.service' + systemd_dounit "${FILESDIR}/btsync_user.service" + systemd_newunit "${FILESDIR}/btsync_user.service" 'btsync_user.service' + into /usr/ + dobin btsync +} + +pkg_preinst() { + enewgroup btsync + enewuser btsync -1 /bin/false /dev/null btsync + dodir "/run/btsync" + fowners btsync:btsync "/run/btsync" +} + +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 " use /var/lib/btsync for btsync working data" +einfo "btsync@.service" +einfo " run as a system service but with user privilege" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "btsync_user.service" +einfo " run as a standard user service" +einfo " use /home//.config/btsync/btsync.conf for btsync working data" +einfo "" +einfo "Ensure you open the following ports in your firewall:" +einfo " btsync.conf specified listening port (UDP/TCP)" +einfo " port 3838 (UDP) for DHT tracking" +} diff --git a/net-p2p/btsync/files/btsync.conf b/net-p2p/btsync/files/btsync.conf deleted file mode 100644 index fbc8492..0000000 --- a/net-p2p/btsync/files/btsync.conf +++ /dev/null @@ -1,65 +0,0 @@ -{ - "device_name": "My Sync Device", - "listening_port" : 0, // 0 - randomize port - -/* storage_path dir contains auxilliary app files - if no storage_path field: .sync dir created in the directory - where binary is located. - otherwise user-defined directory will be used -*/ - "storage_path" : "/opt/btsync/storage", - -// uncomment next line if you want to set location of pid file - "pid_file" : "/opt/btsync/pid/btsync.pid", - - "check_for_updates" : true, - "use_upnp" : true, // use UPnP for port mapping - - -/* limits in kB/s - 0 - no limit -*/ - "download_limit" : 0, - "upload_limit" : 0, - -/* remove "listen" field to disable WebUI - remove "login" and "password" fields to disable credentials check -*/ - "webui" : - { - "listen" : "0.0.0.0:8888" - } - -/* !!! if you set shared folders in config file WebUI will be DISABLED !!! - shared directories specified in config file - override the folders previously added from WebUI. -*/ -/* - , - "shared_folders" : - [ - { -// use --generate-secret in command line to create new secret - "secret" : "MY_SECRET_1", // * required field - "dir" : "/home/user/bittorrent/sync_test", // * required field - -// use relay server when direct connection fails - "use_relay_server" : true, - "use_tracker" : true, - "use_dht" : false, - "search_lan" : true, -// enable sync trash to store files deleted on remote devices - "use_sync_trash" : true, -// specify hosts to attempt connection without additional search - "known_hosts" : - [ - "192.168.1.2:44444" - ] - } - ] -*/ - -// Advanced preferences can be added to config file. -// Info is available in BitTorrent Sync User Guide. - -} diff --git a/net-p2p/btsync/files/btsync.service b/net-p2p/btsync/files/btsync.service index 1d6cab8..0ffff45 100644 --- a/net-p2p/btsync/files/btsync.service +++ b/net-p2p/btsync/files/btsync.service @@ -3,8 +3,9 @@ Description=Bittorent Sync service After=network.target [Service] -User=%i -ExecStart=/opt/btsync/btsync --config /etc/btsync/btsync.conf --nodaemon +User=btsync +Group=btsync +ExecStart=/usr/bin/btsync --config /etc/btsync.conf --nodaemon Restart=on-abort [Install] diff --git a/net-p2p/btsync/files/btsync@.service b/net-p2p/btsync/files/btsync@.service new file mode 100644 index 0000000..f01610b --- /dev/null +++ b/net-p2p/btsync/files/btsync@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bittorent Sync service for %i +After=network.target + +[Service] +User=%i +ExecStart=/usr/bin/btsync --config /home/%i/.config/btsync/btsync.conf --nodaemon +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/btsync/files/btsync_confd b/net-p2p/btsync/files/btsync_confd new file mode 100644 index 0000000..d5a9ef8 --- /dev/null +++ b/net-p2p/btsync/files/btsync_confd @@ -0,0 +1,5 @@ +# conf.d file for btsync + +# User and group daemon runs as +BTSYNC_USER="btsync" +BTSYNC_GROUP="btsync" diff --git a/net-p2p/btsync/files/btsync_initd b/net-p2p/btsync/files/btsync_initd new file mode 100644 index 0000000..ebd0fbf --- /dev/null +++ b/net-p2p/btsync/files/btsync_initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PIDFILE="/run/btsync/btsync.pid" + +depend() { + need localmount net + after bootmisc +} + +start() { + if [ ! -d /run/btsync ]; then + mkdir /run/btsync + chown "${BTSYNC_USER}:${BTSYNC_GROUP}" /run/btsync + fi + + ebegin "Starting btsync" + start-stop-daemon \ + --start \ + --pidfile "${PIDFILE}" \ + --user "${BTSYNC_USER}" \ + --group "${BTSYNC_GROUP}" \ + --exec /usr/bin/btsync \ + -- --config /etc/btsync.conf + eend $? +} + +stop() { + ebegin "Stopping btsync" + start-stop-daemon \ + --stop \ + --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-p2p/btsync/files/btsync_user.service b/net-p2p/btsync/files/btsync_user.service new file mode 100644 index 0000000..f1abcec --- /dev/null +++ b/net-p2p/btsync/files/btsync_user.service @@ -0,0 +1,10 @@ +[Unit] +Description=Bittorent Sync per-user service +After=network.target + +[Service] +ExecStart=/usr/bin/btsync --config %h/.config/btsync/btsync.conf --nodaemon +Restart=on-abort + +[Install] +WantedBy=default.target diff --git a/net-p2p/btsync/metadata.xml b/net-p2p/btsync/metadata.xml new file mode 100644 index 0000000..8a47e4d --- /dev/null +++ b/net-p2p/btsync/metadata.xml @@ -0,0 +1,9 @@ + + + + +Sync unlimited files between your own devices, or share a folder with friends and family to automatically sync anything. +File transfers are encrypted. Your information is never stored on a server in the cloud and your data is protected by private keys. +BitTorrent Sync is specifically designed to handle large files, so feel free to sync original, high quality, uncompressed files. + +