Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-block/smp_utils/smp_utils-0.94.ebuild,v 1.1 2008/11/18 02:14:30 robbat2 Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-block/smp_utils/smp_utils-0.94.ebuild,v 1.1 2008/11/18 02:14:30 robbat2 Exp $ |
4 |
|
4 |
|
5 |
inherit eutils |
5 |
EAPI="2" |
|
|
6 |
|
7 |
inherit eutils toolchain-funcs |
6 |
|
8 |
|
7 |
DESCRIPTION="Utilities for SAS management protocol (SMP)" |
9 |
DESCRIPTION="Utilities for SAS management protocol (SMP)" |
8 |
HOMEPAGE="http://sg.danny.cz/sg/smp_utils.html" |
10 |
HOMEPAGE="http://sg.danny.cz/sg/smp_utils.html" |
Lines 16-43
Link Here
|
16 |
DEPEND="" |
18 |
DEPEND="" |
17 |
RDEPEND="" |
19 |
RDEPEND="" |
18 |
|
20 |
|
19 |
src_unpack() { |
21 |
src_prepare() { |
20 |
unpack ${A} |
|
|
21 |
cd "${S}" |
22 |
for i in Makefile */Makefile ; do |
23 |
sed -i \ |
22 |
sed -i \ |
24 |
-e "/^CFLAGS/s:-g -O2:${CFLAGS}:g" \ |
23 |
-e "/^CFLAGS /d" \ |
|
|
24 |
-e "/^LDFLAGS /d" \ |
25 |
-e 's/$(LDFLAGS)/$(CFLAGS) &/' \ |
26 |
-e '/^\.c\.o:/,+1d' \ |
27 |
-e '/^libsmp\.a/d' \ |
28 |
-e 's/^\tar r libsmp\.a/libsmp.a:/' \ |
29 |
-e 's/sub_mpt sub_sas_tpl sub_sgv4//' \ |
30 |
-e '/^\(sub_mpt\|sub_sas_tpl\|sub_sgv4\):$/,+1d' \ |
31 |
-e '$aCPPFLAGS+=$(INCLUDES) $(EXTRA_FLAGS)\nlibsmp.a:\n\t$(AR) $(ARFLAGS) $@ $?\nmpt/smp_mptctl_io.o sas_tpl/smp_portal_intf.o sgv4/smp_sgv4_io.o:\n\t$(MAKE) -C $(dir $@)' \ |
25 |
-e '/^PREFIX=/s:/local::' \ |
32 |
-e '/^PREFIX=/s:/local::' \ |
26 |
-e '/^INSTDIR=/s:/bin:/sbin:' \ |
33 |
-e '/^INSTDIR=/s:/bin:/sbin:' \ |
27 |
-e 's:$(DESTDIR)/:$(DESTDIR):' \ |
34 |
-e 's:$(DESTDIR)/:$(DESTDIR):' \ |
28 |
-e "/^LIBDIR=/s:/lib$:/$(get_libdir):" \ |
35 |
-e "/^LIBDIR=/s:/lib$:/$(get_libdir):" \ |
29 |
-e '/^MANDIR=/s:)/man:)/share/man:' \ |
36 |
-e '/^MANDIR=/s:)/man:)/share/man:' \ |
30 |
-e 's:install -s :install :' \ |
37 |
-e 's:install -s :install :' \ |
31 |
$i || die "sed of $i failed" |
38 |
Makefile */Makefile || die |
32 |
done |
|
|
33 |
} |
39 |
} |
34 |
|
40 |
|
35 |
src_compile() { |
41 |
src_compile() { |
36 |
emake || die "emake failed" |
42 |
emake CC="$(tc-getCC)" AR="$(tc-getAR)" || die "emake failed" |
37 |
} |
43 |
} |
38 |
|
44 |
|
39 |
src_install() { |
45 |
src_install() { |
40 |
dodoc AUTHORS ChangeLog COVERAGE CREDITS README* TODO |
46 |
dodoc AUTHORS ChangeLog COVERAGE CREDITS README* TODO |
41 |
dohtml doc/*html |
47 |
dohtml doc/*html |
42 |
make install DESTDIR="${D}" || die "make install failed" |
48 |
emake install DESTDIR="${D}" || die "make install failed" |
43 |
} |
49 |
} |