diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/dnetc |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/dnetc')
-rw-r--r-- | app-misc/dnetc/Manifest | 17 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9107.516.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9108.517.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9109.518.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9110.519.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9110.519b.ebuild | 95 | ||||
-rw-r--r-- | app-misc/dnetc/files/dnetc.confd | 18 | ||||
-rw-r--r-- | app-misc/dnetc/files/dnetc.initd | 88 | ||||
-rw-r--r-- | app-misc/dnetc/metadata.xml | 11 |
9 files changed, 601 insertions, 0 deletions
diff --git a/app-misc/dnetc/Manifest b/app-misc/dnetc/Manifest new file mode 100644 index 000000000000..59a2d53d3797 --- /dev/null +++ b/app-misc/dnetc/Manifest @@ -0,0 +1,17 @@ +AUX dnetc.confd 403 SHA256 4ed7f825ca76270969f6dd0ef856caeaca2b9acd3f2f48614b9195d104483d80 SHA512 c088d9d02d55e3c99b3d6095487e061804bca1c571637d46a4234253d0ef8efe3ed22c93db2c48ad2e70223c96a3307c825d94114d87609bc764503b4f95e5ef WHIRLPOOL ffb1aec97622ad8fd104868e5967f8bc9e5c7cf81a5f63be101306c5a4f750df99d599eca20cc81db55ceeb7518c86cbb82a41c4e2e2f777f07e403be40b505f +AUX dnetc.initd 2013 SHA256 6f0d469eaee27b2b843b59dcb2d708ab294db64e53529e7e0391fe11ab30937a SHA512 c3f23a7913331c318042517a517e29679a585bbf92f4da91aada528cbfe60f068959b2b7804658b14597734ddea23c6f2881cd8a150be8f5d4bf69c873214d29 WHIRLPOOL 36677c82c449e9b7b23171f57955555e7945107e151ebf34ffe6cb38132a145a432deb968a00475b42b95361bba5b2f39543d124d2d330923721b2988e0970f0 +DIST dnetc516-linux-sparc-v7.tar.gz 881743 SHA256 39441cf0c7b21cd1af1636698eb96769ffc46bc68331d5c4975d8485cfb8c352 SHA512 d70410773a14fe7237e0c542f45ab69f840dfd484622923da3abf723ffacf82bf94ecaa1d2089ab9326121ed4b3562ace7b267ed57bbf2c0971793b25fd30958 WHIRLPOOL 8f9628bb3521770044e4ecc33c4d7a5deb3602e1727d465eb0a8ffd95eff6908f97f174ecb852bf6f54a1ea83bf9185d1a97e8f9778a17fc2a60b769cda0e9c1 +DIST dnetc517-linux-amd64.tar.gz 645416 SHA256 5a2c7cf2ef50c5b895cb43751d94148523e0cc8283f3663601b10a7f83ddce38 SHA512 b22b59af2352a95156ea4b584f48d82e4b64080130d922bbb1797b2c62f7c401ec1263f2f0bd57103134f8fc76ef41a7e09d7da083ef0b46c44be4239005c21b WHIRLPOOL 4ec29bdf6a5d3dd1ba394ce12d6da8052577465f93e6f3ab4069ad6b51fe08e5aebcc3f108ee561a0a3319e8335a45e971fbbacfa67eb353a5664259acf56882 +DIST dnetc517-linux-x86-elf-uclibc.tar.gz 676398 SHA256 3245bb10705383983e9764340688ffe0fd74cbe69810ae3c9ef426b8df81e067 SHA512 7b56fa8c6819fd7060612c13c8fb17ca1e949abbca965b7599bb072751acd1d0e95f1a90fb67172c6d406b54e0c52549582489802e538670bdb6d12f8354e2a7 WHIRLPOOL 6906d777329615952b0d5c91730666089161e02a71d3a91cb5e9ea4364cce85047b58859f2cf6612a1b922745652a1fd0af0cb22f0e72ef47e9eab162d945489 +DIST dnetc518-linux-amd64.tar.gz 644073 SHA256 bc3f802079f07986b9b294834b5f97bdb43b061b17cc5e9ba9d22189896beda7 SHA512 95ad5144fbb1356806f6fd6f499891b36a0ea7c75794ada40cba9146c830adfd20044d8d3f3689186c9317b477aa95a6aae5d711c19534059b06b5d33367d785 WHIRLPOOL 134b479568d7feb05f74462155b72eb5a32f903a7b91dfa2587c845770583f6f62297356cb4514b238397729af8fb38a3fde4fcf6228953606e0b3f61389f9ab +DIST dnetc518-linux-ppc-uclibc.tar.gz 717889 SHA256 2c8eda515d7976353fd3e3e6f11ac36b87af3158d0c4e472c1b58bde82182dd9 SHA512 c0d7592b1a5c98001355e71a1d31bc67bfef6b4c5f73c8e200717424ae4ea5c62558c413753e079f4e0b6bacdb921b395f46c168673e82049dcb69a0512d11eb WHIRLPOOL 39f0b46e799c8dfff713406c1991e4e729b74932e0177ed5808c3d68a8ec56b9fdab4aa931315e3b5372e2bcc3356d38e9df74f78beb68ee7da082762a22e089 +DIST dnetc519-linux-x86-elf-uclibc.tar.gz 676925 SHA256 185790bc3a1c0eb0a00e1aadf119b531ced6f931ef47bf134d6092fc55d096f0 SHA512 87519867e8e993d7b6520d73133196d34391d0694d8d8bbc372bac4e0b21ceb1a22fcd000bd2f29841695ee7232c4584eb1b19a690f723320df023c52a581395 WHIRLPOOL 873e329bba87122c2180d44a6df1a7ee50a2f1edcd7d631a9c0c5db0aa294ba936bf1aa945171d7962cc9455a08003ca946cf307f010c8cda0b5deeda8600993 +DIST dnetc519b-linux-amd64.tar.gz 648333 SHA256 ed6535ffea6c2fb627f6957559a8b27a48f785ac1678239a456194edf5e25354 SHA512 ea7899772ee8c5fbfbe96b6ec69b1a3237fe5ae96b17bb7e11e387fb833b471f3cce8809cf3c9987dfe33c7ca7082db560c36898094ace3e547077b7a5afc324 WHIRLPOOL b3d91208a9634b837f0e369a467bcd829770d4af7c18e1b0fefbb469c45574c6f09cdb0431ee35c7d00f2e20dd95a53561a262586b9be98d687531d8ad8c105a +EBUILD dnetc-2.9107.516.ebuild 2690 SHA256 387cc1e8a7d5a28ab371404a83405b936b058acf5d7bed2a3e0d6ed49a395474 SHA512 c052c46f1aa734c8ac3a0dc92326e7c9ba6171b82c8e874c253515477066ee0ddbc2145497fb2dd56992affa4afdcfc6c5f4c83fed8c8c78cee1649d044bafa3 WHIRLPOOL a1d7e028e3b847241c8c95ebae96ee39d5102c5f7651d1d6dde36a52e1b27782f4d8725440f7462ef0bcef5116032b57901b4af24aa4397e9292c388eb55414f +EBUILD dnetc-2.9108.517.ebuild 2682 SHA256 7145b5a93171da77d2105a2010cdcc941f0e196622664051cbab48e289de6305 SHA512 7134f249034c68baaca4f2cc9987de67faa938c3cbdea5bd969d7ec98dec9404c775832445cbf6b1febec356c5ce08bd284100902abbccd821d6bc1fedd04f25 WHIRLPOOL 15538fcb9ada0a4ce4672f465730ae698ebc17bbd8f40eedd0aeab7d557e84fa97bd12048af96e0c6698da98b381811b67cee1f16aacdd313a527d30bee16273 +EBUILD dnetc-2.9109.518.ebuild 2684 SHA256 d34cd11956b0c8956c7d259375e98b95e90d85cfed164b2ffb57527cfac0156d SHA512 8e9936bb3bca2fb51e6671984861d58aa7d1998251f25245239aec14d36be71df2d973c9109a5bb5ac5ba8adb7d024b7bffb49e63069ff2ab5b265cf9b03d13b WHIRLPOOL 072844418664eb3c57912807b16a735058a169687f4ad8110ca0d7fb496d2a41c1da7e9abe4141acd992affbefa28e458c8f362b7970011f96ec43c2c852470e +EBUILD dnetc-2.9110.519.ebuild 2684 SHA256 d201081c3c9eea73a8914e5f2ecf995c7d8751fa207f5abc36ecb2c8dafc4181 SHA512 c267a5f62af380e4b6e8f9515d8b4fa046fffc5302fb6d47dc850bef3a882bd458416058b548ed867f4a6c4b811181293bd4c058fa0a20cdc8ca619982021567 WHIRLPOOL 1c87b299137f6119d91aa240ff26831c30cc816e6205c3276767d540e81552402b717f8cf4d5c3e5bfbe485bdc6f374159626c655b2c0fb581e4ad7a790dd9f5 +EBUILD dnetc-2.9110.519b.ebuild 2651 SHA256 2ff15eda4e8c54386476ca8f8302b9166a2ca514433d029dd53b2be8f9efc455 SHA512 3c1a3120dd66cdabc6e41951e8fb6721449c094aa60448d151eacd20f440eb769f11faed0e724dc1b95d6629656d809b40949e85c0db8ff5bc003f8b5c5e6ade WHIRLPOOL 16024f57b43b10ba8c7f27529a58321884a364d8b1776dd50b11edf7db00d64f758b95731cfe670478d86030112876f2673649dab91a11d6027270651a69d4e0 +MISC ChangeLog 2952 SHA256 fa47dcf388e6fb463f2cb44e18d4050f1689e7e177f4263d3d9eb40c7e6bce39 SHA512 472f0bde7cea16884dc658249cdb5589762da67365fe5102520e73b018404000836723b2f0daa19e702eb420eeab27578ee722f5a137b0e09ba51a9a3a1f44c4 WHIRLPOOL 40c0891f2604575bb5b316f29b012d54b4b487df782a817d37aeb62730776543a4445dda509b06eae836288b2bf2744a36aaaf80ad8e54ede81d6ce44815589e +MISC ChangeLog-2015 12943 SHA256 97dd9270aacad63faff870d564aba5b3cf6be0e6faed39879f9b787b32ea9cde SHA512 53082bf39c9040f60d06cfb719d072022c9c6e55c6409cfa7ff5a6ae79fc7624cb9257cd7ab859d0842f50453f96169f01d8e60f3befec8f9e74abcc06ea31d8 WHIRLPOOL abc0b1375f60360316c7bb9d2ce049faff73e99f14b3fac26cdf5a0ca71b63334967893c925d4a4bdfd60cccf5aa56407f8846be16e8fb015d397e9ad2d14fe5 +MISC metadata.xml 357 SHA256 fed862e579347355d301d71a72b1f306bf57c494c30296fe61531fc288e8ec8c SHA512 6986582029e81ab7b8eec22c707c03c1996d0837ca9b4e7a0c31782be3f9c59a7d89c53980fdac00bb2a49555a774933704ac3fe390785840d072ac7ac9ac33d WHIRLPOOL 8f6d3d1dfa4f59c9f04220323fb2377552aaf8d982977295e2632e2a25019c36c6e6c59c81671e46c7e546cdbba90426feaf6872dd838d4127e4c6b5bd6d0847 diff --git a/app-misc/dnetc/dnetc-2.9107.516.ebuild b/app-misc/dnetc/dnetc-2.9107.516.ebuild new file mode 100644 index 000000000000..bebbc0923b3b --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9107.516.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +#SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~sparc" # x86,amd64,ppc not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9108.517.ebuild b/app-misc/dnetc/dnetc-2.9108.517.ebuild new file mode 100644 index 000000000000..b8ef427428da --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9108.517.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" # ppc not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9109.518.ebuild b/app-misc/dnetc/dnetc-2.9109.518.ebuild new file mode 100644 index 000000000000..071accd0bdd1 --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9109.518.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc" # x86 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9110.519.ebuild b/app-misc/dnetc/dnetc-2.9110.519.ebuild new file mode 100644 index 000000000000..3785ad20a0bd --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9110.519.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +#SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~x86" # ppc,amd64 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9110.519b.ebuild b/app-misc/dnetc/dnetc-2.9110.519b.ebuild new file mode 100644 index 000000000000..59faa0435084 --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9110.519b.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~amd64" # ppc,x86 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PREBUILT="opt/distributed.net/dnetc" + +getS() { + case $ARCH in + amd64) suffix=amd64 ;; + x86) suffix=x86-elf-uclibc ;; + ppc) suffix=ppc-elf-uclibc ;; + esac + echo dnetc${MIN_PV:0:3}-linux-${suffix} +} + +src_prepare() { + export S="${WORKDIR}/$(getS)" + cd "${S}" + [[ -x dnetc ]] || die "Name of dnetc directory/binary for this platform undefined" +} + +src_install() { + export S="${WORKDIR}/$(getS)" + cd "${S}" + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/files/dnetc.confd b/app-misc/dnetc/files/dnetc.confd new file mode 100644 index 000000000000..f6f0da6b7e2d --- /dev/null +++ b/app-misc/dnetc/files/dnetc.confd @@ -0,0 +1,18 @@ +# configuration file for dnetc + +# Startup will look for configuration files in the following places, using the +# first one that it finds: +# 1. /etc/dnetc.conf +# 2. /opt/distributed.net/dnetc.ini + +# Values specified here will override those found in any client configuration +# file. + +# email adress +EMAIL= + +# buffer base dir +BUFFER_BASE_DIR=/var/spool/dnetc + +# keyserver address +KEYSERVER_ADDRESS= diff --git a/app-misc/dnetc/files/dnetc.initd b/app-misc/dnetc/files/dnetc.initd new file mode 100644 index 000000000000..f3a512074912 --- /dev/null +++ b/app-misc/dnetc/files/dnetc.initd @@ -0,0 +1,88 @@ +#!/sbin/openrc-run +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="${opts} reload fetch flush" + +depend() { + use net +} + +processOpts() { + local retVal=1 + + DNETPATH="/opt/distributed.net" + DNETBIN="${DNETPATH}/dnetc" + + STARTOPTS="--start --chuid dnetc:dnetc --quiet \ + --exec ${DNETBIN}" + + DNETOPTS="-quiet" + + if [ -e /etc/dnetc.ini ] ; then + retVal=0 + DNETOPTS="${DNETOPTS} -ini /etc/dnetc.ini" + elif [ -e ${DNETPATH}/dnetc.ini ]; then + retVal=0 + DNETOPTS="${DNETOPTS} -ini ${DNETPATH}/dnetc.ini" + elif [ ! -z ${EMAIL} ]; then + retVal=0 + fi + + # override ini settings with values in /etc/conf.d/dnetc + + DNETOPTS="${DNETOPTS} ${EMAIL:+-e ${EMAIL}}" + if [ ! -z ${BUFFER_BASE_DIR} ] ; then + local buff_in="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-in" + local buff_out="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-out" + DNETOPTS="${DNETOPTS} -inbase ${buff_in}" + DNETOPTS="${DNETOPTS} -outbase ${buff_out}" + fi + DNETOPTS="${DNETOPTS} ${KEYSERVER_ADDRESS:+-a ${KEYSERVER_ADDRESS}}" + + # fair group cpu scheduler + uidpath="/sys/kernel/uids/`id -u dnetc`" + [ -d $uidpath ] && echo 2 >$uidpath/cpu_share + unset uidpath + + if [ ${retVal} -ne 0 ] ; then + eerror "Need some sort of configuration. Check /etc/conf.d/dnetc." + fi + + return ${retVal} +} + +start() { + processOpts || return 1 + ebegin "Starting distributed.net client" + start-stop-daemon ${STARTOPTS} -- ${DNETOPTS} + eend ${?} +} + +stop() { + processOpts || return 1 + ebegin "Stopping distributed.net client" + start-stop-daemon --stop --quiet --exec ${DNETBIN} -- + eend ${?} +} + +reload() { + processOpts || return 1 + ebegin "Reloading distributed.net client" + start-stop-daemon --stop --quiet --signal HUP --exec ${DNETBIN} + eend ${?} +} + +fetch() { + processOpts || return 1 + ebegin "Fetching distributed.net client buffers" + ${DNETBIN} ${DNETOPTS} -fetch + eend ${?} +} + +flush() { + processOpts || return 1 + ebegin "Flushing distributed.net client buffers" + ${DNETBIN} ${DNETOPTS} -flush + eend ${?} +} diff --git a/app-misc/dnetc/metadata.xml b/app-misc/dnetc/metadata.xml new file mode 100644 index 000000000000..40c9f16e0287 --- /dev/null +++ b/app-misc/dnetc/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <longdescription> + a distributed client for the distributed.net cracking challenges. + </longdescription> +</pkgmetadata> |