summaryrefslogtreecommitdiff
path: root/repo/tor/tor.xibuild
blob: 940da310dea5e7474e02a62e7506d8427250258d (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
#!/bin/sh

NAME="tor"
DESC="Anonymous network connectivity"

MAKEDEPS=" libcap libseccomp libevent openssl cacerts zlib xz zstd"

PKG_VER=0.4.6.10
SOURCE="https://www.torproject.org/dist/tor-$PKG_VER.tar.gz"

ADDITIONAL="
0002-disable-wildcard-escaping-test_patch
tor.confd
tor.initd
torrc.sample.patch
"

prepare () {
    apply_patches
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--disable-html-manual \
        --enable-zstd
	make
}


package() {
	make DESTDIR="$PKG_DEST" install

	install -dm0755 -o "$pkgusers" \
		"$PKG_DEST"/var/lib/"tor" \
		"$PKG_DEST"/var/log/"tor"

	install -Dm0755 "$BUILD_ROOT"/"tor".initd \
		"$PKG_DEST"/etc/init.d/"tor"
	install -Dm0644 "$BUILD_ROOT"/"tor".confd \
		"$PKG_DEST"/etc/conf.d/"tor"
}