2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 23:00:06 -07:00

puke: Don't overwrite /etc/

This commit is contained in:
Dylan Araps 2019-05-10 18:16:22 +03:00
parent 54f88c33e2
commit 626ac4d455
3 changed files with 2830 additions and 7 deletions

19
puke
View File

@ -24,10 +24,11 @@ pkg_info() {
cd "./repo/$1" || die "Package '$1' not in repository."
[ -f version ] || die "Version file not found."
[ -f sources ] || die "Sources file not found."
[ -f build ] || die "Build file not found."
read -r version release < version
name=$1
pkg=$name-$version-$release
pkg=$name\#$version-$release
}
pkg_depends() {
@ -147,14 +148,16 @@ pkg_tar() {
}
pkg_install() {
tar pxvf "$bin_dir/$pkg.tar.gz" -C "$sys_dir/" ||
pkg_remove "$name"
tar pxvf "$bin_dir/$pkg.tar.gz" -k -C "$sys_dir/" ||
die "Failed to install $pkg"
log "Installed $pkg"
}
pkg_remove() {
pkg_list "$name" || die "Package '$name' not installed"
pkg_list "$name" || return 1
while read -r file; do
[ "${file%/*}" = "/etc" ] && continue
@ -163,13 +166,14 @@ pkg_remove() {
if [ -d "$path" ]; then
rmdir "$path" 2>/dev/null
elif [ -e "$path" ]; then
else
rm -- "$path" || log "Failed to remove $file."
fi
[ "$?" = 0 ] && log "Removed $file"
done < manifest
done < "$sys_dir/var/db/puke/$name/manifest"
return 0
}
pkg_list() {
@ -178,6 +182,7 @@ pkg_list() {
}
for pkg in "$sys_dir/var/db/puke/"*; do
[ -f "$pkg" ] || continue
read -r version release < "$pkg/version"
log "${pkg##*/} $version-$release"
done
@ -213,7 +218,7 @@ args() {
i*) pkg_install ;;
l*) pkg_list "$2" ;;
r*) pkg_remove ;;
r*) pkg_remove || die "Package '$name' not installed" ;;
*) log "$0 [build|checksum|install|list|remove] [pkg]" ;;
esac

35
repo/perl/build Executable file
View File

@ -0,0 +1,35 @@
BUILD_ZLIB=0
BUILD_BZIP2=0
./Configure \
-des \
-Dcccdlflags='-fPIC' \
-Dcccdlflags='-fPIC' \
-Dccdlflags='-rdynamic' \
-Dprefix=/usr \
-Dprivlib=/usr/share/perl5/core_perl \
-Darchlib=/usr/lib/perl5/core_perl \
-Dvendorprefix=/usr \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/vendor_perl \
-Dsiteprefix=/usr/local \
-Dsitelib=/usr/local/share/perl5/site_perl \
-Dsitearch=/usr/local/lib/perl5/site_perl \
-Dlocincpth=' ' \
-Doptimize="$CFLAGS" \
-Duselargefiles \
-Dusethreads \
-Duseshrplib \
-Dd_semctl_semun \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dinstallman1dir=/usr/share/man/man1 \
-Dinstallman3dir=/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dcf_by='KISS' \
-Ud_csh \
-Dusenm
make
make DESTDIR="$pkg_dir" install

2783
repo/perl/manifest Normal file

File diff suppressed because it is too large Load Diff