Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 108157
Collapse All | Expand All

(-)/usr/portage/eclass/rox.eclass (-18 / +24 lines)
Lines 6-39 Link Here
6
6
7
# This eclass was created by Sergey Kuleshov (svyatogor@gentoo.org) and
7
# This eclass was created by Sergey Kuleshov (svyatogor@gentoo.org) and
8
# Alexander Simonov (devil@gentoo.org.ua) to ease installation of ROX desktop
8
# Alexander Simonov (devil@gentoo.org.ua) to ease installation of ROX desktop
9
# applications.
9
# applications. Enhancements and python additions by Peter Hyman.
10
10
11
# APPNAME - the actual name of the application as the app folder is named
11
# APPNAME - the actual name of the application as the app folder is named
12
# ROX_VER - the minimum version of rox filer required. Default is 2.1.0
12
# ROX_VER - the minimum version of rox filer required. Default is 2.1.0
13
# ROX_LIB_VER - version of rox-lib required if any
13
# ROX_LIB_VER - version of rox-lib required if any
14
# ROX_CLIB_VER - version of rox-clib required if any
14
# ROX_CLIB_VER - version of rox-clib required if any
15
# SET_PERM - specifies if permisions for arch specific files need to  be set
15
# SET_PERM - specifies if permisions for arch specific files need to  be set
16
# note: user no longer has to set SET_PERM in ebuild files since the eclass
17
# will now detect when it has to chmod on-the-fly
16
18
17
# For examples refer to ebuilds in rox-extra/
19
# For examples refer to ebuilds in rox-extra/
18
20
19
# need python to byte compile modules, if any
21
# need python to byte compile modules, if any
20
inherit python
22
inherit python
21
23
22
if [ -z "$ROX_VER" ]; then
24
if [ -z "${ROX_VER}" ]; then
23
	ROX_VER="2.1.0"
25
	ROX_VER="2.1.0"
24
fi
26
fi
25
27
26
DEPEND="${DEPEND}
28
DEPEND="${DEPEND}
27
		>=rox-base/rox-$ROX_VER"
29
		>=rox-base/rox-${ROX_VER}"
28
30
29
if [ -n "$ROX_LIB_VER" ]; then
31
if [ -n "${ROX_LIB_VER}" ]; then
30
	DEPEND="${DEPEND}
32
	DEPEND="${DEPEND}
31
			  >=rox-base/rox-lib-$ROX_LIB_VER"
33
			  >=rox-base/rox-lib-${ROX_LIB_VER}"
32
fi
34
fi
33
35
34
if [ -n "$ROX_CLIB_VER" ]; then
36
if [ -n "${ROX_CLIB_VER}" ]; then
35
	DEPEND="${DEPEND}
37
	DEPEND="${DEPEND}
36
			  >=rox-base/rox-clib-$ROX_CLIB_VER"
38
			  >=rox-base/rox-clib-${ROX_CLIB_VER}"
37
fi
39
fi
38
40
39
41
Lines 44-63 Link Here
44
	if [ -d "src/" ]; then
46
	if [ -d "src/" ]; then
45
		./AppRun --compile || die "Failed to compile the package"
47
		./AppRun --compile || die "Failed to compile the package"
46
		rm -rf src
48
		rm -rf src
49
		# set permissions flag here!
50
		SET_PERM=true
47
	fi
51
	fi
48
}
52
}
49
53
50
rox_src_install() {
54
rox_src_install() {
51
	if [ -d "$APPNAME/Help/" ]; then
55
	if [ -d "${APPNAME}/Help/" ]; then
52
		for i in $APPNAME/Help/*; do
56
		for i in ${APPNAME}/Help/*; do
53
			dodoc "$i"
57
			dodoc "${i}"
54
		done
58
		done
55
	fi
59
	fi
56
	insinto /usr/lib/rox
60
	insinto /usr/lib/rox
57
	doins -r ${APPNAME}
61
	doins -r ${APPNAME}
62
	
58
	#set correct permissions on files, in case they are wrong
63
	#set correct permissions on files, in case they are wrong
59
	#include all subdirectories in search, just in case
64
	#include all subdirectories in search, just in case
60
	find ${D}/usr/lib/rox/${APPNAME} -name 'AppRun' | xargs chmod 755 	>/dev/null 2>&1
65
	find ${D}/usr/lib/rox/${APPNAME} -name 'AppRun' | xargs chmod 755 >/dev/null 2>&1
61
	find ${D}/usr/lib/rox/${APPNAME} -name 'AppletRun' | xargs chmod 755 >/dev/null 2>&1
66
	find ${D}/usr/lib/rox/${APPNAME} -name 'AppletRun' | xargs chmod 755 >/dev/null 2>&1
62
67
63
	# set permissions for programs where we have libdir script
68
	# set permissions for programs where we have libdir script
Lines 76-87 Link Here
76
	fi
81
	fi
77
82
78
	# set permissions on all binares files for compiled programs per arch
83
	# set permissions on all binares files for compiled programs per arch
79
	if [ -n "$SET_PERM" ]; then
84
	if [ -n "${SET_PERM}" ]; then
80
	    ARCH="`uname -m`"
85
	    ARCH="`uname -m`"
81
	    case $ARCH in
86
	    case ${ARCH} in
82
		i?86) ARCH=ix86 ;;
87
		i?86) ARCH=ix86 ;;
83
	    esac
88
	    esac
84
	    PLATFORM="`uname -s`-$ARCH"
89
	    PLATFORM="`uname -s`-${ARCH}"
85
	    chmod -R 755 ${D}/usr/lib/rox/${APPNAME}/${PLATFORM}
90
	    chmod -R 755 ${D}/usr/lib/rox/${APPNAME}/${PLATFORM}
86
	fi
91
	fi
87
92
Lines 98-107 Link Here
98
}
103
}
99
104
100
rox_pkg_postinst() {
105
rox_pkg_postinst() {
101
	einfo "$APPNAME has been installed into /usr/lib/rox"
106
	einfo "${APPNAME} has been installed into /usr/lib/rox"
102
	einfo "You can run it by enter $APPNAME in command line or"
107
	einfo "You can run it by typing ${APPNAME} at the command line."
103
	einfo "can run it by pointing Rox file manage to that location"
108
	einfo "Or, you can run it by pointing the ROX file manager to the"
104
	einfo "and click on new application"
109
	einfo "install location -- /usr/lib/rox/${APPNAME} -- and click"
110
	einfo "on ${APPNAME}'s icon, drag it to a panel, desktop, etc."
105
}
111
}
106
112
107
EXPORT_FUNCTIONS src_compile src_install pkg_postinst
113
EXPORT_FUNCTIONS src_compile src_install pkg_postinst

Return to bug 108157