aboutsummaryrefslogblamecommitdiffstats
path: root/testing/logwatch/APKBUILD
blob: e577cdb4394ad21c47099622579534dab3b28da7 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                      
            




                                                         
                




                          
                                                                                                    










                                                                 
                                                               


                                                           
                                                         
 


                                                            



                                                                                     

                                                                                           

                                      
                                                                                                 
 


                                                                                                         

 
                                                                                                                                                                    
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=logwatch
pkgver=7.4.3
pkgrel=0
pkgdesc="A customizable, pluggable log-monitoring system"
url="http://www.logwatch.org"
arch="noarch"
license="custom"
options="!check"
depends="perl"
depends_dev=
makedepends=
install=
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz"

package() {
	cd "$srcdir"/$pkgname-$pkgver

	mkdir -p "$pkgdir"/usr/bin \
		"$pkgdir"/var/cache/$pkgname \
		"$pkgdir"/etc/periodic/daily \
		"$pkgdir"/etc/$pkgname/scripts \
		"$pkgdir"/etc/$pkgname/conf/logfiles \
		"$pkgdir"/etc/$pkgname/conf/services \
		"$pkgdir"/usr/share/$pkgname/dist.conf/logfiles \
		"$pkgdir"/usr/share/$pkgname/dist.conf/services

	touch "$pkgdir"/etc/$pkgname/conf/ignore.conf \
		"$pkgdir"/etc/$pkgname/conf/override.conf \
		"$pkgdir"/etc/$pkgname/conf/logwatch.conf

	cp -a lib "$pkgdir"/usr/share/$pkgname/lib
	cp -a scripts "$pkgdir"/usr/share/$pkgname/scripts
	cp -a conf "$pkgdir"/usr/share/$pkgname/default.conf

	find "$pkgdir"/usr/share/$pkgname/scripts -type f -exec chmod 0755 {} \;
	find "$pkgdir"/usr/share/$pkgname/default.conf -type f -exec chmod 0644 {} \;

	ln -s /usr/share/$pkgname/scripts/$pkgname.pl "$pkgdir"/usr/bin/$pkgname
	ln -s /usr/share/$pkgname/scripts/$pkgname.pl "$pkgdir"/etc/periodic/daily/$pkgname

	find . -name '*.[[:digit:]]' \
		-exec sh -c 'install -Dm644 $0 "$1"/usr/share/man/man${0##*.}/$0' {} "$pkgdir" \;

	install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
	install -Dm644 HOWTO-Customize-LogWatch "$pkgdir"/usr/share/doc/$pkgname/HOWTO-Customize-LogWatch
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="716d87238f487010f2bdf230fc66c16f3c3fe769e6bef04b0e7881c6b0563e1a4b4741235b8a40a16ab21d3803562e87e6bcf5cfbd0ace42414f1d1feae7a13a  logwatch-7.4.3.tar.gz"