sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / sys-apps / hwinfo / hwinfo-21.23.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit multilib rpm toolchain-funcs
7
8 DESCRIPTION="Hardware detection tool used in SuSE Linux"
9 HOMEPAGE="https://www.opensuse.org/"
10 SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.2.src.rpm"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux"
15 IUSE=""
16
17 RDEPEND="
18         amd64? ( dev-libs/libx86emu )
19         x86? ( dev-libs/libx86emu )"
20 DEPEND="${RDEPEND}
21         sys-devel/flex
22         >=sys-kernel/linux-headers-2.6.17"
23
24 MAKEOPTS="${MAKEOPTS} -j1"
25
26 src_prepare() {
27         # Respect AR variable.
28         sed -i \
29                 -e 's:ar r:$(AR) r:' \
30                 src/{,isdn,ids,smp,hd}/Makefile || die
31
32         # Respect LDFLAGS.
33         sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
34
35         # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
36         sed -i \
37                 -e 's:make:$(MAKE):' \
38                 -e 's:-pipe -g::' \
39                 -e 's:LDFLAGS.*=:LDFLAGS +=:' \
40                 Makefile{,.common} || die
41         default
42 }
43
44 src_compile() {
45         tc-export AR
46         emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
47 }
48
49 src_install() {
50         emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
51
52         dodoc changelog README*
53         doman doc/*.{1,8}
54         insinto /usr/share/doc/${PF}/examples
55         doins doc/example*.c
56 }