1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 1999-2024 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
USE_RUBY="ruby31"
|
|
6 |
USE_RUBY="ruby31 ruby32"
|
7 |
7 |
|
8 |
8 |
inherit desktop ruby-ng
|
9 |
9 |
|
10 |
10 |
PLUGIN_HASH="30071c3008e4616e723cf4e734fc79254019af09"
|
|
11 |
BLOWFISH_PATCH_NAME="1585-use-own-blowfish-impl.patch"
|
|
12 |
BLOWFISH_PATCH_URI="https://dev.mikutter.hachune.net/attachments/download/813/${BLOWFISH_PATCH_NAME}"
|
11 |
13 |
|
12 |
14 |
if [ "${PV}" = "9999" ]; then
|
13 |
|
EGIT_REPO_URI="git://mikutter.hachune.net/mikutter.git
|
14 |
|
https://github.com/toshia/twitter_api_keys.git"
|
|
15 |
EGIT_REPO_URI="git://mikutter.hachune.net/mikutter.git"
|
15 |
16 |
inherit git-r3
|
16 |
|
SRC_URI="https://raw.githubusercontent.com/toshia/twitter_api_keys/${PLUGIN_HASH}/twitter_api_keys.rb"
|
|
17 |
SRC_URI=" ${BLOWFISH_PATCH_URI}"
|
17 |
18 |
EGIT_CHECKOUT_DIR="${WORKDIR}/all"
|
18 |
19 |
else
|
19 |
20 |
SRC_URI="http://mikutter.hachune.net/bin/${P}.tar.gz
|
20 |
|
https://raw.githubusercontent.com/toshia/twitter_api_keys/${PLUGIN_HASH}/twitter_api_keys.rb"
|
|
21 |
${BLOWFISH_PATCH_URI}"
|
21 |
22 |
KEYWORDS="~amd64 ~riscv"
|
22 |
23 |
fi
|
23 |
24 |
|
24 |
25 |
DESCRIPTION="Simple, powerful and moeful twitter client"
|
25 |
26 |
HOMEPAGE="https://mikutter.hachune.net/"
|
26 |
27 |
|
27 |
|
LICENSE="MIT"
|
|
28 |
# Apache license for the blowfish patch
|
|
29 |
# https://dev.mikutter.hachune.net/issues/1585
|
|
30 |
LICENSE="Apache-2.0 MIT"
|
28 |
31 |
SLOT="0"
|
29 |
32 |
IUSE="+libnotify"
|
30 |
33 |
|
|
34 |
PATCHES=(
|
|
35 |
"${DISTDIR}/${BLOWFISH_PATCH_NAME}"
|
|
36 |
)
|
|
37 |
|
31 |
38 |
DEPEND=""
|
32 |
39 |
RDEPEND="
|
33 |
40 |
libnotify? ( x11-libs/libnotify )
|
... | ... | |
56 |
63 |
dev-ruby/ruby-gtk3
|
57 |
64 |
>=dev-ruby/typed-array-0.1.2
|
58 |
65 |
!>=dev-ruby/typed-array-0.2
|
59 |
|
dev-ruby/twitter-text
|
60 |
66 |
virtual/ruby-ssl"
|
61 |
67 |
|
62 |
68 |
all_ruby_unpack() {
|
... | ... | |
85 |
91 |
dodoc README
|
86 |
92 |
make_desktop_entry mikutter Mikutter \
|
87 |
93 |
/usr/share/mikutter/core/skin/data/icon.png
|
88 |
|
|
89 |
|
insinto /usr/share/mikutter/plugin/twitter_api_keys
|
90 |
|
newins "${DISTDIR}"/twitter_api_keys.rb twitter_api_keys.rb.in
|
91 |
|
}
|
92 |
|
|
93 |
|
pkg_postinst() {
|
94 |
|
echo
|
95 |
|
elog "To use Twitter, you need to setup your Consumer Key/Consumer Secret by running"
|
96 |
|
elog " emerge --config =${PF}"
|
97 |
|
}
|
98 |
|
|
99 |
|
pkg_config() {
|
100 |
|
local PLUGIN_DIR="${EROOT}"/usr/share/mikutter/plugin
|
101 |
|
local CK CS
|
102 |
|
|
103 |
|
echo
|
104 |
|
einfon "Please input your Consumer Key for Twitter: "
|
105 |
|
read -r CK
|
106 |
|
|
107 |
|
echo
|
108 |
|
einfon "Please input your Consumer Secret for Twitter: "
|
109 |
|
read -r CS
|
110 |
|
|
111 |
|
if [ -z "${CK}" -o -z "${CS}" ]; then
|
112 |
|
eerror "Consumer Key or Consumer Secret is missing."
|
113 |
|
return
|
114 |
|
fi
|
115 |
|
|
116 |
|
sed -e "/consumer_key = /s!''!'${CK}'!" \
|
117 |
|
-e "/consumer_secret = /s!''!'${CS}'!" \
|
118 |
|
${PLUGIN_DIR}/twitter_api_keys/twitter_api_keys.rb.in > \
|
119 |
|
${PLUGIN_DIR}/twitter_api_keys/twitter_api_keys.rb
|
120 |
|
|
121 |
|
echo
|
122 |
|
einfo "Consuker Key/Consumer secret is set."
|
123 |
94 |
}
|