/[gentoo-x86]/net-misc/openntpd/openntpd-20080406-r4.ebuild
Gentoo

Contents of /net-misc/openntpd/openntpd-20080406-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Wed Mar 19 18:59:20 2014 UTC (5 years, 8 months ago) by ottxor
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
remove old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2000586)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-20080406-r4.ebuild,v 1.7 2013/11/30 17:10:26 johu Exp $
4
5 EAPI=5
6
7 inherit autotools eutils toolchain-funcs systemd user
8
9 MY_P="${P/-/_}p"
10 DEB_VER="4"
11 DESCRIPTION="Lightweight NTP server ported from OpenBSD"
12 HOMEPAGE="http://www.openntpd.org/"
13 SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.gz
14 mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}-${DEB_VER}.debian.tar.gz"
15
16 LICENSE="BSD GPL-2"
17 SLOT="0"
18 KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd"
19 IUSE="ssl selinux"
20
21 RDEPEND="ssl? ( dev-libs/openssl )
22 selinux? ( sec-policy/selinux-ntp )
23 !<=net-misc/ntp-4.2.0-r2
24 !net-misc/ntp[-openntpd]"
25 DEPEND="${RDEPEND}
26 virtual/yacc"
27
28 S="${WORKDIR}/${MY_P/_/-}"
29
30 pkg_setup() {
31 export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}"
32 enewgroup ntp
33 enewuser ntp -1 -1 "${NTP_HOME}" ntp
34
35 # make sure user has correct HOME as flipng between
36 # the standard ntp pkg and this one was possible in
37 # the past
38 if [[ $(egethome ntp) != ${NTP_HOME} ]]; then
39 ewarn "From this version on, the homedir of the ntp user cannot be changed"
40 ewarn "dynamically after the installation. For homedir different from"
41 ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge."
42 esethome ntp "${NTP_HOME}"
43 fi
44 }
45
46 src_prepare() {
47 sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die
48
49 epatch "${WORKDIR}"/debian/patches/*.patch
50 sed -i 's:debian:gentoo:g' ntpd.conf || die
51 eautoreconf # deb patchset touches .ac files and such
52 }
53
54 src_configure() {
55 econf \
56 --disable-strip \
57 $(use_with !ssl builtin-arc4random) \
58 AR="$(type -p $(tc-getAR))"
59 }
60
61 src_install() {
62 default
63
64 newinitd "${FILESDIR}/${PN}.init.d-${PVR}" ntpd
65 newconfd "${FILESDIR}/${PN}.conf.d-${PV}-r3" ntpd
66
67 systemd_newunit "${FILESDIR}/${PN}.service-${PV}-r3" ntpd.service
68 }
69
70 pkg_postinst() {
71 # remove localtime file from previous installations
72 rm -f "${EROOT}${NTP_HOME}"/etc/localtime
73 mkdir -p "${NTP_HOME}"/etc
74 ln -s /etc/localtime "${NTP_HOME}"/etc/localtime || die
75 chown -R root:root "${EROOT}${NTP_HOME}" || die
76 }
77
78 pkg_postrm() {
79 # remove localtime file from previous installations
80 rm -f "${EROOT}${NTP_HOME}"/etc/localtime
81 }

  ViewVC Help
Powered by ViewVC 1.1.20