blob: 4b9f73599ff699c600b4a1843e0ec931b47e8573 (
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
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit java-pkg-2 java-ant-2 systemd
MAJOR_PV="$(ver_cut 1-2)"
REL_PV="$(ver_cut 3)"
SVN_PV="$(ver_cut 4)"
DESCRIPTION="YaCy - p2p based distributed web-search engine"
HOMEPAGE="https://www.yacy.net/"
SRC_URI="https://www.yacy.net/release/yacy_v${MAJOR_PV}_${REL_PV}_${SVN_PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd +openrc"
DEPEND=">=virtual/jdk-1.8
acct-group/yacy"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}"
EANT_BUILD_TARGET="all"
UNINSTALL_IGNORE="/usr/share/yacy/DATA"
src_install() {
# remove win-only stuff
find "${S}" -name "*.bat" -exec rm '{}' \; || die
# remove init-scripts
rm ${S}/*.sh || die
# remove sources
rm -r "${S}/source" || die
rm ${S}/build.properties ${S}/build.xml
dodoc AUTHORS NOTICE && rm AUTHORS NOTICE COPYRIGHT gpl.txt
yacy_home="${EROOT}/usr/share/${PN}"
dodir ${yacy_home}
cp -r ${S}/* ${D}${yacy_home} || die
rm -r ${D}${yacy_home}/lib/*License
dodir /var/log/yacy || die
chown yacy:yacy "${D}/var/log/yacy" || die
keepdir /var/log/yacy
rmdir "$D/$yacy_home/DATA"
dosym /var/lib/yacy /${yacy_home}/DATA
use openrc && {
exeinto /etc/init.d
newexe "${FILESDIR}/yacy.rc" yacy
doconfd "${FILESDIR}/yacy.confd"
}
use systemd && systemd_newunit "${FILESDIR}"/${PN}-ipv6.service ${PN}.service
}
pkg_postinst() {
einfo "yacy.logging will write logfiles into /var/lib/yacy/LOG"
einfo "To setup YaCy, open http://localhost:8090 in your browser."
}
|