blob: a1a3d25f7e798658e2c53f4b9afbe10be4292ea9 (
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
67
68
69
70
|
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic pam systemd
DESCRIPTION="Lightweight Music Server."
HOMEPAGE="http://lms-demo.poupon.dev/ https://github.com/epoupon/lms"
SRC_URI="https://github.com/epoupon/lms/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test stb"
RESTRICT="!test? ( test )"
RDEPEND="
acct-user/lms
dev-cpp/wt
dev-libs/boost
dev-libs/libconfig[cxx]
media-libs/taglib
media-video/ffmpeg
!stb? ( media-gfx/graphicsmagick )
"
DEPEND="
${RDEPEND}
stb? ( dev-libs/stb )
"
BDEPEND="
test? ( dev-cpp/gtest )
"
PATCHES=( "${FILESDIR}/${PN}-fix-lib-dir.patch" "${FILESDIR}/${PN}-optional-tests.patch" )
src_configure() {
append-flags -I/usr/include/stb/deprecated
local mycmakeargs=(
-DIMAGE_LIBRARY=$(usex stb STB GraphicsMagick++)
-DENABLE_TESTS=$(usex test)
)
cmake_src_configure
}
src_install() {
cmake_src_install
systemd_newunit conf/systemd/default.service lms.service
newinitd "${FILESDIR}/lms.init" lms
dopamd conf/pam/lms
mv "${ED}/usr/share/lms/lms.conf" "${ED}/etc/lms.conf" || die
# Already installed in the proper directory
rm "${ED}/usr/share/lms/default.service" || die
rm "${ED}/usr/share/lms/lms" || die
keepdir /var/log/lms
fowners -R lms:lms /var/log/lms
keepdir /var/lms
fowners lms:lms /var/lms
}
|