1 |
commit: 6b6099cc71f6388f7b7a9d41d4734c3dccd9d3e0 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 26 08:36:25 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 26 08:36:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b6099cc |
7 |
|
8 |
app-admin/gkrellm: Added live ebuild |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-admin/gkrellm/gkrellm-9999.ebuild | 150 ++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 150 insertions(+) |
15 |
|
16 |
diff --git a/app-admin/gkrellm/gkrellm-9999.ebuild b/app-admin/gkrellm/gkrellm-9999.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..d205ffcda8a |
19 |
--- /dev/null |
20 |
+++ b/app-admin/gkrellm/gkrellm-9999.ebuild |
21 |
@@ -0,0 +1,150 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+inherit desktop multilib user systemd toolchain-funcs |
28 |
+ |
29 |
+MY_P="${P/_/-}" |
30 |
+ |
31 |
+DESCRIPTION="Single process stack of various system monitors" |
32 |
+HOMEPAGE="http://www.gkrellm.net/" |
33 |
+if [[ "${PV}" == 9999 ]] ; then |
34 |
+ inherit git-r3 |
35 |
+ EGIT_REPO_URI="https://git.srcbox.net/gkrellm" |
36 |
+else |
37 |
+ SRC_URI="http://gkrellm.srcbox.net/${MY_P}.tar.bz2" |
38 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
39 |
+fi |
40 |
+LICENSE="GPL-3" |
41 |
+SLOT="2" |
42 |
+IUSE="gnutls hddtemp libressl lm_sensors nls ntlm ssl kernel_FreeBSD X" |
43 |
+ |
44 |
+RDEPEND=" |
45 |
+ dev-libs/glib:2 |
46 |
+ hddtemp? ( app-admin/hddtemp ) |
47 |
+ ssl? ( |
48 |
+ gnutls? ( net-libs/gnutls ) |
49 |
+ !gnutls? ( |
50 |
+ !libressl? ( dev-libs/openssl:0= ) |
51 |
+ libressl? ( dev-libs/libressl:0= ) |
52 |
+ ) |
53 |
+ ) |
54 |
+ lm_sensors? ( sys-apps/lm_sensors:= ) |
55 |
+ nls? ( virtual/libintl ) |
56 |
+ ntlm? ( net-libs/libntlm ) |
57 |
+ X? ( |
58 |
+ x11-libs/gdk-pixbuf |
59 |
+ x11-libs/gtk+:2 |
60 |
+ x11-libs/libICE |
61 |
+ x11-libs/libSM |
62 |
+ x11-libs/libX11 |
63 |
+ x11-libs/pango |
64 |
+ )" |
65 |
+DEPEND="${RDEPEND} |
66 |
+ nls? ( sys-devel/gettext )" |
67 |
+ |
68 |
+BDEPEND=" |
69 |
+ virtual/pkgconfig |
70 |
+" |
71 |
+ |
72 |
+PATCHES=( |
73 |
+ "${FILESDIR}"/${PN}-2.3.5-config.patch |
74 |
+ "${FILESDIR}"/${PN}-2.3.5-width.patch |
75 |
+ "${FILESDIR}"/${PN}-2.3.5-sansfont.patch |
76 |
+) |
77 |
+ |
78 |
+S="${WORKDIR}/${MY_P}" |
79 |
+ |
80 |
+DOCS=( Changelog CREDITS README ) |
81 |
+ |
82 |
+pkg_pretend() { |
83 |
+ if use gnutls && ! use ssl ; then |
84 |
+ ewarn "You have enabled the \"gnutls\" USE flag but not the \"ssl\" USE flag." |
85 |
+ ewarn "No ssl backend will be built!" |
86 |
+ fi |
87 |
+} |
88 |
+ |
89 |
+pkg_setup() { |
90 |
+ TARGET= |
91 |
+ use kernel_FreeBSD && TARGET="freebsd" |
92 |
+} |
93 |
+ |
94 |
+src_prepare() { |
95 |
+ sed -e 's:-O2 ::' \ |
96 |
+ -e 's:override CC:CFLAGS:' \ |
97 |
+ -e 's:-L/usr/X11R6/lib::' \ |
98 |
+ -i */Makefile || die "sed Makefile(s) failed" |
99 |
+ |
100 |
+ sed -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):" \ |
101 |
+ -e "s:/usr/local/lib:${EPREFIX}/usr/local/$(get_libdir):" \ |
102 |
+ -i src/${PN}.h || die "sed ${PN}.h failed" |
103 |
+ |
104 |
+ default |
105 |
+} |
106 |
+ |
107 |
+src_compile() { |
108 |
+ if use X ; then |
109 |
+ emake \ |
110 |
+ ${TARGET} \ |
111 |
+ CC="$(tc-getCC)" \ |
112 |
+ STRIP="" \ |
113 |
+ INSTALLROOT="${EPREFIX}/usr" \ |
114 |
+ INCLUDEDIR="${EPREFIX}/usr/include/gkrellm2" \ |
115 |
+ LOCALEDIR="${EPREFIX}/usr/share/locale" \ |
116 |
+ $(usex nls "" "enable_nls=0") \ |
117 |
+ $(usex lm_sensors "" "without-libsensors=yes") \ |
118 |
+ $(usex ntlm "" "without-ntlm=yes") \ |
119 |
+ $(usex ssl $(usex gnutls 'without-ssl=yes' 'without-gnutls=yes') 'without-ssl=yes without-gnutls=yes') |
120 |
+ else |
121 |
+ cd server || die |
122 |
+ emake \ |
123 |
+ ${TARGET} \ |
124 |
+ CC="$(tc-getCC)" \ |
125 |
+ LINK_FLAGS="$LDFLAGS -Wl,-E" \ |
126 |
+ STRIP="" \ |
127 |
+ $(usex nls "" "enable_nls=0") \ |
128 |
+ $(usex lm_sensors "" "without-libsensors=yes") |
129 |
+ fi |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ if use X ; then |
134 |
+ emake \ |
135 |
+ install${TARGET:+_}${TARGET} \ |
136 |
+ $(usex nls "" "enable_nls=0") \ |
137 |
+ STRIP="" \ |
138 |
+ INSTALLDIR="${ED}/usr/bin" \ |
139 |
+ INCLUDEDIR="${ED}/usr/include" \ |
140 |
+ LOCALEDIR="${ED}/usr/share/locale" \ |
141 |
+ PKGCONFIGDIR="${ED}/usr/$(get_libdir)/pkgconfig" \ |
142 |
+ MANDIR="${ED}/usr/share/man/man1" |
143 |
+ |
144 |
+ docinto html |
145 |
+ dodoc *.html |
146 |
+ |
147 |
+ newicon src/icon.xpm ${PN}.xpm |
148 |
+ make_desktop_entry ${PN} GKrellM ${PN} |
149 |
+ else |
150 |
+ dobin server/gkrellmd |
151 |
+ |
152 |
+ insinto /usr/include/gkrellm2 |
153 |
+ doins server/gkrellmd.h |
154 |
+ doins shared/log.h |
155 |
+ fi |
156 |
+ |
157 |
+ newinitd "${FILESDIR}"/gkrellmd.initd gkrellmd |
158 |
+ newconfd "${FILESDIR}"/gkrellmd.conf gkrellmd |
159 |
+ |
160 |
+ systemd_dounit "${FILESDIR}"/gkrellmd.service |
161 |
+ |
162 |
+ insinto /etc |
163 |
+ doins server/gkrellmd.conf |
164 |
+ |
165 |
+ einstalldocs |
166 |
+} |
167 |
+ |
168 |
+pkg_preinst() { |
169 |
+ enewgroup gkrellmd |
170 |
+ enewuser gkrellmd -1 -1 -1 gkrellmd |
171 |
+} |