summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/etcnet/PKGBUILD
blob: f8214a81258629b94331d33b346c49e35390a169 (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
pkgname=etcnet
pkgver=0.9.8
pkgrel=6
pkgdesc="/etc/net network configuration subsystem"
url="http://etcnet.org/"
depends=('bash' 'grep' 'sed' 'iproute' 'wireless_tools' 'iptables' 'dhcpcd')
arch=i686
install=etcnet.install
source=(http://etcnet.org/files/$pkgname-$pkgver.tar.gz 10-defaults network functions.patch options ipv4route ipv4address )
backup=(etc/net/ifaces/eth0/options etc/net/ifaces/eth0/ipv4route etc/net/ifaces/eth0/ipv4address)

build() {
  cd $startdir/src/$pkgname-$pkgver
  mkdir -p $startdir/pkg/var/lib/etcnet
  mkdir -p $startdir/pkg/etc/sysconfig
  cd etc/net
  patch -p0 < $startdir/src/functions.patch || return 1
   
  install -D -m 644 $startdir/src/10-defaults  $startdir/pkg/etc/net/options.d/10-defaults
  install -D -m 644 $startdir/src/network $startdir/pkg/etc/sysconfig/network
  cp -rp $startdir/src/$pkgname-$pkgver/docs   $startdir/pkg/etc/net
  cp -rp $startdir/src/$pkgname-$pkgver/examples   $startdir/pkg/etc/net

   #setup default for eth0  
  mkdir -p $startdir/pkg/etc/net/ifaces/eth0
  cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options
#  cp $startdir/src/ipv4route $startdir/pkg/etc/net/ifaces/eth0/ipv4route
#  cp $startdir/src/ipv4address $startdir/pkg/etc/net/ifaces/eth0/ipv4address

  cd $startdir/src/$pkgname-$pkgver
  rm -Rf etc/sysconfig etc/net/{README.ALT,TODO,ChangeLog,ifaces/unknown}
  cp -Rf etc $startdir/pkg
  cd $startdir/pkg/etc/net/scripts
  ln -s ifup-ifplugd ifup-wireless
  ln -s ifdown-ifplugd ifdown-wireless
   
}