Gentoo Archives: gentoo-commits

From: Kenton Groombridge <concord@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/miniflux/
Date: Mon, 31 Oct 2022 13:41:36
Message-Id: 1667223666.4964213357a448ea6d96761951940c68299735b5.concord@gentoo
1 commit: 4964213357a448ea6d96761951940c68299735b5
2 Author: Kenton Groombridge <concord <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 31 13:30:57 2022 +0000
4 Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 31 13:41:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49642133
7
8 www-apps/miniflux: add 2.0.39
9
10 Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>
11
12 www-apps/miniflux/Manifest | 2 +
13 www-apps/miniflux/miniflux-2.0.39.ebuild | 98 ++++++++++++++++++++++++++++++++
14 2 files changed, 100 insertions(+)
15
16 diff --git a/www-apps/miniflux/Manifest b/www-apps/miniflux/Manifest
17 index 5fced6ef5123..dda3cc2225e7 100644
18 --- a/www-apps/miniflux/Manifest
19 +++ b/www-apps/miniflux/Manifest
20 @@ -2,3 +2,5 @@ DIST miniflux-2.0.37-deps.tar.xz 154048036 BLAKE2B 88eaba31505c4d1ace55428a8e29d
21 DIST miniflux-2.0.37.tar.gz 555360 BLAKE2B 64188e03583dd011261c2d69c30e105af65d61ed996c4c2785621aa74d6b0602eaeed312750a089dfb1c4f5bc00c26f79549f2df27714cdca44506439b2ba6af SHA512 6944e638cdec6d0d5e92362ad4849028d0260780919eff8d6b6999327f9a482a1b3b09f1479b3c8c4b2727ced524caa13a6c7ac655b230ff244519cfe095cbd5
22 DIST miniflux-2.0.38-deps.tar.xz 154290660 BLAKE2B f8317e54ec3639e9bc90f9f28d4c645a816d8b8510df090145a87e9247c4762303276646505abf083d99dcf172a9a022c4771fdad58811779a47018158cd7690 SHA512 6390a6c06fb00428ff3088e81f9cca2b6343f77cc1151ccb8864eabac2983ec05630d18199b152c50fc7f463b14b7615fd901260444f00d4d6337740689d1eb3
23 DIST miniflux-2.0.38.tar.gz 568359 BLAKE2B 5e29663c59debdbdb4c0ed8da5d27e47ad0c0db70368844c3ede965050f0fa8410e6cd14e28faf811f39a39f0b5417d2b59302ac7cf00acfea977ab2b4b732ee SHA512 7ebedc469b8aa08e8ce73b8ae0e586927847f08e541e57fdc41b440a50524649938eb86ee56d885c688e83f1aa09063514eac4c1d8ad22459589b1ea994ef8ff
24 +DIST miniflux-2.0.39-deps.tar.xz 149668196 BLAKE2B ded3bcf0ac706092570d41669cbdfef68d3aab764790f3a6fd09cf8fb436765f7c10abde9422a1aa70ce31d1e186558732f8208b8a77d1ce28dc212c5e855031 SHA512 cea27e014a8d88bbd77b018d9f02736b4f7c9d39c72fa2358b581e0a01be58b9ca132d414e3c562bdaaab8c89e08a938f7b0ef94821a8a76b1025f1d7ac2a63b
25 +DIST miniflux-2.0.39.tar.gz 574941 BLAKE2B 66acc0c2b7bee77fd98e19c89eabcb1f7da195a18fb2b470deafd2cec23c71c3a939dde535e45fefa59e2d65b727173a59cecfda40288ee0830d23ebf5c5a1b1 SHA512 d068fd8233a235540ca232be1e36ee0fa73ea14ed0f8a8db17669bd8ddfb2d5cb35712af5ce365726e3688c6d764341c2f6d03ff8af7ae7f76e847c9f454dcb4
26
27 diff --git a/www-apps/miniflux/miniflux-2.0.39.ebuild b/www-apps/miniflux/miniflux-2.0.39.ebuild
28 new file mode 100644
29 index 000000000000..4ef790cbc12c
30 --- /dev/null
31 +++ b/www-apps/miniflux/miniflux-2.0.39.ebuild
32 @@ -0,0 +1,98 @@
33 +# Copyright 2020-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +inherit go-module systemd
39 +
40 +DESCRIPTION="Minimalist and opinionated feed reader"
41 +HOMEPAGE="https://miniflux.app https://github.com/miniflux/v2"
42 +SRC_URI="https://github.com/${PN}/v2/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +SRC_URI+=" https://dev.gentoo.org/~concord/distfiles/${P}-deps.tar.xz"
44 +
45 +LICENSE="Apache-2.0 BSD BSD-2 MIT"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~ppc64"
48 +
49 +RESTRICT="test" # requires network access
50 +
51 +DEPEND="acct-user/miniflux"
52 +RDEPEND="${DEPEND}
53 + >=dev-db/postgresql-9.5
54 +"
55 +
56 +S="${WORKDIR}/v2-${PV}"
57 +
58 +src_compile() {
59 + ego build -ldflags="-s -w -X 'miniflux.app/version.Version=${PV}' " -o miniflux main.go
60 +}
61 +
62 +src_install() {
63 + dobin miniflux
64 +
65 + insinto /etc
66 + doins "${FILESDIR}/${PN}.conf"
67 +
68 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
69 +
70 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
71 + systemd_dounit "${FILESDIR}/${PN}.service"
72 +
73 + fowners miniflux:root /etc/${PN}.conf
74 + fperms o-rwx /etc/${PN}.conf
75 +
76 + local DOCS=(
77 + ChangeLog
78 + README.md
79 + "${FILESDIR}"/README.gentoo
80 + )
81 +
82 + # Makefile has no install target, so call einstalldocs directly
83 + einstalldocs
84 +
85 + doman "${PN}".1
86 +}
87 +
88 +pkg_postinst() {
89 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
90 + # This is a new installation
91 +
92 + echo
93 + elog "Before using miniflux, you must first create and initialize the database"
94 + elog "and enable the hstore extension for it."
95 + elog ""
96 + elog "Afterwards, create your first admin user by running:"
97 + elog " miniflux -create-admin"
98 + else
99 + # This is an existing installation
100 +
101 + echo
102 + elog "If you are upgrading from a previous version, schema migrations must be performed."
103 + elog "To perform the migrations, stop the daemon, backup your database, and run:"
104 + elog " emerge --config =${PF}"
105 + fi
106 +
107 + echo
108 + elog "Please read"
109 + elog ""
110 + elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
111 + elog ""
112 + elog "for more information."
113 +}
114 +
115 +pkg_config() {
116 + # To be safe, avoid doing migrations if miniflux is running
117 + if pgrep miniflux; then
118 + die "miniflux appears to be running, refusing to continue."
119 + fi
120 +
121 + # Extract the database URL variable instead of just sourcing the config file
122 + # because miniflux itself may interpret quotes as part of the URL
123 + local DATABASE_URL="$(sed -n 's/^DATABASE_URL=\(.*\)/\1/p' ${EROOT}/etc/${PN}.conf)"
124 + [[ -n "${DATABASE_URL}" ]] || die "Failed getting DATABASE_URL from config file"
125 +
126 + DATABASE_URL="${DATABASE_URL}" "${EROOT}"/usr/bin/miniflux -migrate || die "miniflux -migrate failed. Please check the above output for errors."
127 +
128 + echo
129 + elog "Database migrations complete."
130 +}