# Contributor: Nathan Owe <ndowens.aur at gmail dot com>
# Updated by starfry
pkgname=dcc
pkgver=1.3.140
pkgrel=1
pkgdesc="Distributed Checksum Clearinghouse spam tool"
url="http://www.rhyolite.com/anti-spam/dcc/"
arch=('i686' 'x86_64')
license="custom"
depends=('sh')
source=(http://www.rhyolite.com/anti-spam/dcc/source/old/$pkgname-$pkgver.tar.Z \
http://www.rhyolite.com/dcc/LICENSE)
md5sums=('ca00aa80ed2afd0f5182d3e61373291b'
'b88af7cf9c6a5c7ec47e8df22d2ffe69')
build() {
cd $srcdir/$pkgname-$pkgver
./configure --with-installroot=${pkgdir} \
--mandir=/usr/share/man --homedir=/opt/dcc \
--bindir=/usr/bin --libexecdir=/usr/lib/dcc
make
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=${pkgdir}/ install
install -d $pkgdir/usr/share/licenses/$pkgname
install -Dm644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
#Fix file permissions
find $pkgdir/ -group bin -exec chgrp root {} \;
find $pkgdir/ -user bin -exec chown root {} \;
find $pkgdir/opt/dcc -type f -exec chmod 644 {} \;
chmod 755 $pkgdir/opt/dcc/log
}