rdo-1.4.3.ebuild (1149B)
1 # Copyright 2024 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=8 5 6 inherit toolchain-funcs 7 8 DESCRIPTION="RootDO, a simple doas/sudo alternative." 9 HOMEPAGE="https://codeberg.org/sw1tchbl4d3/rdo" 10 SRC_URI="https://codeberg.org/sw1tchbl4d3/rdo/archive/main.tar.gz -> ${P}.tar.gz" 11 12 S="${WORKDIR}"/"$PN" 13 14 LICENSE="GPL-3" 15 SLOT="0" 16 KEYWORDS="~amd64" 17 18 RDEPEND="virtual/libcrypt:=" 19 20 src_prepare() { 21 default 22 23 sed -i \ 24 -e "s/ -O2 / /" \ 25 -e "/^\(LDFLAGS\|CFLAGS\|CPPFLAGS\)/{s| = | += |g;s|-s ||g}" \ 26 -e "s/\/usr\/local\/bin\//${EPREFIX}\/bin\//" \ 27 Makefile 28 } 29 30 src_compile() { 31 emake CC="$(tc-getCC)" 32 } 33 34 src_install() { 35 dodir bin 36 dodir etc 37 emake DESTDIR="${D}" install 38 } 39 40 pkg_postinst() { 41 elog "The configuration file has been placed at /etc/rdo.conf" 42 elog "It has the following variables:" 43 elog "group: The group of users that is allowed to execute rdo." 44 elog "wrong_pw_sleep: The amount of milliseconds to sleep at a wrong password attempt. Must be a positive integer. Set to 0 to disable." 45 elog "session_ttl: The amount of minutes a session lasts. Must be a positive integer. Set to 0 to disable." 46 }