summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/moblockcontrol/PKGBUILD
blob: 5a912e2a7613a82b94ddb32c282ed82817c103c3 (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
42
# Contributor: marinz <marinz@email.it>

pkgname=moblockcontrol
pkgver=1.0
pkgrel=10
pkgdesc="moblock-control"
arch=('i686' 'x86_64')
url="http://moblock-deb.sourceforge.net/"
license=('GPL')
groups=()
depends=('moblock')
makedepends=()
install=moblockcontrol.install
source=(http://download.sourceforge.net/moblock-deb/moblock-control-1.0.tar.gz \
		moblock_control.patch moblock-control-update.sh)
md5sums=('1399e5465028e116e941cd1e01f6f7fc'
			'dc269c6c47bc423b9093919d52e97d63')
backup=('etc/moblock/moblock.conf' 'etc/moblock/blocklists.list')

build() {
  
  cd $startdir/src/moblock-control-1.0
  
  patch -Np1 -i ../moblock_control.patch || return 1
  
  install -d ${pkgdir}/usr/bin ${pkgdir}/etc/moblock ${pkgdir}/etc/default ${pkgdir}/var/spool/moblock/user ${pkgdir}/lib/lsb ${pkgdir}/var/log
  install -m 755 moblock-control ${pkgdir}/usr/bin/moblock-control   
  install -m 755 blocklists.list ${pkgdir}/etc/moblock/blocklists.list 
  install -m 755 moblock.conf ${pkgdir}/etc/moblock/moblock.conf 
  install -m 755 moblock.default ${pkgdir}/etc/default/moblock 
  install -m 755 init-functions ${pkgdir}/lib/lsb/init-functions 
  install -m 755 iptables-custom-insert.sh ${pkgdir}/etc/iptables-custom-insert.sh  
  install -m 755 iptables-custom-remove.sh ${pkgdir}/etc/iptables-custom-remove.sh 
  
  touch ${pkgdir}/var/log/moblock-control.log
  touch ${pkgdir}/etc/moblock/guarding.p2p 
    
  cd $startdir/src
  install -m 755 moblock-control-update.sh ${pkgdir}/usr/bin/moblock-control-update.sh   
  sed -i "s/config\/templist.gz/config\/badpeers.gz/" $startdir/pkg/etc/moblock/blocklists.list
}