1 #!/usr/bin/bash
   2 #
   3 # CDDL HEADER START
   4 #
   5 # This file and its contents are supplied under the terms of the
   6 # Common Development and Distribution License ("CDDL"), version 1.0.
   7 # You may only use this file in accordance with the terms of version
   8 # 1.0 of the CDDL.
   9 #
  10 # A full copy of the text of the CDDL should have accompanied this
  11 # source.  A copy of the CDDL is also available via the Internet at
  12 # http://www.illumos.org/license/CDDL.
  13 #
  14 # CDDL HEADER END
  15 #
  16 #
  17 # Copyright 2014 OmniTI Computer Consulting, Inc.  All rights reserved.
  18 #
  19 # Load support functions
  20 . ../../lib/functions.sh
  21 
  22 PROG=dhcp
  23 VER=4.3.0
  24 VERHUMAN=$VER
  25 PKG=network/service/isc-dhcp
  26 SUMMARY="ISC DHCP"
  27 DESC="$SUMMARY $VER"
  28 
  29 DEPENDS_IPS="system/library"
  30 
  31 BUILDARCH=32
  32 
  33 CONFIGURE_OPTS="--enable-use-sockets --enable-ipv4-pktinfo --prefix=$PREFIX --bindir=$PREFIX/bin --sbindir=$PREFIX/sbin"
  34 
  35 pre_package() {
  36     # Make directories and install extra files before package construction.
  37     logcmd mkdir -p $DESTDIR/usr/share/isc-dhcp/examples || \ logerr
  38         "mkdir of $DESTDIR/usr/share/isc-dhcp/examples failed"
  39     logcmd mkdir -p $DESTDIR/lib/svc/manifest/network || \ logerr
  40         "mkdir of $DESTDIR/lib/svc/manifest/network failed"
  41     logcmd mkdir -p $DESTDIR/var/db || logerr "mkdir of $DESTDIR/var/db failed"
  42     logcmd touch $DESTDIR/var/db/dhcpd.leases
  43     logcmd touch $DESTDIR/var/db/dhcpd6.leases
  44     logcmd cp $SRCDIR/files/isc-dhcp.xml $DESTDIR/lib/svc/manifest/network || \
  45         logerr "Cannot copy in manifest."
  46 }
  47 
  48 init
  49 download_source $PROG $PROG $VER
  50 patch_source
  51 prep_build
  52 build
  53 # Make directories in the proto area prior to the package being built.
  54 pre_package
  55 make_package
  56 clean_up
  57 
  58 # Vim hints
  59 # vim:ts=4:sw=4:et: