aboutsummaryrefslogtreecommitdiffstats
path: root/main/eggdrop/APKBUILD
blob: 59c21f2e07b9045c4071bdeaa9e7f7f7c12798f4 (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
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
68
69
# Contributor: Carlo Landmeter <clandmeter at gmail>
pkgname=eggdrop
pkgver=1.6.19
pkgrel=1
pkgdesc="World's most popular Open Source IRC bot"
url="http://www.eggheads.org/"
license='GPL-2'
depends="tcl"
makedepends="tcl-dev !bind-libs"
install="$pkgname.post-install"
subpackages="$pkgname-logs2html $pkgname-gseen"
source="ftp://ftp.eggheads.org/pub/eggdrop/GNU/1.6/${pkgname}${pkgver}.tar.bz2
eggdrop-installer
$install
gseen.mod.patch
logs2html.mod.patch"

build() {
	cd "$srcdir/${pkgname}${pkgver}"
	
	for i in "$srcdir"/*.patch; do
		msg "Applying ${i}"
		patch -p0 -i $i || return 1
	done

	./configure --prefix=/usr
	make config || return 1
	make || return 1
	mkdir -p $pkgdir/opt/eggdrop
	make -j1 DEST="$pkgdir/opt/eggdrop" install
	install -Dm755 "$srcdir"/eggdrop-installer "$pkgdir"/usr/bin/eggdrop-installer || return 1
}

logs2html() {
	install=""
	cd "$srcdir/${pkgname}${pkgver}"

	for dirs in language help; do
		mkdir -p "$subpkgdir"/opt/eggdrop/${dirs}
		mv "$pkgdir"/opt/eggdrop/${dirs}/logs2html.* "$subpkgdir"/opt/eggdrop/${dirs}/ || return 1
	done

	mkdir -p "$subpkgdir"/opt/eggdrop/modules/
	mv "$pkgdir"/opt/eggdrop/modules/logs2html.so "$subpkgdir"/opt/eggdrop/modules/ || return 1
	mkdir -p "$subpkgdir"/opt/eggdrop/log2html
	
	for files in logs2html.conf top100.tpl user.css readme.txt chan.list; do
		cp src/mod/logs2html.mod/${files} "$subpkgdir"/opt/eggdrop/log2html/ || return 1
	done
}


gseen() {
	install=""
	cd "$srcdir/${pkgname}${pkgver}"
	mkdir -p "$subpkgdir"/opt/eggdrop/language
	mv "$pkgdir"/opt/eggdrop/language/gseen.* "$subpkgdir"/opt/eggdrop/language/ || return 1
	mkdir -p "$subpkgdir"/opt/eggdrop/modules/
	mv "$pkgdir"/opt/eggdrop/modules/gseen.so "$subpkgdir"/opt/eggdrop/modules/ || return 1
	mkdir -p "$subpkgdir"/opt/eggdrop/gseen
	cp src/mod/gseen.mod/gseen.conf "$subpkgdir"/opt/eggdrop/gseen/ || return 1
	cp src/mod/gseen.mod/README "$subpkgdir"/opt/eggdrop/gseen/ || return 1
}

md5sums="b706bbe4fdd05964e0ea0cd920f28539  eggdrop1.6.19.tar.bz2
d5214dc16c07c55edff22f495c9c367b  eggdrop-installer
48ac9f366630ca18281ab2c98a5091ba  eggdrop.post-install
37b82f60413913758cd4161dbc2e7849  gseen.mod.patch
490ffd522d5058413c96b8325d19b838  logs2html.mod.patch"