app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / netifrc / netifrc-0.2.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils udev
7
8 DESCRIPTION="Gentoo Network Interface Management Scripts"
9 HOMEPAGE="https://www.gentoo.org/proj/en/base/openrc/"
10
11 if [[ ${PV} == "9999" ]]; then
12         EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
13         inherit git-2
14 else
15         SRC_URI="https://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
16         KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
17 fi
18
19 LICENSE="BSD-2"
20 SLOT="0"
21 IUSE=""
22
23 COMMON_DEPEND="!<sys-fs/udev-init-scripts-26-r1
24         !<sys-fs/udev-172"
25 DEPEND="${COMMON_DEPEND}
26         kernel_linux? ( virtual/pkgconfig )"
27 RDEPEND="${COMMON_DEPEND}
28         >=sys-apps/openrc-0.12
29         !<sys-apps/openrc-0.12"
30
31 src_prepare() {
32         if [[ ${PV} == "9999" ]] ; then
33                 local ver="git-${EGIT_VERSION:0:6}"
34                 sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
35                 einfo "Producing ChangeLog from Git history"
36                 GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
37         fi
38
39         # Allow user patches to be applied without modifying the ebuild
40         epatch_user
41 }
42
43 src_compile() {
44         MAKE_ARGS="${MAKE_ARGS}
45                 LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}
46                 UDEVDIR=$(get_udevdir)"
47
48         use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
49
50         emake ${MAKE_ARGS} all
51 }
52
53 src_install() {
54         emake ${MAKE_ARGS} DESTDIR="${D}" install
55         dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
56 }
57
58 pkg_postinst() {
59         if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
60                 elog "The network configuration scripts will use dhcp by"
61                 elog "default to set up your interfaces."
62                 elog "If you need to set up something more complete, see"
63                 elog "${EROOT}/usr/share/doc/${P}/README"
64         fi
65 }