Lines 16-22
Link Here
|
16 |
virtual/linux-sources" |
16 |
virtual/linux-sources" |
17 |
SLOT="0" |
17 |
SLOT="0" |
18 |
LICENSE="GPL-2" |
18 |
LICENSE="GPL-2" |
19 |
KEYWORDS="~ppc ~x86 ~amd64" |
19 |
KEYWORDS="~ppc ~x86 ~amd64 ~ppc64" |
20 |
S="${WORKDIR}/${MY_P}" |
20 |
S="${WORKDIR}/${MY_P}" |
21 |
|
21 |
|
22 |
#Without this, the make kmod_install in src_install() would fail. |
22 |
#Without this, the make kmod_install in src_install() would fail. |
Lines 26-36
Link Here
|
26 |
linux-mod_pkg_setup |
26 |
linux-mod_pkg_setup |
27 |
|
27 |
|
28 |
if kernel_is 2 4; then |
28 |
if kernel_is 2 4; then |
29 |
BUILD_TARGETS="kmod24 all" |
29 |
BUILD_TARGETS="kmod24" |
30 |
ECONF_PARAMS="--with-kernel24=${KV_DIR}" |
30 |
ECONF_PARAMS="--with-kernel24=${KV_DIR}" |
31 |
MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.4)" |
31 |
MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.4)" |
32 |
else |
32 |
else |
33 |
BUILD_TARGETS="kmod all" |
33 |
BUILD_TARGETS="kmod" |
34 |
ECONF_PARAMS="--with-kernel=${KV_DIR} --enable-verbose-build" |
34 |
ECONF_PARAMS="--with-kernel=${KV_DIR} --enable-verbose-build" |
35 |
MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.6)" |
35 |
MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.6)" |
36 |
fi |
36 |
fi |
Lines 49-57
Link Here
|
49 |
epatch "${FILESDIR}"/${PV}-link-librt-properly.patch |
49 |
epatch "${FILESDIR}"/${PV}-link-librt-properly.patch |
50 |
epatch "${FILESDIR}"/${PV}-soname.patch |
50 |
epatch "${FILESDIR}"/${PV}-soname.patch |
51 |
epatch "${FILESDIR}"/${PV}-as-needed.patch |
51 |
epatch "${FILESDIR}"/${PV}-as-needed.patch |
52 |
if kernel_is gt 2 6 20 ; then |
52 |
|
53 |
epatch "${FILESDIR}"/${PV}-register_sysctl_table.patch |
53 |
# Fix so we can install kernapps separate from kmod_install |
54 |
fi |
54 |
sed -i '/^kmod_install: kmod/{ |
|
|
55 |
s/\(kmod_install:.*kernapps\)\(.*\)/\1_install\2\n.PHONY: kernapps_install\nkernapps_install: kernapps/}' Makefile.in |
56 |
sed -i '/^kmod24_install: kmod/{ |
57 |
s/\(kmod24_install:.*kernapps\)\(.*\)/\1_install\2\n.PHONY: kernapps_install\nkernapps_install: kernapps/}' Makefile.in |
58 |
|
59 |
if kernel_is gt 2 6 20 ; then |
60 |
epatch "${FILESDIR}"/${PV}-register_sysctl_table.patch |
61 |
fi |
55 |
|
62 |
|
56 |
#This is needed when gcc doesn't support -Wno-pointer-sign. Now it will give us some warnings so it also removes -Werror. |
63 |
#This is needed when gcc doesn't support -Wno-pointer-sign. Now it will give us some warnings so it also removes -Werror. |
57 |
#It's unsafe, not recommended |
64 |
#It's unsafe, not recommended |
Lines 68-88
Link Here
|
68 |
} |
75 |
} |
69 |
|
76 |
|
70 |
src_compile() { |
77 |
src_compile() { |
71 |
econf ${ECONF_PARAMS} || die "Unable to run econf ${ECONF_PARAMS}" |
78 |
econf ${ECONF_PARAMS} || die "Unable to run econf ${ECONF_PARAMS}" |
72 |
emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" ${LDFLAGS} ${BUILD_TARGETS} \ |
79 |
linux-mod_src_compile || die "Unable to linux-mod_src_compile" |
73 |
|| die "Unable to make ${BUILD_TARGETS}." |
80 |
emake all || die "Unable to make ${BUILD_TARGETS}." |
74 |
} |
81 |
} |
75 |
|
82 |
|
76 |
src_install() { |
83 |
src_install() { |
77 |
#We don't use linux-mod_src_install because kmod_install also installs some other important files |
84 |
linux-mod_src_install || die "linux-mod_src_install failed" |
78 |
if kernel_is 2 4; then |
85 |
emake DESTDIR="${D}" kernapps_install || die "kernapps_install failed" |
79 |
emake DESTDIR="${D}" kmod24_install || die "install failed" |
|
|
80 |
else |
81 |
emake DESTDIR="${D}" kmod_install || die "install failed" |
82 |
fi |
83 |
emake DESTDIR="${D}" install || die "install failed" |
86 |
emake DESTDIR="${D}" install || die "install failed" |
84 |
newinitd "${FILESDIR}"/pvfs2-server.rc pvfs2-server |
87 |
newinitd "${FILESDIR}"/pvfs2-server.rc pvfs2-server |
85 |
newconfd "${FILESDIR}"/pvfs2-server.conf pvfs2-server |
88 |
newconfd "${FILESDIR}"/pvfs2-server.conf pvfs2-server |
86 |
dodoc AUTHORS CREDITS ChangeLog INSTALL README |
89 |
dodoc AUTHORS CREDITS ChangeLog INSTALL README |
87 |
docinto examples |
90 |
docinto examples |
88 |
dodoc examples/{fs.conf,pvfs2-server.rc,server.conf-localhost} |
91 |
dodoc examples/{fs.conf,pvfs2-server.rc,server.conf-localhost} |
Lines 100-107
Link Here
|
100 |
|
103 |
|
101 |
pkg_postinst() { |
104 |
pkg_postinst() { |
102 |
linux-mod_pkg_postinst |
105 |
linux-mod_pkg_postinst |
103 |
elog "To enable PVFS2 Server on boot you will have to add it to the" |
106 |
elog "To enable PVFS2 Server on boot you will have to add it to the" |
104 |
elog "default profile, issue the following command as root to do so." |
107 |
elog "default profile, issue the following command as root to do so." |
105 |
elog |
108 |
elog |
106 |
elog "rc-update add pvfs2-server default" |
109 |
elog "rc-update add pvfs2-server default" |
107 |
} |
110 |
} |