aboutsummaryrefslogtreecommitdiffstats
path: root/main/swatch/APKBUILD
blob: 1e0096246db8bbb3361acf3d1587120727ac4988 (plain) (blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=swatch
pkgver=3.2.3
pkgrel=3
pkgdesc="Logfile monitoring tool"
url="http://sourceforge.net/projects/swatch/"
arch="noarch"
license="GPL"
depends="perl perl-date-calc perl-date-format perl-date-manip perl-file-tail perl-carp-clan"
makedepends="perl-dev"
install=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	swatch.initd
	swatch.confd
	swatchrc"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
        make || return 1
        make test || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
        make realclean || return 1

	# remove perllocal.pod and .packlist
	find "$pkgdir" -name perllocal.pod -delete
	find "$pkgdir" -name .packlist -delete


#echo "pkdir= $pkgdir"
#echo "srcdir= $srcdir"

	mkdir -p "$pkgdir"/etc/init.d/
	mkdir -p "$pkgdir"/etc/conf.d/
	mkdir -p "$pkgdir"/etc/$pkgname/

	cp "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	cp "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	cp "$srcdir"/${pkgname}rc "$pkgdir"/etc/$pkgname/${pkgname}rc

	chmod 755 "$pkgdir"/etc/init.d/$pkgname
}

md5sums="1162f1024cf07fc750ed4960d61ac4e8  swatch-3.2.3.tar.gz
cc99f0831b4a069f90fdedee82495523  swatch.initd
a02a10a0266781a1ce16cc3b5e84968c  swatch.confd
8a92d37f96982030e0283dc7fe706da8  swatchrc"
sha256sums="e29480993e52f245f3abec079b3103d8e97244dafe754f8c2d37e7b0b3b58077  swatch-3.2.3.tar.gz
f2dce65a4fdb72087bdefdbd36298a981c6cd5535f921774bded63e6f4232f9d  swatch.initd
6d538c6c915c14b5820e878876cb2410f782afb8f0a930edd9c941ab4011e9c8  swatch.confd
8569d090eba3465e3f26705bd5ea738c7b35dabeae77b68f25508aee520cfca6  swatchrc"
sha512sums="8020fb99b7acfc322b2a80d8fd9669fc97f272c33b19a36ef1be025ffd1a463658e9b0cc5ddbac02b12a68db9e148da53734beb632677ef88337848bbd60e90f  swatch-3.2.3.tar.gz
0f300203355446aec23997f261d86c98e98204007a0ae023b85edd15b15b74886e42f9203d0ac03fe48df616d4a021052e6274783bd23b14fce961afe654cc80  swatch.initd
493f3e54e6472ee349c3d56537d3ad88405936d6551defa802911625e84a9afabc13c4975e2edfe63e723c48cfdfe09b966e807d05ca218b4cd238889b656fde  swatch.confd
6579b3e998640f571097cddb65c7772f62855605fb38fbeb4e53976d72faacb6bdb90f7392727170e0e523d19ae74f19b30ec5fd0c5fab8c67f64976ee0f2d73  swatchrc"