mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-21 23:00:06 -07:00
puke: Build tarballs
This commit is contained in:
parent
21cbd5b156
commit
f9a38361f5
27
puke
27
puke
@ -16,7 +16,7 @@ clean() {
|
|||||||
rm -rf -- "$mak_dir" "$pkg_dir"
|
rm -rf -- "$mak_dir" "$pkg_dir"
|
||||||
|
|
||||||
[ -n "$name" ] &&
|
[ -n "$name" ] &&
|
||||||
rm "$old_pwd/repo/$name/.checksums"
|
rm "$old_pwd/repo/$name/.checksums" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_info() {
|
pkg_info() {
|
||||||
@ -41,12 +41,8 @@ pkg_sources() {
|
|||||||
while read -r src; do
|
while read -r src; do
|
||||||
src_name=${src##*/}
|
src_name=${src##*/}
|
||||||
|
|
||||||
if [ -f "$src" ]; then
|
if [ -f "$src" ] || [ -f "$src_dir/$src_name" ]; then
|
||||||
continue
|
log "Found local $src_name."
|
||||||
|
|
||||||
elif [ -f "$src_dir/$src_name" ]; then
|
|
||||||
log "Found cached $src_name."
|
|
||||||
continue
|
|
||||||
|
|
||||||
elif [ -z "${src##git:*}" ]; then
|
elif [ -z "${src##git:*}" ]; then
|
||||||
git clone "${src##git:}" "$mak_dir"
|
git clone "${src##git:}" "$mak_dir"
|
||||||
@ -89,6 +85,7 @@ pkg_verify() {
|
|||||||
"run '$0 checksum $name' to update checksums"
|
"run '$0 checksum $name' to update checksums"
|
||||||
|
|
||||||
log "Checksums verified."
|
log "Checksums verified."
|
||||||
|
rm .checksums
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_extract() {
|
pkg_extract() {
|
||||||
@ -123,8 +120,9 @@ pkg_build() {
|
|||||||
set -e
|
set -e
|
||||||
. "$OLDPWD/build"
|
. "$OLDPWD/build"
|
||||||
set +e
|
set +e
|
||||||
cd - >/dev/null
|
cd -
|
||||||
|
|
||||||
|
cp -R "$old_pwd/repo/$name" "$old_pwd/pkg/var/db/puke"
|
||||||
log "Sucessfully built $pkg."
|
log "Sucessfully built $pkg."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,6 +136,15 @@ pkg_manifest() {
|
|||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkg_tar() {
|
||||||
|
cd "$bin_dir"
|
||||||
|
|
||||||
|
tar pcvf "$pkg.tar.gz" -C "$pkg_dir" . ||
|
||||||
|
die "Failed to create package."
|
||||||
|
|
||||||
|
log "Package is at $bin_dir/$pkg.tar.gz."
|
||||||
|
}
|
||||||
|
|
||||||
args() {
|
args() {
|
||||||
pkg_info "$2"
|
pkg_info "$2"
|
||||||
|
|
||||||
@ -151,6 +158,7 @@ args() {
|
|||||||
pkg_extract
|
pkg_extract
|
||||||
pkg_build
|
pkg_build
|
||||||
pkg_manifest
|
pkg_manifest
|
||||||
|
pkg_tar
|
||||||
;;
|
;;
|
||||||
|
|
||||||
c*)
|
c*)
|
||||||
@ -166,7 +174,7 @@ main() {
|
|||||||
trap clean EXIT INT
|
trap clean EXIT INT
|
||||||
clean
|
clean
|
||||||
|
|
||||||
mkdir -p sources build pkg sys bin ||
|
mkdir -p sources build pkg/var/db/puke sys bin ||
|
||||||
die "Couldn't create directories at '$PWD'".
|
die "Couldn't create directories at '$PWD'".
|
||||||
|
|
||||||
old_pwd=$PWD
|
old_pwd=$PWD
|
||||||
@ -175,6 +183,7 @@ main() {
|
|||||||
pkg_dir=$PWD/pkg
|
pkg_dir=$PWD/pkg
|
||||||
sys_dir=$PWD/sys
|
sys_dir=$PWD/sys
|
||||||
bin_dir=$PWD/bin
|
bin_dir=$PWD/bin
|
||||||
|
db_dir=var/db/puke
|
||||||
|
|
||||||
args "$@"
|
args "$@"
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
/usr/bin/shutdown
|
/usr/bin/shutdown
|
||||||
/usr/bin/hummingbird
|
/usr/bin/hummingbird
|
||||||
/usr/bin/reboot
|
/usr/bin/reboot
|
||||||
|
/var/db/puke/hummingbird/sources
|
||||||
|
/var/db/puke/hummingbird/manifest
|
||||||
|
/var/db/puke/hummingbird/checksums
|
||||||
|
/var/db/puke/hummingbird/build
|
||||||
|
/var/db/puke/hummingbird/version
|
||||||
/etc/rc.shutdown
|
/etc/rc.shutdown
|
||||||
/etc/rc.init
|
/etc/rc.init
|
||||||
|
/var/db/puke/hummingbird
|
||||||
|
/var/db/puke
|
||||||
|
/var/db
|
||||||
|
/var
|
||||||
/usr/bin
|
/usr/bin
|
||||||
/usr
|
/usr
|
||||||
/etc
|
/etc
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
/usr/share/man/man3/zlib.3
|
/usr/share/man/man3/zlib.3
|
||||||
/usr/include/zconf.h
|
/usr/include/zconf.h
|
||||||
/usr/include/zlib.h
|
/usr/include/zlib.h
|
||||||
|
/var/db/puke/zlib/sources
|
||||||
|
/var/db/puke/zlib/manifest
|
||||||
|
/var/db/puke/zlib/checksums
|
||||||
|
/var/db/puke/zlib/build
|
||||||
|
/var/db/puke/zlib/version
|
||||||
/lib/libz.so.1.2.11
|
/lib/libz.so.1.2.11
|
||||||
/lib/libz.so.1
|
/lib/libz.so.1
|
||||||
/lib/libz.so
|
/lib/libz.so
|
||||||
/lib/libz.a
|
/lib/libz.a
|
||||||
/lib/pkgconfig/zlib.pc
|
/lib/pkgconfig/zlib.pc
|
||||||
|
/var/db/puke/zlib
|
||||||
|
/var/db/puke
|
||||||
|
/var/db
|
||||||
|
/var
|
||||||
/usr/share/man/man3
|
/usr/share/man/man3
|
||||||
/usr/share/man
|
/usr/share/man
|
||||||
/usr/share
|
/usr/share
|
||||||
|
Loading…
Reference in New Issue
Block a user