Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
aa21e88f
Commit
aa21e88f
authored
Mar 04, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-install: add support for direct install ebuild
parent
bf78b9f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
epm-install
bin/epm-install
+69
-0
No files found.
bin/epm-install
View file @
aa21e88f
...
...
@@ -41,6 +41,72 @@ filter_out_installed_packages()
esac
|
sed
-e
"s|rpm-build-altlinux-compat[^ ]*||g"
| filter_strip_spaces
}
# http://ru.gentoo-wiki.com/wiki/Portage_Overlay
# http://kb.etersoft.ru/Gentoo:_Установка_продуктов_Etersoft
# http://linuxreviews.org/gentoo/ebuilds/
#
# install one ebuild
__emerge_install_ebuild
()
{
local
EBUILD
=
"
$1
"
[
-s
"
$EBUILD
"
]
||
fatal
".ebuild file '
$EBUILD
' is missing"
# load ebuild and get vars
.
$EBUILD
[
-n
"
$SRC_URI
"
]
||
fatal
"Can't load SRC_URI from
$EBUILD
"
# try to detect tarballs
local
TARBALLS
=
local
BASEDIR
=
$(
dirname
$EBUILD
)
for
i
in
$SRC_URI
;
do
[
-s
"
$BASEDIR
/
$(
basename
$i
)
"
]
||
continue
TARBALLS
=
"
$TARBALLS
$BASEDIR
/
$(
basename
$i
)
"
done
local
PORTAGENAME
=
epm
local
LP
=
/usr/local/portage/
$PORTAGENAME
sudocmd
mkdir
-p
$LP
/
if
!
grep
-v
"^#"
/etc/make.conf |
grep
-q
$LP
;
then
sudocmd
echo
'PORTDIR_OVERLAY="$LP \${PORTDIR_OVERLAY}"'
>>
/etc/make.conf
# Overlay name
sudocmd
mkdir
-p
$LP
/profiles/
sudocmd
echo
"
$PORTAGENAME
"
>
$LP
/profiles/repo_name
fi
# copy tarballs
local
DDIR
=
/usr/portage/distfiles
[
-d
/var/calculate/remote/distfiles
]
&&
DDIR
=
/var/calculate/remote/distfiles
sudocmd
cp
-f
$TARBALLS
$DDIR
/
||
return
# copy ebuild
sudocmd
cp
-f
$EBUILD
$LP
/
||
return
cd
$LP
sudocmd ebuild
$(
basename
$EBUILD
)
digest
cd
-
# FIXME: more correcty get name
local
PKGNAME
=
$(
echo
$EBUILD
|
sed
-e
"s|-[0-9].*||g"
)
sudocmd emerge
-av
$PKGNAME
||
return
}
# install ebuild list
__emerge_install
()
{
local
EBUILD
=
#local TARBALLS=
local
i
# search ebuild in the args
for
i
in
$*
;
do
if
echo
$i
|
grep
-q
ebuild
;
then
[
-s
"
$EBUILD
"
]
||
fatal
"Can't find .ebuild file in
$*
"
__emerge_install_ebuild
$i
continue
# else
# TARBALLS="$TARBALLS $i"
fi
done
}
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
epm_install_names
()
...
...
@@ -227,6 +293,9 @@ epm_install_files()
pkgsrc
)
sudocmd pkg_add
$@
return
;;
emerge
)
__emerge_install
$@
return
;;
pacman
)
sudocmd pacman
-U
--noconfirm
$force
$nodeps
$@
&&
return
[
-n
"
$nodeps
"
]
&&
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment