summaryrefslogtreecommitdiff
blob: 4d9dbd2f73ca6304c7a8c2b58e5ad914497c0be7 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools git-r3 udev

DESCRIPTION="Library to interact with PS Vita's USB MTP protocol"
HOMEPAGE="https://github.com/codestation/vitamtp"
LICENSE="GPL-3"
SLOT="0"
EGIT_REPO_URI="https://github.com/codestation/vitamtp"

DEPEND="
	virtual/libusb:1
	dev-libs/libxml2:2
"
RDEPEND="${DEPEND}"

src_prepare() {
	rm ChangeLog || die "Failed to rm changelog" # Triggers QA warn (symlink to nowhere)

	sed -r \
		-e 's@vitamtp@usb@' \
		-i debian/libvitamtp5.udev
	# ^ ease console management for users
	# (we don't really need extra group for this)

	default
	eautoreconf
}

src_configure() {
	econf --disable-static
}

src_install() {
	default

	find "${ED}" -name '*.la' -delete || die

	udev_newrules debian/libvitamtp5.udev 10-vitamtp.rules
}

pkg_postinst() {
	udev_reload
}

pkg_postrm() {
	udev_reload
}