summaryrefslogtreecommitdiff
path: root/sys-apps/apk-tools/apk-tools-2.6.6-r2.ebuild
blob: 26ac848df74f3dd2783b6bf3a0dd28554736ae0e (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
# Copyright 2015-2016 Adélie Linux Team
# Distributed under the terms of the NCSA License

EAPI=6

DESCRIPTION="The Alpine Linux Package Keeper (APK)"
HOMEPAGE="http://alpinelinux.org/"
SRC_URI="http://git.alpinelinux.org/cgit/apk-tools/snapshot/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="arm mips ppc x86 x86_64 ~alpha ~arm64 ~hppa ~ppc64 ~sparc64"
IUSE="static" # lua

COMMON_DEPEND="dev-libs/libfetch[ssl]"
DEPEND="${COMMON_DEPEND}
	virtual/pkgconfig"
RDEPEND="${COMMON_DEPEND}
	>=dev-libs/openssl-1.0.1p
	static? ( >=dev-libs/openssl-1.0.1p[static-libs] )
	sys-libs/zlib
	static? ( sys-libs/zlib[static-libs] )
"
#	lua? ( dev-lang/lua:5.2 )

PATCHES=(
	"${FILESDIR}"/${P}-use-sha256-signature.patch
	"${FILESDIR}"/${P}-fuzzy-versions.patch
	)

src_configure() {
	#if ! use lua; then
		echo 'LUAAPK=' >> "${S}"/config.mk
		echo 'export LUAAPK' >> "${S}"/config.mk
	#fi
}

src_compile () {
	export CFLAGS=-Wno-error=unused-result
	emake
	use static && emake static
}

pkg_preinst () {
	mkdir -p "${D}"/usr/sbin
	mv "${D}"/sbin/apk "${D}"/usr/sbin/apk
	use static && "${D}"/sbin/apk.static "${D}"/usr/sbin/apk.static
	rmdir "${D}"/sbin
}