Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/minidlna/, net-misc/minidlna/files/
Date: Fri, 29 Sep 2017 09:34:38
Message-Id: 1506677667.2fbff0b9eec27b5a0b84d93ea87ea4541b9d44ac.xmw@gentoo
1 commit: 2fbff0b9eec27b5a0b84d93ea87ea4541b9d44ac
2 Author: Michael Weber <xmw <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 29 09:34:13 2017 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 29 09:34:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fbff0b9
7
8 net-misc/minidlna: version bump w/ USE=avahi (bug 619322, thanks for the hint).
9
10 Package-Manager: Portage-2.3.10, Repoman-2.3.3
11
12 net-misc/minidlna/Manifest | 1 +
13 .../files/minidlna-1.2.1-buildsystem.patch | 20 +++++
14 net-misc/minidlna/minidlna-1.2.1.ebuild | 100 +++++++++++++++++++++
15 3 files changed, 121 insertions(+)
16
17 diff --git a/net-misc/minidlna/Manifest b/net-misc/minidlna/Manifest
18 index 03aab3c3ce4..99f1253b455 100644
19 --- a/net-misc/minidlna/Manifest
20 +++ b/net-misc/minidlna/Manifest
21 @@ -1,2 +1,3 @@
22 DIST minidlna-1.1.5.tar.gz 488191 SHA256 8477ad0416bb2af5cd8da6dde6c07ffe1a413492b7fe40a362bc8587be15ab9b SHA512 2a8eaa42fcda6f98648f1726af5cdba6d2358c386440dd0de933364cfbd1ced2fee5f883033e1a5a692b760749beb2c12798020a3591ddcea22663102d4f3dfa WHIRLPOOL 8ed8fd62fb063b042a234c8647fa05c65e4f1e331a66efae8f361002f5cedcd2706d777348332075e3263e0d8bbde7794dd84fc400dfe3a656e5d70952427669
23 +DIST minidlna-1.2.1.tar.gz 459549 SHA256 67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec SHA512 17827155bfbfd2b51939bc86080e8724dcded138af8fede9c7715c225524e86d3c21bfd8d40dbf201861ef154189d9c5e223b719bf7695251212b26ec290462b WHIRLPOOL 9ecbe04b367af7b670a1e2be3effcb6666aae5fa9edabe340c05ddb55d894cdee137a783aec98dd8dadfcae4924a24ea408abb0409b4abedec1f6e53e3a998e3
24 DIST minidlna-gentoo-artwork.patch.xz 49372 SHA256 37ae7228b07b7c81c8962c5dc88a41ed1691bdf1b019b654a9fc93ac1da0c7ce SHA512 3bdaadc2a2331e9ebf37ed80d1de7cebd6307ab068dc9cf067159b2c0754a765b2076c07e988602af4dd2d6c49c819da8a1f668258950e15592027b353f22b5e WHIRLPOOL e243b9b6a002af5e3ee1bb196239790ff86724624ebccb34c84ac072426341db6b5f44e455d13657d5284220fe2688ddf3a2ec0212a7b86525eb02a6c080af80
25
26 diff --git a/net-misc/minidlna/files/minidlna-1.2.1-buildsystem.patch b/net-misc/minidlna/files/minidlna-1.2.1-buildsystem.patch
27 new file mode 100644
28 index 00000000000..10154dd5165
29 --- /dev/null
30 +++ b/net-misc/minidlna/files/minidlna-1.2.1-buildsystem.patch
31 @@ -0,0 +1,20 @@
32 +--- minidlna-1.2.1/configure.ac
33 ++++ minidlna-1.2.1/configure.ac
34 +@@ -477,6 +477,9 @@
35 + AM_CONDITIONAL(NEED_VORBIS, true),
36 + -logg)
37 +
38 ++AC_ARG_ENABLE([avahi], AS_HELP_STRING([--enable-avahi], [Enable search for avahi]))
39 ++
40 ++AS_IF([test "x$enable_avahi" = "xyes"], [
41 + AC_CHECK_LIB(avahi-client, avahi_threaded_poll_new,
42 + [AC_CHECK_HEADERS([avahi-common/thread-watch.h],
43 + AM_CONDITIONAL(HAVE_AVAHI, true)
44 +@@ -484,6 +487,7 @@
45 + AM_CONDITIONAL(HAVE_AVAHI, false))],
46 + AM_CONDITIONAL(HAVE_AVAHI, false),
47 + -lavahi-client -lavahi-common)
48 ++], [AM_CONDITIONAL(HAVE_AVAHI, false)])
49 +
50 + ################################################################################################################
51 + ### Header checks
52
53 diff --git a/net-misc/minidlna/minidlna-1.2.1.ebuild b/net-misc/minidlna/minidlna-1.2.1.ebuild
54 new file mode 100644
55 index 00000000000..6b5a1be8ebe
56 --- /dev/null
57 +++ b/net-misc/minidlna/minidlna-1.2.1.ebuild
58 @@ -0,0 +1,100 @@
59 +# Copyright 1999-2017 Gentoo Foundation
60 +# Distributed under the terms of the GNU General Public License v2
61 +
62 +EAPI=6
63 +
64 +inherit autotools eutils linux-info systemd toolchain-funcs user
65 +
66 +DESCRIPTION="DLNA/UPnP-AV compliant media server"
67 +HOMEPAGE="http://minidlna.sourceforge.net/"
68 +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz
69 + https://dev.gentoo.org/~xmw/${PN}-gentoo-artwork.patch.xz"
70 +
71 +LICENSE="BSD GPL-2"
72 +SLOT="0"
73 +KEYWORDS="~amd64 ~arm ~x86"
74 +IUSE="avahi netgear readynas"
75 +
76 +RDEPEND="dev-db/sqlite:3
77 + media-libs/flac
78 + media-libs/libexif
79 + media-libs/libid3tag
80 + media-libs/libogg
81 + media-libs/libvorbis
82 + virtual/ffmpeg
83 + virtual/jpeg:0
84 + avahi? ( net-dns/avahi )"
85 +DEPEND="${RDEPEND}
86 + virtual/pkgconfig"
87 +
88 +CONFIG_CHECK="~INOTIFY_USER"
89 +
90 +PATCHES=( "${WORKDIR}"/${PN}-gentoo-artwork.patch
91 + "${FILESDIR}"/${P}-buildsystem.patch )
92 +
93 +pkg_setup() {
94 + local my_is_new="yes"
95 + [ -d "${EPREFIX}"/var/lib/${PN} ] && my_is_new="no"
96 + enewgroup ${PN}
97 + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
98 + if [ -d "${EPREFIX}"/var/lib/${PN} ] && [ "${my_is_new}" == "yes" ] ; then
99 + # created by above enewuser command w/ wrong group and permissions
100 + chown ${PN}:${PN} "${EPREFIX}"/var/lib/${PN} || die
101 + chmod 0750 "${EPREFIX}"/var/lib/${PN} || die
102 + # if user already exists, but /var/lib/minidlna is missing
103 + # rely on ${D}/var/lib/minidlna created in src_install
104 + fi
105 +
106 + linux-info_pkg_setup
107 +}
108 +
109 +src_prepare() {
110 + sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \
111 + -e "/db_dir/s:/var/cache/:/var/lib/:" \
112 + -i ${PN}.conf || die
113 +
114 + default
115 +
116 + eautoreconf
117 +}
118 +
119 +src_configure() {
120 + econf \
121 + --disable-silent-rules \
122 + --with-db-path=/var/lib/${PN} \
123 + --with-log-path=/var/log/${PN} \
124 + --enable-tivo \
125 + $(use_enable avahi ) \
126 + $(use_enable netgear) \
127 + $(use_enable readynas)
128 +}
129 +
130 +src_install() {
131 + default
132 +
133 + #bug 536532
134 + dosym /usr/sbin/${PN}d /usr/bin/${PN}
135 +
136 + insinto /etc
137 + doins ${PN}.conf
138 +
139 + newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN}
140 + newinitd "${FILESDIR}"/${PN}-1.1.5.initd ${PN}
141 + systemd_newunit "${FILESDIR}"/${PN}-1.1.2.service ${PN}.service
142 + echo "d /run/${PN} 0755 ${PN} ${PN} -" > "${T}"/${PN}.conf
143 + systemd_dotmpfilesd "${T}"/${PN}.conf
144 +
145 + dodir /var/{lib,log}/${PN}
146 + fowners ${PN}:${PN} /var/{lib,log}/${PN}
147 + fperms 0750 /var/{lib,log}/${PN}
148 +
149 + dodoc AUTHORS NEWS README TODO
150 + doman ${PN}d.8 ${PN}.conf.5
151 +}
152 +
153 +pkg_postinst() {
154 + elog "minidlna now runs as minidlna:minidlna (bug 426726),"
155 + elog "logfile is moved to /var/log/minidlna/minidlna.log,"
156 + elog "cache is moved to /var/lib/minidlna."
157 + elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs."
158 +}