summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/dnsmasq/PKGBUILD
blob: 339b95a1a8ea16aad26e037233d4012c40086cd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
pkgname=dnsmasq
pkgver=2.42
pkgrel=15
pkgdesc="A lightweight DNS/DHCP server ideal for small/home networks using NAT"
arch=(i686 x86_64)
source=(http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.gz \
    dnsmasq.rc.d $pkgname-capability-config.patch dnsmasq.conf pxelinux.0 pxelinux.default )
license=('GPL2')
url="http://www.thekelleys.org.uk/dnsmasq/doc.html"
depends=('glibc' 'bash')
backup=(etc/dnsmasq.conf)
install=$pkgname.install

build() {
  cd $startdir/src/$pkgname-$pkgver || return 1
  # patch to add a note about capability module in the config file
  patch -Np0 -i ../$pkgname-capability-config.patch || return 1

  # build
  cd $startdir/src/$pkgname-$pkgver || return 1
  make || return 1

  # install
  mkdir -p $startdir/pkg/etc/rc.d || return 1
  make PREFIX=/usr DESTDIR=$startdir/pkg install || return 1
  install -D -m 0755 \
    $startdir/src/dnsmasq.rc.d $startdir/pkg/etc/rc.d/dnsmasq || return 1
  install -D -m 0644 \
    dnsmasq.conf.example $startdir/pkg/etc/dnsmasq.conf.example || return 1
   install -D -m 0644 $startdir/src/dnsmasq.conf $startdir/pkg/etc/dnsmasq.conf

  mkdir -p $startdir/pkg/data/srv/tftp/pxelinux.cfg
  install -m 755 $startdir/src/pxelinux.default  $startdir/pkg/data/srv/tftp/pxelinux.cfg/default
  install -m 755 $startdir/src/pxelinux.0 $startdir/pkg/data/srv/tftp/pxelinux.0


  # make the required directories for DHCP server default directories
  mkdir -p $startdir/pkg/var/db || return 1
  mkdir -p $startdir/pkg/var/lib/misc || return 1
}
# vim: ts=2 sw=2 et ft=sh