1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00

cleanup: remove deploy directory argument from package command

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-06 10:03:12 +01:00
parent b3529c8deb
commit 8fa44569d8
84 changed files with 332 additions and 543 deletions

View file

@ -17,11 +17,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -17,14 +17,11 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" ln -sv bash "$PKGDEPLOYDIR/bin/sh"
make DESTDIR="$DEPLOY" install cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGDEPLOYDIR"
ln -sv bash "$DEPLOY/bin/sh" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$DEPLOY"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -24,12 +24,9 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" mkdir -p "$PKGDEPLOYDIR/bin"
local DEPLOY="$2" cp "$PKGBUILDDIR/busybox" "$PKGDEPLOYDIR/bin"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
mkdir -p "$DEPLOY/bin"
cp "$PKGBUILDDIR/busybox" "$DEPLOY/bin"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -8,14 +8,12 @@ build() {
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
cp -r ${SOURCE}/boot/* "$DEPLOY/" cp -r ${SOURCE}/boot/* "$PKGDEPLOYDIR/"
rm $DEPLOY/kernel7.img rm "$PKGDEPLOYDIR/kernel7.img" "$PKGDEPLOYDIR/kernel.img"
rm $DEPLOY/kernel.img rm "$PKGDEPLOYDIR/COPYING.linux"
rm $DEPLOY/COPYING.linux
cp "$SCRIPTDIR/pkg/boot-rpi3/config.txt" "$DEPLOY/config.txt" cp "$SCRIPTDIR/pkg/boot-rpi3/config.txt" "$PKGDEPLOYDIR/config.txt"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }

View file

@ -20,11 +20,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -27,18 +27,15 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make PREFIX="$PKGDEPLOYDIR" install
local DEPLOY="$2"
make PREFIX="$DEPLOY" install rm ${PKGDEPLOYDIR}/bin/{bzegrep,bzfgrep,bzless,bzcmp}
rm ${DEPLOY}/bin/{bzegrep,bzfgrep,bzless,bzcmp} ln -s "/bin/bzgrep" "$PKGDEPLOYDIR/bin/bzegrep"
ln -s "/bin/bzgrep" "$PKGDEPLOYDIR/bin/bzfgrep"
ln -s "/bin/bzgrep" "$DEPLOY/bin/bzegrep" ln -s "/bin/bzmore" "$PKGDEPLOYDIR/bin/bzless"
ln -s "/bin/bzgrep" "$DEPLOY/bin/bzfgrep" ln -s "/bin/bzdiff" "$PKGDEPLOYDIR/bin/bzcmp"
ln -s "/bin/bzmore" "$DEPLOY/bin/bzless" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
ln -s "/bin/bzdiff" "$DEPLOY/bin/bzcmp"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">coreutils-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">coreutils-[0-9.]*tar.xz<" | \
sed 's/>coreutils-//g' | sed 's/.tar.xz<//g' | \ sed 's/>coreutils-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -11,7 +11,6 @@ prepare() {
build() { build() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
cp -r $SOURCE/* $PKGBUILDDIR cp -r $SOURCE/* $PKGBUILDDIR
@ -20,18 +19,15 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2"
make DESTDIR="$DEPLOY" install chmod 755 $PKGDEPLOYDIR/bin/*
cat_file_override "dhcpcd.conf" > "$PKGDEPLOYDIR/etc/dhcpcd.conf"
chmod 755 $DEPLOY/bin/* cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cat_file_override "dhcpcd.conf" > "$DEPLOY/etc/dhcpcd.conf"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">dhcpcd-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">dhcpcd-[0-9.]*tar.xz<" | \
sed 's/>dhcpcd-//g' | sed 's/.tar.xz<//g' | \ sed 's/>dhcpcd-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">diffutils-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">diffutils-[0-9.]*tar.xz<" | \
sed 's/>diffutils-//g' | sed 's/.tar.xz<//g' | \ sed 's/>diffutils-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -26,13 +26,11 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make CC=${TARGET}-gcc PREFIX="/" BINDIR="/bin" \
local DEPLOY="$2" DESTDIR="$PKGDEPLOYDIR" install
mkdir -p "$PKGDEPLOYDIR/etc"
make CC=${TARGET}-gcc PREFIX="/" BINDIR="/bin" DESTDIR="$DEPLOY" install cat_file_override "dnsmasq.conf" > "$PKGDEPLOYDIR/etc/dnsmasq.conf"
mkdir -p "$DEPLOY/etc" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cat_file_override "dnsmasq.conf" > "$DEPLOY/etc/dnsmasq.conf"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,11 +15,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o "ethtool-[0-9.]*tar.xz" | \ curl --silent -L "$URL" | grep -o "ethtool-[0-9.]*tar.xz" | \
sed 's/ethtool-//g' | sed 's/.tar.xz//g' | \ sed 's/ethtool-//g' | sed 's/.tar.xz//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,11 +16,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
@ -30,4 +27,4 @@ check_update() {
grep -o "expat-[0-9.]*tar.bz2" | \ grep -o "expat-[0-9.]*tar.bz2" | \
sed 's/expat-//g' | sed 's/.tar.bz2//g' | \ sed 's/expat-//g' | sed 's/.tar.bz2//g' | \
verson_find_greatest "$version" verson_find_greatest "$version"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent --list-only "$URL/" | grep -o "file-[0-9.]*tar.gz" | \ curl --silent --list-only "$URL/" | grep -o "file-[0-9.]*tar.gz" | \
sed 's/file-//g' | sed 's/.tar.gz//g' | \ sed 's/file-//g' | sed 's/.tar.gz//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">findutils-[0-9.]*tar.gz<" | \ curl --silent -L "$URL" | grep -o ">findutils-[0-9.]*tar.gz<" | \
sed 's/>findutils-//g' | sed 's/.tar.gz<//g' | \ sed 's/>findutils-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,18 +15,17 @@ build() {
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
cp -r "$SOURCE/hardfp/opt" "$DEPLOY" cp -r "$SOURCE/hardfp/opt" "$PKGDEPLOYDIR"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
strip_files ${DEPLOY}/opt/vc/{bin,sbin}/* strip_files ${PKGDEPLOYDIR}/opt/vc/{bin,sbin}/*
strip_files ${DEPLOY}/opt/vc/lib/*.so strip_files ${PKGDEPLOYDIR}/opt/vc/lib/*.so
strip_files ${DEPLOY}/opt/vc/lib/plugins/*.so strip_files ${PKGDEPLOYDIR}/opt/vc/lib/plugins/*.so
} }
check_update() { check_update() {
curl --silent -L https://github.com/raspberrypi/firmware/releases | \ curl --silent -L https://github.com/raspberrypi/firmware/releases | \
grep -o "[0-9.]\+tar.gz" | sed 's/.tar.gz//g' | \ grep -o "[0-9.]\+tar.gz" | sed 's/.tar.gz//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
make -C "$1" PREFIX="" DESTDIR="$2" install make -C "$1" PREFIX="" DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">gawk-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">gawk-[0-9.]*tar.xz<" | \
sed 's/>gawk-//g' | sed 's/.tar.xz<//g' | \ sed 's/>gawk-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,11 +15,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -16,12 +16,9 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
unfuck_libtool unfuck_libtool
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
@ -29,4 +26,4 @@ check_update() {
curl --silent -L "$URL" | grep -o ">gmp-[0-9.]*tar.bz2<" | \ curl --silent -L "$URL" | grep -o ">gmp-[0-9.]*tar.bz2<" | \
sed 's/>gmp-//g' | sed 's/.tar.bz2<//g' | \ sed 's/>gmp-//g' | sed 's/.tar.bz2<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">grep-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">grep-[0-9.]*tar.xz<" | \
sed 's/>grep-//g' | sed 's/.tar.xz<//g' | \ sed 's/>grep-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">gzip-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">gzip-[0-9.]*tar.xz<" | \
sed 's/>gzip-//g' | sed 's/.tar.xz<//g' | \ sed 's/>gzip-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -28,14 +28,11 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" mkdir -p "$PKGDEPLOYDIR/etc"
local DEPLOY="$2" cat_file_override "hostapd.conf" > "$PKGDEPLOYDIR/etc/hostapd.conf"
mkdir -p "$DEPLOY/etc" make -C hostapd BINDIR=/bin DESTDIR="$PKGDEPLOYDIR" install
cat_file_override "hostapd.conf" > "$DEPLOY/etc/hostapd.conf" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make -C hostapd BINDIR=/bin DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,14 +15,13 @@ build() {
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
mkdir -p "$DEPLOY/etc" mkdir -p "$PKGDEPLOYDIR/etc"
cp "$SOURCE/protocols" "$DEPLOY/etc" cp "$SOURCE/protocols" "$PKGDEPLOYDIR/etc"
cp "$SOURCE/services" "$DEPLOY/etc" cp "$SOURCE/services" "$PKGDEPLOYDIR/etc"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {
return return
} }

View file

@ -19,15 +19,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">inetutils-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">inetutils-[0-9.]*tar.xz<" | \
sed 's/>inetutils-//g' | sed 's/.tar.xz<//g' | \ sed 's/>inetutils-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -10,17 +10,15 @@ prepare() {
} }
build() { build() {
local SOURCE="$1"
local DEPLOY="$2"
local extra_flags="" local extra_flags=""
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
include_merge "INIT" include_merge "INIT"
if [ "x$HWCLOCK" != "xyes" ]; then if [ "x$HWCLOCK" != "xyes" ]; then
extra_flags="$extra_flags --enable-swclock" extra_flags="$extra_flags --enable-swclock"
cat <<_EOF >> "$DEPLOY/$PKGNAME.files" cat <<_EOF >> "$PKGDEPLOYDIR/$PKGNAME.files"
dir etc 0755 0 0 dir etc 0755 0 0
dir etc/crontab.d 0755 0 0 dir etc/crontab.d 0755 0 0
file etc/crontab.d/swclock 0644 0 0 file etc/crontab.d/swclock 0644 0 0
@ -37,14 +35,14 @@ _EOF
if [ ! -z "$DHCP_PORTS" ]; then if [ ! -z "$DHCP_PORTS" ]; then
extra_flags="$extra_flags --enable-dhcpclient" extra_flags="$extra_flags --enable-dhcpclient"
cat <<_EOF >> "$DEPLOY/$PKGNAME.files" cat <<_EOF >> "$PKGDEPLOYDIR/$PKGNAME.files"
slink etc/init.d/dhcpcdmaster 0777 0 0 /share/init/dhcpcdmaster slink etc/init.d/dhcpcdmaster 0777 0 0 /share/init/dhcpcdmaster
file share/init/dhcpcd 0644 0 0 file share/init/dhcpcd 0644 0 0
file share/init/dhcpcdmaster 0644 0 0 file share/init/dhcpcdmaster 0644 0 0
_EOF _EOF
if [ "x$HWCLOCK" != "xyes" ]; then if [ "x$HWCLOCK" != "xyes" ]; then
cat <<_EOF >> "$DEPLOY/$PKGNAME.files" cat <<_EOF >> "$PKGDEPLOYDIR/$PKGNAME.files"
dir lib/libexec/dhcpcd-hooks 0755 0 0 dir lib/libexec/dhcpcd-hooks 0755 0 0
file lib/libexec/dhcpcd-hooks/40-ntpsetdate 0644 0 0 file lib/libexec/dhcpcd-hooks/40-ntpsetdate 0644 0 0
_EOF _EOF
@ -57,67 +55,65 @@ _EOF
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local svc local svc
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
include_merge "INIT" include_merge "INIT"
if [ "x$HWCLOCK" == "xyes" ]; then if [ "x$HWCLOCK" == "xyes" ]; then
SERVICES="$SERVICES hwclock" SERVICES="$SERVICES hwclock"
else else
mkdir -p "$DEPLOY/var/lib" mkdir -p "$PKGDEPLOYDIR/var/lib"
date --utc +%m%d%H%M%Y.%S > "$DEPLOY/var/lib/swclock" date --utc +%m%d%H%M%Y.%S > "$PKGDEPLOYDIR/var/lib/swclock"
fi fi
svc=$(file_path_override "ifrename") svc=$(file_path_override "ifrename")
if [ ! -z "$svc" ]; then if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/netcfg/ifrename" cp "$svc" "$PKGDEPLOYDIR/etc/netcfg/ifrename"
SERVICES="$SERVICES ifrename" SERVICES="$SERVICES ifrename"
fi fi
svc=$(file_path_override "nftables.rules") svc=$(file_path_override "nftables.rules")
if [ ! -z "$svc" ]; then if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/nftables.rules" cp "$svc" "$PKGDEPLOYDIR/etc/nftables.rules"
echo "file etc/nftables.rules 0644 0 0" >> "$DEPLOY/$PKGNAME.files" echo "file etc/nftables.rules 0644 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
SERVICES="$SERVICES nft" SERVICES="$SERVICES nft"
fi fi
svc=$(file_path_override "sysctl.conf") svc=$(file_path_override "sysctl.conf")
if [ ! -z "$svc" ]; then if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/sysctl.conf" cp "$svc" "$PKGDEPLOYDIR/etc/sysctl.conf"
echo "file etc/sysctl.conf 0644 0 0" >> "$DEPLOY/$PKGNAME.files" echo "file etc/sysctl.conf 0644 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
fi fi
svc=$(file_path_override "interfaces") svc=$(file_path_override "interfaces")
if [ ! -z "$svc" ]; then if [ ! -z "$svc" ]; then
for svc in $svc/*; do for svc in $svc/*; do
[ -f "$svc" ] || continue [ -f "$svc" ] || continue
cp "$svc" "$DEPLOY/etc/netcfg/" cp "$svc" "$PKGDEPLOYDIR/etc/netcfg/"
svc=$(basename $svc) svc=$(basename $svc)
echo "file etc/netcfg/$svc 0644 0 0" >> "$DEPLOY/$PKGNAME.files" echo "file etc/netcfg/$svc 0644 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
done done
fi fi
for svc in $GETTY_TTY; do for svc in $GETTY_TTY; do
echo "slink etc/init.d/agetty@$svc 0777 0 0 /share/init/agetty" >> "$DEPLOY/$PKGNAME.files" echo "slink etc/init.d/agetty@$svc 0777 0 0 /share/init/agetty" >> "$PKGDEPLOYDIR/$PKGNAME.files"
done done
if [ ! -z "$DHCP_PORTS" ]; then if [ ! -z "$DHCP_PORTS" ]; then
for svc in $DHCP_PORTS; do for svc in $DHCP_PORTS; do
echo "slink etc/init.d/dhcpcd@$svc 0777 0 0 /share/init/dhcpcd" >> "$DEPLOY/$PKGNAME.files" echo "slink etc/init.d/dhcpcd@$svc 0777 0 0 /share/init/dhcpcd" >> "$PKGDEPLOYDIR/$PKGNAME.files"
done done
fi fi
for svc in $SERVICES; do for svc in $SERVICES; do
echo "slink etc/init.d/$svc 0777 0 0 /share/init/$svc" >> "$DEPLOY/$PKGNAME.files" echo "slink etc/init.d/$svc 0777 0 0 /share/init/$svc" >> "$PKGDEPLOYDIR/$PKGNAME.files"
done done
touch "$DEPLOY/etc/modules" touch "$PKGDEPLOYDIR/etc/modules"
for svc in $MODULES; do for svc in $MODULES; do
echo "$svc" >> "$DEPLOY/etc/modules" echo "$svc" >> "$PKGDEPLOYDIR/etc/modules"
done done
unset -v i GETTY_TTY HWCLOCK DHCP_PORTS SERVICES MODULES unset -v i GETTY_TTY HWCLOCK DHCP_PORTS SERVICES MODULES

View file

@ -15,11 +15,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -1,25 +1,19 @@
DEPENDS="bbstatic" DEPENDS="bbstatic"
build() { build() {
local INPUT="$1"
local DEPLOY="$2"
mkdir -p ./{dev,lib,bin,sys,proc,newroot,images} mkdir -p ./{dev,lib,bin,sys,proc,newroot,images}
pkg install -omLD -r "$PKGBUILDDIR" -R "$REPODIR" $DEPENDS pkg install -omLD -r "$PKGBUILDDIR" -R "$REPODIR" $DEPENDS
} }
deploy() { deploy() {
local INPUT="$1" cp $SCRIPTDIR/pkg/initrd/*.{desc,files} "$PKGDEPLOYDIR"
local DEPLOY="$2"
cp $SCRIPTDIR/pkg/initrd/*.{desc,files} "$DEPLOY"
pkg install -R "$REPODIR" -r "$PKGBUILDDIR" -l -F pkg $DEPENDS \ pkg install -R "$REPODIR" -r "$PKGBUILDDIR" -l -F pkg $DEPENDS \
>> "$DEPLOY/initrd.files" >> "$PKGDEPLOYDIR/initrd.files"
echo "file init 0775 0 0 $SCRIPTDIR/pkg/$PKGNAME/initrd.skel" \ echo "file init 0775 0 0 $SCRIPTDIR/pkg/$PKGNAME/initrd.skel" \
>> "$DEPLOY/initrd.files" >> "$PKGDEPLOYDIR/initrd.files"
} }
check_update() { check_update() {

View file

@ -27,11 +27,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" SYSROOT="$TCDIR/$TARGET" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" SYSROOT="$TCDIR/$TARGET" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -24,18 +24,15 @@ build() {
LDFLAGS="$ldflags" \ LDFLAGS="$ldflags" \
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \ PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \
make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \ make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \
SBINDIR=/bin DESTDIR="$2" -j $NUMJOBS SBINDIR=/bin DESTDIR="$PKGDEPLOYDIR" -j $NUMJOBS
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
export PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" export PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET"
make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \ make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \
SBINDIR=/bin DESTDIR="$DEPLOY" install SBINDIR=/bin DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -17,15 +17,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">kbd-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">kbd-[0-9.]*tar.xz<" | \
sed 's/>kbd-//g' | sed 's/.tar.xz<//g' | \ sed 's/>kbd-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,15 +16,13 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local target local target
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
for target in depmod insmod lsmod modinfo modprobe rmmod; do for target in depmod insmod lsmod modinfo modprobe rmmod; do
ln -sf kmod $DEPLOY/bin/$target ln -sf kmod $PKGDEPLOYDIR/bin/$target
done done
} }
@ -32,4 +30,4 @@ check_update() {
curl --silent -L "$URL" | grep -o ">kmod-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">kmod-[0-9.]*tar.xz<" | \
sed 's/>kmod-//g' | sed 's/.tar.xz<//g' | \ sed 's/>kmod-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -18,11 +18,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">less-[0-9.]*tar.gz<" | \ curl --silent -L "$URL" | grep -o ">less-[0-9.]*tar.gz<" | \
sed 's/>less-//g' | sed 's/.tar.gz<//g' | \ sed 's/>less-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">libbsd-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">libbsd-[0-9.]*tar.xz<" | \
sed 's/>libbsd-//g' | sed 's/.tar.xz<//g' | \ sed 's/>libbsd-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">libmnl-[0-9.]*tar.bz2<" | \ curl --silent -L "$URL" | grep -o ">libmnl-[0-9.]*tar.bz2<" | \
sed 's/>libmnl-//g' | sed 's/.tar.bz2<//g' | \ sed 's/>libmnl-//g' | sed 's/.tar.bz2<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">libnftnl-[0-9.]*tar.bz2<" | \ curl --silent -L "$URL" | grep -o ">libnftnl-[0-9.]*tar.bz2<" | \
sed 's/>libnftnl-//g' | sed 's/.tar.bz2<//g' | \ sed 's/>libnftnl-//g' | sed 's/.tar.bz2<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,12 +16,9 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
unfuck_libtool unfuck_libtool
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -19,11 +19,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,14 +15,11 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2"
make DESTDIR="$DEPLOY" install
} }
check_update() { check_update() {
curl --silent -L https://github.com/seccomp/libseccomp/releases | \ curl --silent -L https://github.com/seccomp/libseccomp/releases | \
grep -o "libseccomp-[0-9.]*tar.gz" | sed 's/libseccomp-//g' | \ grep -o "libseccomp-[0-9.]*tar.gz" | sed 's/libseccomp-//g' | \
sed 's/.tar.gz//g' | verson_find_greatest "$VERSION" sed 's/.tar.gz//g' | verson_find_greatest "$VERSION"
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
make DESTDIR="$2" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -32,10 +32,7 @@ prepare() {
} }
build() { build() {
local SOURCE="$1" local INITRDDIR="$PKGDEPLOYDIR/initrd"
local DEPLOY="$2"
local INITRDDIR="$DEPLOY/initrd"
local INITRDLIST="$INITRDDIR/initrd.list" local INITRDLIST="$INITRDDIR/initrd.list"
local LINUX_CPU=$(get_linux_cpu) local LINUX_CPU=$(get_linux_cpu)
@ -57,39 +54,38 @@ build() {
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
local LINUX_CPU=$(get_linux_cpu) local LINUX_CPU=$(get_linux_cpu)
local target local target
mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules" mkdir -p "$PKGDEPLOYDIR/boot" "$PKGDEPLOYDIR/lib/modules"
for target in $LINUX_TGT; do for target in $LINUX_TGT; do
case $target in case $target in
*Image) *Image)
cp "arch/$LINUX_CPU/boot/$target" "$DEPLOY/boot/vmlinuz" cp "arch/$LINUX_CPU/boot/$target" "$PKGDEPLOYDIR/boot/vmlinuz"
echo "dir boot 0755 0 0" >> "$DEPLOY/$PKGNAME.files" echo "dir boot 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
echo "file boot/vmlinuz 0755 0 0" >> "$DEPLOY/$PKGNAME.files" echo "file boot/vmlinuz 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
;; ;;
modules) modules)
export KBUILD_OUTPUT="$PKGBUILDDIR" export KBUILD_OUTPUT="$PKGBUILDDIR"
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$PKGDEPLOYDIR" modules_install
echo "dir lib 0755 0 0" >> "$DEPLOY/$PKGNAME.files" echo "dir lib 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
echo "dir lib/modules 0755 0 0" >> "$DEPLOY/$PKGNAME.files" echo "dir lib/modules 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
find -H "$DEPLOY/lib" -type d -printf "dir %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/lib" -type d -printf "dir %p 0%m 0 0\\n" |\
tail -n +2 | sed "s#$DEPLOY/##g" >> "$DEPLOY/$PKGNAME.files" tail -n +2 | sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
find -H "$DEPLOY/lib" -type l -printf "slink %p 0%m 0 0 %l\\n" |\ find -H "$PKGDEPLOYDIR/lib" -type l -printf "slink %p 0%m 0 0 %l\\n" |\
sed "s#$DEPLOY/##g" >> "$DEPLOY/$PKGNAME.files" sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
find -H "$DEPLOY/lib" -type f -printf "file %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/lib" -type f -printf "file %p 0%m 0 0\\n" |\
sed "s#$DEPLOY/##g" >> "$DEPLOY/$PKGNAME.files" sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
;; ;;
esac esac
done done
cp $SCRIPTDIR/pkg/$PKGNAME/*.desc "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.desc "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -14,18 +14,20 @@ deploy() {
local LINUX_CPU=$(get_linux_cpu) local LINUX_CPU=$(get_linux_cpu)
export KBUILD_OUTPUT="$PKGBUILDDIR" export KBUILD_OUTPUT="$PKGBUILDDIR"
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$2" headers_install make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$PKGDEPLOYDIR" headers_install
cp "$SCRIPTDIR/pkg/$PKGNAME/linux-dev.desc" "$2" cp "$SCRIPTDIR/pkg/$PKGNAME/linux-dev.desc" "$PKGDEPLOYDIR"
echo "dir include 0755 0 0" > "$2/linux-dev.files" echo "dir include 0755 0 0" > "$PKGDEPLOYDIR/linux-dev.files"
find -H "$2/include" -type d -printf "dir %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/include" -type d -printf "dir %p 0%m 0 0\\n" |\
tail -n +2 | sed "s#$2/##g" >> "$2/linux-dev.files" tail -n +2 |\
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
find -H "$2/include" -type l -printf "slink %p 0%m 0 0 %l\\n" |\ find -H "$PKGDEPLOYDIR/include" -type l \
sed "s#$2/##g" >> "$2/linux-dev.files" -printf "slink %p 0%m 0 0 %l\\n" |\
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
find -H "$2/include" -type f -printf "file %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/include" -type f -printf "file %p 0%m 0 0\\n" |\
sed "s#$2/##g" >> "$2/linux-dev.files" sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">lzo-[0-9.]*tar.gz<" | \ curl --silent -L "$URL" | grep -o ">lzo-[0-9.]*tar.gz<" | \
sed 's/>lzo-//g' | sed 's/.tar.gz<//g' | \ sed 's/>lzo-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -29,7 +29,6 @@ build() {
deploy() { deploy() {
local INPUT="$1" local INPUT="$1"
local DEPLOY="$2"
local MUSL_CPU="" local MUSL_CPU=""
case "$TARGET" in case "$TARGET" in
@ -51,20 +50,20 @@ deploy() {
;; ;;
esac esac
DESTDIR="$DEPLOY" make install-headers DESTDIR="$PKGDEPLOYDIR" make install-headers
DESTDIR="$DEPLOY" make install-libs DESTDIR="$PKGDEPLOYDIR" make install-libs
cat_file_merge "LDPATH" > "$DEPLOY/LDPATH" cat_file_merge "LDPATH" > "$PKGDEPLOYDIR/LDPATH"
cp libssp_nonshared.a "$DEPLOY/lib" cp libssp_nonshared.a "$PKGDEPLOYDIR/lib"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{desc,files} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{desc,files} "$PKGDEPLOYDIR"
cat > "$DEPLOY/libc.files" <<_EOF cat > "$PKGDEPLOYDIR/libc.files" <<_EOF
dir lib 0755 0 0 dir lib 0755 0 0
dir etc 0755 0 0 dir etc 0755 0 0
file lib/libc.so 0755 0 0 $DEPLOY/lib/libc.so file lib/libc.so 0755 0 0 $PKGDEPLOYDIR/lib/libc.so
slink lib/ld-musl-${MUSL_CPU}.so.1 0777 0 0 libc.so slink lib/ld-musl-${MUSL_CPU}.so.1 0777 0 0 libc.so
file etc/ld-musl-${MUSL_CPU}.path 0644 0 0 $DEPLOY/LDPATH file etc/ld-musl-${MUSL_CPU}.path 0644 0 0 $PKGDEPLOYDIR/LDPATH
_EOF _EOF
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">nano-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">nano-[0-9.]*tar.xz<" | \
sed 's/>nano-//g' | sed 's/.tar.xz<//g' | \ sed 's/>nano-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -19,30 +19,27 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
rm "$PKGDEPLOYDIR/bin/ncursesw6-config"
mkdir -p "$PKGDEPLOYDIR/include/ncurses"
make DESTDIR="$DEPLOY" install for hdr in ${PKGDEPLOYDIR}/include/ncursesw/*.h; do
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
rm "$DEPLOY/bin/ncursesw6-config"
mkdir -p "${DEPLOY}/include/ncurses"
for hdr in ${DEPLOY}/include/ncursesw/*.h; do
local fname=$(basename $hdr) local fname=$(basename $hdr)
local target="../$fname" local target="../$fname"
mv "$hdr" "${DEPLOY}/include" mv "$hdr" "${PKGDEPLOYDIR}/include"
ln -s "$target" "${DEPLOY}/include/ncursesw/${fname}" ln -s "$target" "${PKGDEPLOYDIR}/include/ncursesw/${fname}"
ln -s "$target" "${DEPLOY}/include/ncurses/${fname}" ln -s "$target" "${PKGDEPLOYDIR}/include/ncurses/${fname}"
done done
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so" ln -s "libncursesw.so.$VERSION" "$PKGDEPLOYDIR/lib/libtinfo.so"
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so.$VERSION" ln -s "libncursesw.so.$VERSION" "$PKGDEPLOYDIR/lib/libtinfo.so.$VERSION"
ln -s "libncursesw.a" "$DEPLOY/lib/libtinfo.a" ln -s "libncursesw.a" "$PKGDEPLOYDIR/lib/libtinfo.a"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">ncurses-[0-9.]*tar.gz<" | \ curl --silent -L "$URL" | grep -o ">ncurses-[0-9.]*tar.gz<" | \
sed 's/>ncurses-//g' | sed 's/.tar.gz<//g' | \ sed 's/>ncurses-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">nftables-[0-9.]*tar.bz2<" | \ curl --silent -L "$URL" | grep -o ">nftables-[0-9.]*tar.bz2<" | \
sed 's/>nftables-//g' | sed 's/.tar.bz2<//g' | grep -v 0.099 |\ sed 's/>nftables-//g' | sed 's/.tar.bz2<//g' | grep -v 0.099 |\
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -71,31 +71,33 @@ _EOF
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
local wwwroot=$(file_path_override "wwwroot") local wwwroot=$(file_path_override "wwwroot")
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
if [ ! -z "$wwwroot" ] && [ -d "$wwwroot" ]; then if [ ! -z "$wwwroot" ] && [ -d "$wwwroot" ]; then
mkdir -p "$DEPLOY/srv" mkdir -p "$PKGDEPLOYDIR/srv"
cp -r "$wwwroot" "$DEPLOY/srv/www" cp -r "$wwwroot" "$PKGDEPLOYDIR/srv/www"
echo "dir srv 0755 0 0" >> "$DEPLOY/nginx.files" echo "dir srv 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
echo "dir srv/www 0755 0 0" >> "$DEPLOY/nginx.files" echo "dir srv/www 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
find -H "$DEPLOY/srv/www" -type d -printf "dir %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/srv/www" -type d \
tail -n +2 | sed "s#$DEPLOY/##g" >> "$DEPLOY/nginx.files" -printf "dir %p 0%m 0 0\\n" | tail -n +2 |\
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
find -H "$DEPLOY/srv/www" -type l -printf "slink %p 0%m 0 0 %l\\n" |\ find -H "$PKGDEPLOYDIR/srv/www" -type l \
sed "s#$DEPLOY/##g" >> "$DEPLOY/nginx.files" -printf "slink %p 0%m 0 0 %l\\n" | \
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
find -H "$DEPLOY/srv/www" -type f -printf "file %p 0%m 0 0\\n" |\ find -H "$PKGDEPLOYDIR/srv/www" -type f \
sed "s#$DEPLOY/##g" >> "$DEPLOY/nginx.files" -printf "file %p 0%m 0 0\\n" |\
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
fi fi
cat_file_override "nginx.conf" > "$DEPLOY/etc/nginx/nginx.conf" cat_file_override "nginx.conf" > "$PKGDEPLOYDIR/etc/nginx/nginx.conf"
} }
check_update() { check_update() {

View file

@ -22,11 +22,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -20,14 +20,13 @@ build() {
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2"
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
mkdir -p "$DEPLOY/var/lib/sshd" mkdir -p "$PKGDEPLOYDIR/var/lib/sshd"
install -v -m755 "$SOURCE/contrib/ssh-copy-id" "$DEPLOY/bin" install -v -m755 "$SOURCE/contrib/ssh-copy-id" "$PKGDEPLOYDIR/bin"
cat_file_override "sshd_config" > "$DEPLOY/etc/sshd_config" cat_file_override "sshd_config" > "$PKGDEPLOYDIR/etc/sshd_config"
} }
check_update() { check_update() {
@ -36,4 +35,4 @@ check_update() {
curl --silent -L "$URL" | grep -o ">openssh-[0-9.]*p[0-9]*.tar.gz<" | \ curl --silent -L "$URL" | grep -o ">openssh-[0-9.]*p[0-9]*.tar.gz<" | \
sed 's/>openssh-//g' | sed 's/.tar.gz<//g' | sed 's/p/./g' | \ sed 's/>openssh-//g' | sed 's/.tar.gz<//g' | sed 's/p/./g' | \
verson_find_greatest "$version" verson_find_greatest "$version"
} }

View file

@ -46,11 +46,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">pcre-[0-9.]*tar.bz2<" | \ curl --silent -L "$URL" | grep -o ">pcre-[0-9.]*tar.bz2<" | \
sed 's/>pcre-//g' | sed 's/.tar.bz2<//g' | \ sed 's/>pcre-//g' | sed 's/.tar.bz2<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -18,15 +18,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o ">procps-ng-[0-9.]*tar.xz<" | \ curl --silent -L "$URL" | grep -o ">procps-ng-[0-9.]*tar.xz<" | \
sed 's/>procps-ng-//g' | sed 's/.tar.xz<//g' |\ sed 's/>procps-ng-//g' | sed 's/.tar.xz<//g' |\
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L $URL | grep -o ">psmisc-[0-9.]*tar.xz<" | \ curl --silent -L $URL | grep -o ">psmisc-[0-9.]*tar.xz<" | \
sed 's/>psmisc-//g' | sed 's/.tar.xz<//g' | \ sed 's/>psmisc-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -16,16 +16,13 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make SHLIB_LIBS="-lncursesw" DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
chmod 755 ${PKGDEPLOYDIR}/lib/*
make SHLIB_LIBS="-lncursesw" DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
chmod 755 ${DEPLOY}/lib/*
} }
check_update() { check_update() {
curl --silent -L $URL | grep -o ">readline-[0-9.]*tar.gz<" | \ curl --silent -L $URL | grep -o ">readline-[0-9.]*tar.gz<" | \
sed 's/>readline-//g' | sed 's/.tar.gz<//g' | \ sed 's/>readline-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -1,9 +1,6 @@
DEPENDS="rootfs" DEPENDS="rootfs"
build() { build() {
local SOURCE="$1"
local DEPLOY="$2"
pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" $DEPENDS pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" $DEPENDS
# copy additional files from this package, subsitute filenames # copy additional files from this package, subsitute filenames
@ -22,13 +19,10 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" * tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -1,9 +1,6 @@
DEPENDS="rootfs" DEPENDS="rootfs"
build() { build() {
local SOURCE="$1"
local DEPLOY="$2"
pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" $DEPENDS pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" $DEPENDS
# copy helper scripts # copy helper scripts
@ -26,13 +23,10 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" * tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -1,9 +1,6 @@
DEPENDS="rootfs boot-rpi3" DEPENDS="rootfs boot-rpi3"
build() { build() {
local SOURCE="$1"
local DEPLOY="$2"
pkg install -om -r "$PKGBUILDDIR/boot" -R "$REPODIR" $DEPENDS pkg install -om -r "$PKGBUILDDIR/boot" -R "$REPODIR" $DEPENDS
# copy files from this package # copy files from this package
@ -24,13 +21,10 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" * tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -1,9 +1,6 @@
DEPENDS=$(cat_file_merge "ROOTFS" | sort -u) DEPENDS=$(cat_file_merge "ROOTFS" | sort -u)
build() { build() {
local SOURCE="$1"
local DEPLOY="$2"
# setup skeleton # setup skeleton
mkdir -pv ${PKGBUILDDIR}/{bin,dev,sys,proc,tmp,run,boot,usr,mnt,share} mkdir -pv ${PKGBUILDDIR}/{bin,dev,sys,proc,tmp,run,boot,usr,mnt,share}
mkdir -pv ${PKGBUILDDIR}/cfg/{preserve,overlay} mkdir -pv ${PKGBUILDDIR}/cfg/{preserve,overlay}
@ -13,21 +10,21 @@ build() {
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGBUILDDIR" cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGBUILDDIR"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/lib" "$PKGBUILDDIR" cp -r "$SCRIPTDIR/pkg/$PKGNAME/lib" "$PKGBUILDDIR"
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY/pseudo" cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$PKGDEPLOYDIR/pseudo"
# version info # version info
local fname=$(echo "${OS_NAME}-release" | tr '[:upper:]' '[:lower:]') local fname=$(echo "${OS_NAME}-release" | tr '[:upper:]' '[:lower:]')
echo $OS_RELEASE > $PKGBUILDDIR/etc/$fname echo $OS_RELEASE > $PKGBUILDDIR/etc/$fname
echo "etc/$fname m 644 0 0" >> "$DEPLOY/pseudo" echo "etc/$fname m 644 0 0" >> "$PKGDEPLOYDIR/pseudo"
# local config files # local config files
fname=$(file_path_override "resolv.conf") fname=$(file_path_override "resolv.conf")
if [ ! -z "$fname" ]; then if [ ! -z "$fname" ]; then
cp "$fname" "./etc/resolv.conf" cp "$fname" "./etc/resolv.conf"
echo "etc/resolv.conf m 644 0 0" >> "$DEPLOY/pseudo" echo "etc/resolv.conf m 644 0 0" >> "$PKGDEPLOYDIR/pseudo"
fi fi
# gather rootfs dependencies # gather rootfs dependencies
@ -36,15 +33,15 @@ build() {
cat_file_merge "ROOTFS" | sort -u | \ cat_file_merge "ROOTFS" | sort -u | \
xargs pkg install -R "$REPODIR" \ xargs pkg install -R "$REPODIR" \
-r "$PKGBUILDDIR" -F sqfs -l >> "$DEPLOY/pseudo" -r "$PKGBUILDDIR" -F sqfs -l >> "$PKGDEPLOYDIR/pseudo"
# setup root home directory # setup root home directory
cp -r "$PKGBUILDDIR/etc/skel" "$PKGBUILDDIR/usr/root" cp -r "$PKGBUILDDIR/etc/skel" "$PKGBUILDDIR/usr/root"
echo "usr/root m 700 0 0" >> "$DEPLOY/pseudo" echo "usr/root m 700 0 0" >> "$PKGDEPLOYDIR/pseudo"
find "./usr/root" -exec stat {} --printf="%n m %a 0 0\\n" \; | \ find "./usr/root" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed 's#^./##g' | tail -n +2 >> "$DEPLOY/pseudo" sed 's#^./##g' | tail -n +2 >> "$PKGDEPLOYDIR/pseudo"
# move configuration to preserve directory # move configuration to preserve directory
mv "$PKGBUILDDIR/etc" "$PKGBUILDDIR/cfg/preserve/etc" mv "$PKGBUILDDIR/etc" "$PKGBUILDDIR/cfg/preserve/etc"
@ -54,27 +51,24 @@ build() {
mkdir -p ${PKGBUILDDIR}/{etc,var,usr} mkdir -p ${PKGBUILDDIR}/{etc,var,usr}
sed -i 's#etc/#cfg/preserve/etc/#g' "$DEPLOY/pseudo" sed -i 's#etc/#cfg/preserve/etc/#g' "$PKGDEPLOYDIR/pseudo"
sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$DEPLOY/pseudo" sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$PKGDEPLOYDIR/pseudo"
sed -i 's#usr/#cfg/preserve/usr/#g' "$DEPLOY/pseudo" sed -i 's#usr/#cfg/preserve/usr/#g' "$PKGDEPLOYDIR/pseudo"
# don't add stuff for the boot partition to the squashfs image # don't add stuff for the boot partition to the squashfs image
mv ${PKGBUILDDIR}/boot/* "$DEPLOY" mv ${PKGBUILDDIR}/boot/* "$PKGDEPLOYDIR"
grep -v "^boot/" "$DEPLOY/pseudo" > "$DEPLOY/pseudo.temp" grep -v "^boot/" "$PKGDEPLOYDIR/pseudo" > "$PKGDEPLOYDIR/pseudo.temp"
mv "$DEPLOY/pseudo.temp" "$DEPLOY/pseudo" mv "$PKGDEPLOYDIR/pseudo.temp" "$PKGDEPLOYDIR/pseudo"
echo "boot m 750 0 0" >> "$DEPLOY/pseudo" echo "boot m 750 0 0" >> "$PKGDEPLOYDIR/pseudo"
} }
deploy() { deploy() {
local SOURCE="$1" mksquashfs "$PKGBUILDDIR" "$PKGDEPLOYDIR/rootfs.img" -comp xz \
local DEPLOY="$2" -no-progress -no-xattrs -pf "$PKGDEPLOYDIR/pseudo"
mksquashfs "$PKGBUILDDIR" "$DEPLOY/rootfs.img" -comp xz \ rm "$PKGDEPLOYDIR/pseudo"
-no-progress -no-xattrs -pf "$DEPLOY/pseudo" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
rm "$DEPLOY/pseudo"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L $URL | grep -o ">sed-[0-9.]*tar.xz<" | \ curl --silent -L $URL | grep -o ">sed-[0-9.]*tar.xz<" | \
sed 's/>sed-//g' | sed 's/.tar.xz<//g' | \ sed 's/>sed-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -17,18 +17,15 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cp "$SCRIPTDIR/pkg/$PKGNAME/login.defs" "$PKGDEPLOYDIR/etc"
make DESTDIR="$DEPLOY" install cp "$SCRIPTDIR/pkg/$PKGNAME/useradd" "$PKGDEPLOYDIR/etc/default"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
cp "$SCRIPTDIR/pkg/$PKGNAME/login.defs" "$DEPLOY/etc"
cp "$SCRIPTDIR/pkg/$PKGNAME/useradd" "$DEPLOY/etc/default"
# *hrmpf* # *hrmpf*
if [ -e "$DEPLOY/sbin" ]; then if [ -e "$PKGDEPLOYDIR/sbin" ]; then
mv ${DEPLOY}/sbin/* ${DEPLOY}/bin mv ${PKGDEPLOYDIR}/sbin/* "$PKGDEPLOYDIR/bin"
rmdir ${DEPLOY}/sbin rmdir "$PKGDEPLOYDIR/sbin"
fi fi
} }
@ -37,4 +34,4 @@ check_update() {
grep -o "shadow-[0-9.]*tar.xz" | \ grep -o "shadow-[0-9.]*tar.xz" | \
sed 's/shadow-//g' | sed 's/.tar.xz//g' | \ sed 's/shadow-//g' | sed 's/.tar.xz//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L https://sqlite.org/download.html | \ curl --silent -L https://sqlite.org/download.html | \
grep -o sqlite-autoconf-[0-9]*.tar.gz | grep -o [0-9]* | \ grep -o sqlite-autoconf-[0-9]*.tar.gz | grep -o [0-9]* | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -15,15 +15,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L $URL | grep -o ">tar-[0-9.]*tar.xz<" | \ curl --silent -L $URL | grep -o ">tar-[0-9.]*tar.xz<" | \
sed 's/>tar-//g' | sed 's/.tar.xz<//g' | \ sed 's/>tar-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -23,12 +23,9 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
make install make install
cat > "$DEPLOY/$PKGNAME.files" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.files" <<_EOF
dir bin 0755 0 0 dir bin 0755 0 0
dir lib 0755 0 0 dir lib 0755 0 0
dir lib/ldscripts 0755 0 0 dir lib/ldscripts 0755 0 0
@ -46,9 +43,9 @@ _EOF
find -H "$TCDIR/$TARGET/lib/ldscripts" -type f \ find -H "$TCDIR/$TARGET/lib/ldscripts" -type f \
-printf "file lib/ldscripts/%f 0%m 0 0 %p\\n" \ -printf "file lib/ldscripts/%f 0%m 0 0 %p\\n" \
>> "$DEPLOY/$PKGNAME.files" >> "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$DEPLOY/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -16,8 +16,8 @@ build() {
deploy() { deploy() {
make install make install
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -63,8 +63,8 @@ build() {
deploy() { deploy() {
make install-gcc install-target-libgcc make install-gcc install-target-libgcc
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
requires tc-binutils linux-dev fortify-headers requires tc-binutils linux-dev fortify-headers
_EOF _EOF

View file

@ -27,16 +27,13 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
make install make install
mkdir -p "$DEPLOY/lib" mkdir -p "$PKGDEPLOYDIR/lib"
mv ${TCDIR}/${TARGET}/{include,lib} "$DEPLOY" mv ${TCDIR}/${TARGET}/{include,lib} "$PKGDEPLOYDIR"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cat >> "$DEPLOY/libstdc++-dev.files" <<_EOF cat >> "$PKGDEPLOYDIR/libstdc++-dev.files" <<_EOF
dir include 0755 0 0 dir include 0755 0 0
dir include/c++ 0755 0 0 dir include/c++ 0755 0 0
dir include/c++/8.2.0 0755 0 0 dir include/c++/8.2.0 0755 0 0
@ -68,8 +65,8 @@ file include/c++/8.2.0/$TARGET/bits/messages_members.h 0644 0 0
file include/c++/8.2.0/$TARGET/ext/opt_random.h 0644 0 0 file include/c++/8.2.0/$TARGET/ext/opt_random.h 0644 0 0
_EOF _EOF
if [ -f "$DEPLOY/lib/libmpx.a" ]; then if [ -f "$PKGDEPLOYDIR/lib/libmpx.a" ]; then
cat >> "$DEPLOY/libgcc-dev.files" <<_EOF cat >> "$PKGDEPLOYDIR/libgcc-dev.files" <<_EOF
file lib/libmpx.a 0644 0 0 file lib/libmpx.a 0644 0 0
file lib/libmpxwrappers.a 0644 0 0 file lib/libmpxwrappers.a 0644 0 0
_EOF _EOF

View file

@ -12,8 +12,8 @@ build() {
} }
deploy() { deploy() {
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -14,8 +14,8 @@ build() {
} }
deploy() { deploy() {
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -10,7 +10,6 @@ prepare() {
} }
build() { build() {
$1/configure --prefix="$TCDIR" --target="$TARGET" \ $1/configure --prefix="$TCDIR" --target="$TARGET" \
--build="$HOSTTUPLE" --host="$HOSTTUPLE" \ --build="$HOSTTUPLE" --host="$HOSTTUPLE" \
--with-sysroot="$TCDIR/$TARGET" \ --with-sysroot="$TCDIR/$TARGET" \
@ -27,8 +26,8 @@ deploy() {
ln -s pkg-config "$TCDIR/bin/$TARGET-pkg-config" ln -s pkg-config "$TCDIR/bin/$TARGET-pkg-config"
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -19,8 +19,8 @@ build() {
deploy() { deploy() {
make install make install
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
_EOF _EOF
} }

View file

@ -17,11 +17,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -22,8 +22,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
_EOF _EOF
touch "$2/$PKGNAME.files" touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$2/$PKGNAME.desc" <<_EOF cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
name $PKGNAME name $PKGNAME
requires $DEPENDS requires $DEPENDS
_EOF _EOF

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make USRDIR="" DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make USRDIR="" DESTDIR="$DEPLOY" install sed -i 's@/usr@@g' "$PKGDEPLOYDIR/bin/tzselect"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" rm "$PKGDEPLOYDIR/bin/zdump"
rm "$PKGDEPLOYDIR/bin/zic"
sed -i 's@/usr@@g' "$DEPLOY/bin/tzselect"
rm "$DEPLOY/bin/zdump"
rm "$DEPLOY/bin/zic"
} }
check_update() { check_update() {

View file

@ -19,14 +19,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local tag alg type digest local tag alg type digest
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cat_file_override "unbound.conf" > "$DEPLOY/etc/unbound/unbound.conf" cat_file_override "unbound.conf" > "$PKGDEPLOYDIR/etc/unbound/unbound.conf"
echo "generating trust anchor root.key" echo "generating trust anchor root.key"
@ -39,7 +37,7 @@ deploy() {
type=$(echo $line | grep -o -e "<DigestType>[0-9]*</" | grep -o -w "[0-9]*") type=$(echo $line | grep -o -e "<DigestType>[0-9]*</" | grep -o -w "[0-9]*")
digest=$(echo $line | grep -o -e "<Digest>[A-F0-9]*</" | grep -o -w "[A-F0-9]*") digest=$(echo $line | grep -o -e "<Digest>[A-F0-9]*</" | grep -o -w "[A-F0-9]*")
echo ". IN DS $tag $alg $type $digest" >> "$DEPLOY/etc/unbound/root.key" echo ". IN DS $tag $alg $type $digest" >> "$PKGDEPLOYDIR/etc/unbound/root.key"
done done
} }

View file

@ -15,11 +15,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -22,20 +22,16 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" mkdir -p "$PKGDEPLOYDIR/var/lib/hwclock"
local DEPLOY="$2"
local UTIL
mkdir -p "$DEPLOY/var/lib/hwclock"
unfuck_libtool unfuck_libtool
make DESTDIR="$DEPLOY" install make DESTDIR="$PKGDEPLOYDIR" install
if [ -e "$DEPLOY/sbin" ]; then if [ -e "$PKGDEPLOYDIR/sbin" ]; then
mv ${DEPLOY}/sbin/* ${DEPLOY}/bin mv ${PKGDEPLOYDIR}/sbin/* "$PKGDEPLOYDIR/bin"
fi fi
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }
check_update() { check_update() {

View file

@ -16,15 +16,12 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {
curl --silent -L "$URL" | grep -o "xz-[0-9.]*tar.xz" | \ curl --silent -L "$URL" | grep -o "xz-[0-9.]*tar.xz" | \
sed 's/xz-//g' | sed 's/.tar.xz//g' | \ sed 's/xz-//g' | sed 's/.tar.xz//g' | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -27,11 +27,8 @@ build() {
} }
deploy() { deploy() {
local SOURCE="$1" make DESTDIR="$PKGDEPLOYDIR" install
local DEPLOY="$2" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
make DESTDIR="$DEPLOY" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
} }
check_update() { check_update() {

View file

@ -20,7 +20,7 @@ run_pkg_command() {
mkdir -p "$PKGBUILDDIR" "$PKGDEPLOYDIR" mkdir -p "$PKGBUILDDIR" "$PKGDEPLOYDIR"
pushd "$PKGBUILDDIR" > /dev/null pushd "$PKGBUILDDIR" > /dev/null
$FUNCTION "$SRC" "$PKGDEPLOYDIR" &>> "$LOGFILE" < /dev/null $FUNCTION "$SRC" &>> "$LOGFILE" < /dev/null
popd > /dev/null popd > /dev/null
gzip "$LOGFILE" gzip "$LOGFILE"