# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # $Id: a68b9f3317548450a989ac55be960e4fdc3e5ffd $ EAPI=8 inherit autotools linux-info pam tmpfiles PATCH_TARBALL_NAME="${PN}-2.5.0-patches-01" DESCRIPTION="Point-to-Point Protocol (PPP)" HOMEPAGE="https://ppp.samba.org/" SRC_URI=" https://download.samba.org/pub/ppp/${P}.tar.gz https://raw.githubusercontent.com/ppp-project/ppp/${P}/contrib/pppgetpass/pppgetpass.8 " SRC_URI+=" https://www.gentoofan.org/gentoo/dist/${PATCH_TARBALL_NAME}.tar.xz" LICENSE="BSD GPL-2" SLOT="0/${PV}" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="activefilter atm gtk ipv6 pam selinux systemd" DEPEND=" dev-libs/openssl:0= virtual/libcrypt:= activefilter? ( net-libs/libpcap ) atm? ( net-dialup/linux-atm ) gtk? ( x11-libs/gtk+:2 ) pam? ( sys-libs/pam ) systemd? ( sys-apps/systemd ) " RDEPEND=" ${DEPEND} !> etc.ppp/options || die fi } src_configure() { local args=( --localstatedir="${EPREFIX}"/var --runstatedir="${EPREFIX}"/run $(use_enable ipv6 ipv6cp) $(use_enable systemd) $(use_with atm) $(use_with pam) $(use_with activefilter pcap) $(use_with gtk) --enable-cbcp --enable-multilink ) econf "${args[@]}" } src_install() { default find "${ED}" -name '*.la' -type f -delete || die if use pam; then pamd_mimic_system ppp auth account session fi insinto /etc/modprobe.d newins "${FILESDIR}/modules.ppp" ppp.conf dosbin scripts/p{on,off,log} doman scripts/pon.1 dosym pon.1 /usr/share/man/man1/poff.1 dosym pon.1 /usr/share/man/man1/plog.1 # Adding misc. specialized scripts to doc dir dodoc -r scripts if use gtk ; then dosbin contrib/pppgetpass/pppgetpass.{gtk,vt} newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass else newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass fi newtmpfiles "${FILESDIR}/pppd.tmpfiles" pppd.conf # Missing from upstream tarball # https://github.com/ppp-project/ppp/pull/412 #doman contrib/pppgetpass/pppgetpass.8 doman "${DISTDIR}/pppgetpass.8" insinto /etc/ppp/radius doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers} } pkg_postinst() { tmpfiles_process pppd.conf }