Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
U
unibuild
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
unibuild
Commits
8549bd67
Kaydet (Commit)
8549bd67
authored
Agu 10, 2020
tarafından
Your Name
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
build stats
üst
741c37d4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
17 deletions
+44
-17
general.rst
doc/development/general.rst
+2
-2
00-single-source
hooks/00-single-source
+0
-13
01-auto-buildtype
hooks/01-auto-buildtype
+14
-0
install.sh
install.sh
+1
-1
fetcher
modules/fetcher
+1
-1
unibuild.sh
unibuild.sh
+26
-0
No files found.
doc/development/general.rst
Dosyayı görüntüle @
8549bd67
MODDIR
=====
Include order : *api -> modules -> unibuild file -> host -> target -> hooks*
Include order : *api -> modules -> unibuild file -> host -> target -> hooks*
All imports are alphabeticaly.
Moddir
included
unibuild **modules**, **api**, **hooks**, **target** and **host** directories.
Moddir
contains
unibuild **modules**, **api**, **hooks**, **target** and **host** directories.
Modules
...
...
hooks/00-single-source
Dosyayı görüntüle @
8549bd67
...
...
@@ -3,16 +3,3 @@ if [ "$(ls -F $WORKDIR | grep \/$ | wc -l)" == "1" ] ; then
export
WORKDIR
=
"
$WORKDIR
/
$(
ls
-F
$WORKDIR
|
grep
\/
$)
"
fi
info "
Single
source
detected: new workdir
=>
$WORKDIR
"
if fn_exists "
_setup
" || fn_exists "
_build
" || fn_exists "
_install
" ; then
info "
Auto build
type
detection disabled.
"
elif [ "
$BuildType
" != "" ] ; then
info "
Build Type found.
"
elif [ -f "
$WORKDIR
/meson.build
" ] ; then
BuildType="
meson
"
elif [ -f "
$WORKDIR
/CMakeLists.txt
" ] ; then
BuildType="
cmake
"
elif [ -f "
$WORKDIR
/setup.py
" ] ; then
BuildType="
python
"
elif [ -f "
$WORKDIR
/configure
" ] ; then
BuildType="
autotools
"
fi
hooks/01-auto-buildtype
0 → 100644
Dosyayı görüntüle @
8549bd67
#!/bin/bash
if
fn_exists
"_setup"
||
fn_exists
"_build"
||
fn_exists
"_install"
;
then
info
"Auto build type detection disabled."
elif
[
"
$BuildType
"
!=
""
]
;
then
info
"Build Type found."
elif
[
-f
"
$WORKDIR
/meson.build"
]
;
then
BuildType
=
"meson"
elif
[
-f
"
$WORKDIR
/CMakeLists.txt"
]
;
then
BuildType
=
"cmake"
elif
[
-f
"
$WORKDIR
/setup.py"
]
;
then
BuildType
=
"python"
elif
[
-f
"
$WORKDIR
/configure"
]
;
then
BuildType
=
"autotools"
fi
install.sh
Dosyayı görüntüle @
8549bd67
...
...
@@ -4,4 +4,4 @@ mkdir -p $DESTDIR/usr/bin || true
[
-f
unibuild.sh
]
&&
cp
-prfv
*
$DESTDIR
/usr/lib/unibuild
rm
-f
$DESTDIR
/usr/lib/unibuild/build.sh
chmod
+x
-R
$DESTDIR
/usr/lib/unibuild/
*
ln
-s
$DESTDIR
/usr/lib/unibuild/unibuild.sh /usr/bin/unibuild
||
true
ln
-s
$DESTDIR
/usr/lib/unibuild/unibuild.sh /usr/bin/unibuild
2>/dev/null
||
true
modules/fetcher
Dosyayı görüntüle @
8549bd67
...
...
@@ -22,7 +22,7 @@ for src in ${source[@]} ; do
fi
elif
echo
"
$src
"
|
grep
"^git+"
&>/dev/null
;
then
srcloc
=
$(
echo
$src
|
sed
"s|^git+||g"
|
sed
"s/::.*//g"
)
branch
=
$(
echo
$src
|
sed
"s|^.*::||g"
)
echo
$src
|
grep
"::"
&>/dev/null
&&
branch
=
$(
echo
$src
|
sed
"s|^.*::||g"
)
echo
$srcloc
$srcname
$branch
info
"Clonning:
$srcloc
"
if
[
"
$branch
"
==
""
]
;
then
...
...
unibuild.sh
Dosyayı görüntüle @
8549bd67
#!/bin/bash
declare
-r
inittime
=
$(
date
+%s%3N
)
[
-f
$HOME
/.unibuildrc
]
&&
source
$HOME
/.unibuildrc
[
"
$MODDIR
"
==
""
]
&&
export
MODDIR
=
/usr/lib/unibuild/modules
set
-e
...
...
@@ -19,11 +20,18 @@ fi
source
$MODDIR
/../target/
$TARGET
source
$MODDIR
/../host/
$HOST
declare
-r
begintime
=
$(
date
+%s%3N
)
msg
">>> Checking dependencies"
_get_build_deps
declare
-r
checktime
=
$(
date
+%s%3N
)
cd
$BUILDDIR
msg
">>> Getting sources"
_fetch
declare
-r
fetchtime
=
$(
date
+%s%3N
)
msg
">>> Running hooks"
for
hook
in
$(
ls
$MODDIR
/../hooks |
sort
)
;
do
source
$MODDIR
/../hooks/
$hook
...
...
@@ -33,16 +41,22 @@ if fn_exists "_setup" ; then
msg
">>> Running setup function"
_setup
fi
declare
-r
setuptime
=
$(
date
+%s%3N
)
if
fn_exists
"_build"
;
then
cd
$WORKDIR
msg
">>> Running build function"
_build
fi
declare
-r
buildtime
=
$(
date
+%s%3N
)
if
fn_exists
"_install"
;
then
cd
$WORKDIR
msg
">>> Running install function"
_install
fi
declare
-r
installtime
=
$(
date
+%s%3N
)
cd
$WORKDIR
msg
">>> Generating metadata"
_create_metadata
...
...
@@ -50,5 +64,17 @@ cd $WORKDIR
msg
">>> Creating package"
_package
msg
">>> Clearing workdir"
declare
-r
packagetime
=
$(
date
+%s%3N
)
rm
-rf
$WORKDIR
info
">>> Done"
msg
"Unibuild stats (milisec):"
info
" Unibuild init:
$((
$begintime
-
$inittime
))
"
info
" Package Checking:
$((
$checktime
-
$begintime
))
"
info
" Source fetching:
$((
$fetchtime
-
$checktime
))
"
info
" Setup functions:
$((
$setuptime
-
$fetchtime
))
"
info
" Source Building:
$((
$buildtime
-
$setuptime
))
"
info
" Source installing:
$((
$installtime
-
$buildtime
))
"
info
" Package generating:
$((
$packagetime
-
$installtime
))
"
info
" Total time:
$((
$packagetime
-
$inittime
))
"
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