aboutsummaryrefslogtreecommitdiffstats
path: root/main/eggdrop/APKBUILD
blob: 99c73fefc39c4d3f7f5670cbcc060815ec3681a1 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=eggdrop
pkgver=1.8.4
pkgrel=2
pkgdesc="World's most popular Open Source IRC bot"
url="https://eggheads.org/"
arch="all"
license='GPL-2.0-or-later'
options="!check" # No test suite
depends="tcl"
makedepends="openssl-dev tcl-dev !bind-libs"
subpackages="$pkgname-doc $pkgname-logs2html $pkgname-gseen"
source="$pkgname-$pkgver.tar.gz::https://github.com/eggheads/eggdrop/archive/v$pkgver.tar.gz
	eggdrop-langdir.patch
	logs2html.mod.patch
	gseen.mod.patch
	utf8.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-tcllib=/usr/lib/libtcl8.6.so \
		--with-tclinc=/usr/include/tcl.h
	make config
	make
}

package() {
	# workaround for borked Makefile
	mkdir -p "$pkgdir"/usr/share/eggdrop/doc \
		"$pkgdir"/usr/share/eggdrop/scripts \
		"$pkgdir"/usr/share/eggdrop/help/set/

	make DEST="$pkgdir"/usr/share/eggdrop install
	rm -rf "$pkgdir"/usr/share/eggdrop/README \
		"$pkgdir"/usr/share/eggdrop/doc \
		"$pkgdir"/usr/share/eggdrop/eggdrop* \
		"$pkgdir"/usr/share/eggdrop/filesys \
		"$pkgdir"/usr/share/eggdrop/logs \
		"$pkgdir"/usr/share/eggdrop/modules \
		"$pkgdir"/usr/share/eggdrop/scripts/CONTENTS

	install -D -m 755 eggdrop "$pkgdir"/usr/bin/eggdrop
	install -D -m 644 doc/man1/eggdrop.1 \
		"$pkgdir"/usr/share/man/man1/eggdrop.1

	#move modules to /usr/lib
	mkdir "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/eggdrop/modules-* \
		"$pkgdir"/usr/lib/eggdrop


	# Fix paths of example eggdrop.conf
	sed -i -e '2d' -e '1s@^.*@#!/usr/bin/eggdrop@' \
		-e 's@scripts/@/usr/share/eggdrop/scripts/@g' \
		-e 's@help/@/usr/share/eggdrop/help/@g' \
		-e 's@modules/@/usr/lib/eggdrop/@g' \
		eggdrop.conf

	mkdir -p "$pkgdir"/usr/share/doc/eggdrop
	cp -a \
		COPYING FEATURES NEWS README doc/Changes1.8 eggdrop.conf \
		doc/ABOUT doc/BANS doc/BOTNET doc/BUG-REPORT doc/FIRST-SCRIPT \
		doc/MODULES doc/PARTYLINE doc/TEXT-SUBSTITUTIONS doc/TRICKS \
		doc/USERS doc/WEIRD-MESSAGES doc/tcl-commands.doc doc/settings \
		doc/html \
		"$pkgdir"/usr/share/doc/eggdrop
}

logs2html() {
	pkgdesc="logs2html module for eggdrop"
	install=""
	cd "$builddir"

	for dir in language help; do
		mkdir -p "$subpkgdir"/usr/share/eggdrop/$dir
		mv "$pkgdir"/usr/share/eggdrop/$dir/logs2html.* "$subpkgdir"/usr/share/eggdrop/$dir/
	done

	mkdir -p "$subpkgdir"/usr/lib/eggdrop
	mv "$pkgdir"/usr/lib/eggdrop/logs2html.so \
		"$subpkgdir"/usr/lib/eggdrop/

	mkdir -p "$subpkgdir"/usr/share/eggdrop/log2html

	for files in logs2html.conf user.css readme.txt; do
		cp src/mod/logs2html.mod/$files "$subpkgdir"/usr/share/eggdrop/log2html/
	done
}

gseen() {
	pkgdesc="gseen module for eggdrop"
	install=""
	cd "$builddir"
	mkdir -p "$subpkgdir"/usr/share/eggdrop/language
	mv "$pkgdir"/usr/share/eggdrop/language/gseen.* \
		"$subpkgdir"/usr/share/eggdrop/language/
	mkdir -p "$subpkgdir"/usr/lib/eggdrop
	mv "$pkgdir"/usr/lib/eggdrop/gseen.so \
		"$subpkgdir"/usr/lib/eggdrop/
	mkdir -p "$subpkgdir"/usr/share/eggdrop/gseen
	cp src/mod/gseen.mod/gseen.conf "$subpkgdir"/usr/share/eggdrop/gseen/
	cp src/mod/gseen.mod/README "$subpkgdir"/usr/share/eggdrop/gseen/
}

sha512sums="80239a015f518cadc251bfc5edcf08715b9200a70eb0df7edf0efc113f320a7e407ab1fee96322fc6ec923781aa94f5a947c458e935e8a3714fb86cbcc02cb04  eggdrop-1.8.4.tar.gz
d8e8655fed028030bc3cfe28207a289d0efbc412c7e01170a4d0bb31200f7ea93df310f19e83b485013ca5d4264694b4956252663cb3a63c3d5e4cc31346e0fe  eggdrop-langdir.patch
be173d94a953c4dc5b178950d06ce894deda60c3ddb8195c836797d45fbbcc9fba3bc3d3f34c96226464fdd327093a5d15bbc2b7924d18f845738c1a4dd64a3b  logs2html.mod.patch
7879b998880deb1943c41569e243f9f1a50df23982d82d942af6c111e7fac0fb8a8444c84980645ba15b71dd69c8db2dab6f90bcb7a4292306011c7bcfc03d0d  gseen.mod.patch
7966d4d42994e44a0e571b89f1c66cb41f672d75e6ced7051d1ece23d8c209059c3565b41de950bf9c907701ce7a5e33a215b637587075ed300a002a58eda503  utf8.patch"