tmonero-0.17.1.9-r1.ebuild - parlay - yet another gentoo overlay
 (HTM) git clone https://git.parazyd.org/parlay
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
       tmonero-0.17.1.9-r1.ebuild (2853B)
       ---
            1 # Copyright 1999-2021 Gentoo Authors
            2 # Distributed under the terms of the GNU General Public License v2
            3 
            4 EAPI=7
            5 
            6 inherit cmake git-r3 systemd pax-utils
            7 
            8 DESCRIPTION="The secure, private, untraceable cryptocurrency"
            9 HOMEPAGE="https://www.getmonero.org https://github.com/monero-project/monero"
           10 EGIT_REPO_URI="https://github.com/monero-project/monero.git"
           11 EGIT_COMMIT="v${PV}"
           12 
           13 LICENSE="BSD MIT"
           14 SLOT="0"
           15 KEYWORDS="~amd64"
           16 IUSE="+daemon hw-wallet readline tools +wallet-cli +wallet-rpc"
           17 REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
           18 
           19 DEPEND="
           20         acct-group/monero
           21         acct-user/monero
           22         dev-libs/boost:=[nls,threads]
           23         dev-libs/libsodium:=
           24         net-dns/unbound:=[threads]
           25         net-libs/czmq:=
           26         hw-wallet? (
           27                 dev-libs/hidapi
           28                 dev-libs/protobuf:=
           29                 virtual/libusb:1
           30         )
           31         dev-libs/openssl:=
           32         readline? ( sys-libs/readline:0= )"
           33 RDEPEND="${DEPEND}"
           34 BDEPEND="virtual/pkgconfig"
           35 
           36 PATCHES=("${FILESDIR}/${PN}-0.17.1.3-linkjobs.patch")
           37 
           38 src_configure() {
           39         local mycmakeargs=(
           40                 # Monero's liblmdb conflicts with the system liblmdb :(
           41                 -DBUILD_SHARED_LIBS=OFF
           42                 -DMANUAL_SUBMODULES=ON
           43                 -DMONERO_PARALLEL_LINK_JOBS=1
           44         )
           45 
           46         cmake_src_configure
           47 }
           48 
           49 src_compile() {
           50         local targets=()
           51         use daemon && targets+=(daemon)
           52         use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
           53         use wallet-cli && targets+=(simplewallet)
           54         use wallet-rpc && targets+=(wallet_rpc_server)
           55         cmake_build ${targets[@]}
           56 }
           57 
           58 src_install() {
           59         # Install all binaries.
           60         find "${BUILD_DIR}/bin/" -type f -executable -print0 |
           61                 while IFS= read -r -d '' line; do
           62                         pax-mark psmr "$line"
           63                         dobin "$line"
           64                 done
           65 
           66         if use daemon; then
           67                 dodoc utils/conf/monerod.conf
           68 
           69                 # data-dir
           70                 keepdir /var/lib/monero
           71                 fowners monero:monero /var/lib/monero
           72                 fperms 0755 /var/lib/monero
           73 
           74                 # log-file dir
           75                 keepdir /var/log/monero
           76                 fowners monero:monero /var/log/monero
           77                 fperms 0755 /var/log/monero
           78 
           79                 # /etc/monero/monerod.conf
           80                 insinto /etc/monero
           81                 newins "${FILESDIR}/monerod-0.16.0.3-r1.monerod.conf" monerod.conf
           82 
           83                 # OpenRC
           84                 newconfd "${FILESDIR}/monerod-0.16.0.3-r1.confd" monerod
           85                 newinitd "${FILESDIR}/monerod-0.16.0.3-r1.initd" monerod
           86 
           87                 # systemd
           88                 systemd_newunit "${FILESDIR}/monerod-0.17.1.5.service" monerod.service
           89         fi
           90 }
           91 
           92 pkg_postinst() {
           93         if use daemon; then
           94                 einfo "Start the Monero P2P daemon as a system service with"
           95                 einfo "'rc-service monerod start'. Enable it at startup with"
           96                 einfo "'rc-update add monerod default'."
           97                 einfo
           98                 einfo "Run monerod status as any user to get sync status and other stats."
           99                 einfo
          100                 einfo "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
          101                 einfo "in /var/lib/monero by default. You may want to enable pruning by adding"
          102                 einfo "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
          103                 einfo "or move the data directory to another disk."
          104         fi
          105 }