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
e0587efc
Kaydet (Commit)
e0587efc
authored
Tem 20, 2020
tarafından
sulincix
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
api created
üst
f62b17a3
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
76 additions
and
5 deletions
+76
-5
00-loggers
api/00-loggers
+15
-0
autotools
api/autotools
+6
-0
mesontools
api/mesontools
+21
-0
debian
host/debian
+1
-1
default
host/default
+1
-1
inary
host/inary
+1
-1
autodistro
modules/autodistro
+13
-0
autohost
modules/autohost
+1
-0
autotarget
modules/autotarget
+3
-0
directories
modules/directories
+1
-1
packages
modules/packages
+1
-0
unibuild.sh
unibuild.sh
+12
-1
No files found.
api/00-loggers
0 → 100644
Dosyayı görüntüle @
e0587efc
#!/bin/bash
msg
(){
echo
-e
"
\0
33[32;1m
$*
\0
33[;0m"
}
warn
(){
echo
-e
"
\0
33[33;1m
$*
\0
33[;0m"
}
err
(){
echo
-e
"
\0
33[31;1m
$*
\0
33[;0m"
>
/dev/stderr
}
info
(){
echo
-e
"
\0
33[34;1m
$*
\0
33[;0m"
}
api/autotools
0 → 100644
Dosyayı görüntüle @
e0587efc
#!/bin/bash
autoconfigure
(){
./configure
--prefix
=
/usr
"
$@
"
make
-j
$(
nproc
)
}
api/mesontools
0 → 100644
Dosyayı görüntüle @
e0587efc
#!/bin/bash
unibuild-meson
(){
meson setup
\
--prefix
/usr
\
--libexecdir
lib
\
--sbindir
bin
\
--buildtype
plain
\
--auto-features
enabled
\
--wrap-mode
nodownload
\
-D
b_lto
=
true
\
-D
b_pie
=
true
\
"
$@
"
}
automeson
(){
mkdir
build
meson build
"
$@
"
cd
build
ninja
cd
..
}
host/debian
Dosyayı görüntüle @
e0587efc
...
...
@@ -6,7 +6,7 @@ _get_build_deps(){
cat
/var/lib/dpkg/status |
grep
"^Package:
$i
$"
&>/dev/null
||
needed
=
"
$needed
$i
"
done
if
[
"
$needed
"
!=
""
]
;
then
e
cho
"Missing:
$needed
"
e
rr
"Missing:
$needed
"
su
-c
"apt-get install
$needed
"
||
exit
1
fi
}
host/default
Dosyayı görüntüle @
e0587efc
...
...
@@ -6,7 +6,7 @@ _get_build_deps(){
[
-f
/info/
$i
]
||
needed
=
"
$needed
$i
"
done
if
[
"
$needed
"
!=
""
]
;
then
e
cho
"Missing:
$needed
"
e
rr
"Missing:
$needed
"
exit
1
fi
}
host/inary
Dosyayı görüntüle @
e0587efc
...
...
@@ -6,7 +6,7 @@ _get_build_deps(){
ls
/var/lib/inary/package/ |
grep
"^
$i
-[1-9]"
&>/dev/null
||
needed
=
"
$needed
$i
"
done
if
[
"
$needed
"
!=
""
]
;
then
e
cho
"Missing:
$needed
"
e
rr
"Missing:
$needed
"
su
-c
"inary it
$needed
"
||
exit
1
fi
}
modules/autodistro
0 → 100644
Dosyayı görüntüle @
e0587efc
#!/bin/bash
if
[
-f
"/etc/lsb-release"
]
;
then
export
DISTRO
=
$(
cat
/etc/lsb-release |
grep
"^DISTRIB_ID="
|
head
-n
1 |
sed
"s/.*=//g"
)
elif
[
-f
"/etc/os-release"
]
;
then
export
DISTRO
=
$(
cat
/etc/os-release |
grep
"^NAME="
|
head
-n
1 |
sed
"s/.*=//g"
)
elif
[
-d
/var/lib/dpkg/
]
;
then
export
DISTRO
=
"Debian"
elif
[
-d
/var/lib/inary
]
;
then
export
DISTRO
=
"Sulin"
else
export
DISTRO
=
"Unknown"
fi
info
"Distro=
$DISTRO
"
modules/autohost
Dosyayı görüntüle @
e0587efc
...
...
@@ -8,3 +8,4 @@ if [ "$HOST" == "" ] ; then
export
HOST
=
default
fi
fi
info
"Host=
$HOST
"
modules/autotarget
Dosyayı görüntüle @
e0587efc
...
...
@@ -4,6 +4,8 @@ if [ "$TARGET" == "" ] ; then
export
TARGET
=
debian
elif
[
-d
/var/lib/inary
]
;
then
export
TARGET
=
inary
else
export
TARGET
=
default
fi
fi
set
+e
...
...
@@ -20,3 +22,4 @@ elif [ "$TARGET" == "inary" ] ; then
fi
fi
set
-e
info
"Target=
$TARGET
"
modules/directories
Dosyayı görüntüle @
e0587efc
...
...
@@ -4,5 +4,5 @@ export BUILDDIR=$(mktemp -d)
export
WORKDIR
=
$BUILDDIR
/work
export
INSTALLDIR
=
$BUILDDIR
/install
export
PKGDIR
=
$BUILDDIR
/package
[
"
$TARGET
"
==
""
]
&&
export
TARGET
=
"default"
mkdir
-p
$WORKDIR
$PKGDIR
$INSTALLDIR
info
"Build Directory=
$BUILDDIR
"
modules/packages
Dosyayı görüntüle @
e0587efc
...
...
@@ -2,6 +2,7 @@
export
name
=
"unnamed"
export
version
=
"1.0"
export
release
=
"1"
export arch
=
"
$(
uname
-m
)
"
export
homepage
=
"https://example.github.io"
export
url
=
"https://gitlab.com/example"
export date
=
"01.01.1970"
...
...
unibuild.sh
Dosyayı görüntüle @
e0587efc
#!/bin/bash
[
"
$MODDIR
"
==
""
]
&&
export
MODDIR
=
/usr/lib/unibuild/modules
set
-e
for
api
in
$(
ls
$MODDIR
/../api |
sort
)
;
do
source
$MODDIR
/../api/
$api
done
for
mod
in
$(
ls
$MODDIR
)
;
do
echo
"Loading:
$mod
"
source
$MODDIR
/
$mod
done
if
[
-f
"
$1
"
]
;
then
...
...
@@ -15,17 +17,26 @@ else
fi
source
$MODDIR
/../target/
$TARGET
source
$MODDIR
/../host/
$HOST
msg
">>> Checking dependencies"
_get_build_deps
cd
$BUILDDIR
msg
">>> Getting sources"
_fetch
cd
$WORKDIR
msg
">>> Running setup function"
_setup
cd
$WORKDIR
msg
">>> Running build function"
_build
cd
$WORKDIR
msg
">>> Running install function"
_install
cd
$WORKDIR
msg
">>> Generating metadata"
_create_metadata
cd
$WORKDIR
msg
">>> Creating package"
_package
msg
">>> Clearing workdir"
rm
-rf
$WORKDIR
info
">>> Done"
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