updated
This commit is contained in:
parent
5e9c889b7d
commit
d18f6af9c8
7 changed files with 85 additions and 10 deletions
5
02-base
5
02-base
|
@ -148,8 +148,9 @@ if [ ! -f $LFS/var/lib/pkg/db ]; then
|
|||
fi
|
||||
|
||||
mkdir -p $LFS/usr/ports/
|
||||
echo "==> Copying ports"
|
||||
cp -Ra ports/* $LFS/usr/ports/
|
||||
runinchroot ports -u || die
|
||||
#echo "==> Copying ports"
|
||||
#cp -Ra ports/* $LFS/usr/ports/
|
||||
|
||||
mountbind_cache
|
||||
|
||||
|
|
8
files/core.httpup
Normal file
8
files/core.httpup
Normal file
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# /etc/ports/core.httpup: core's port collection
|
||||
#
|
||||
|
||||
ROOT_DIR=/usr/ports/core
|
||||
URL=https://raw.githubusercontent.com/emmett1/lfs-scripts/master/ports/core/
|
||||
|
||||
# End of file
|
27
files/httpup
Executable file
27
files/httpup
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# /etc/ports/drivers/httpup: httpup driver script for ports(8)
|
||||
#
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "usage: $0 <file>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. $1
|
||||
|
||||
if [ -z "$ROOT_DIR" ]; then
|
||||
echo "ROOT_DIR not set in '$1'" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [ -z "$URL" ]; then
|
||||
echo "URL not set in '$1'" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
for REPO in $URL; do
|
||||
PORT=`echo $REPO | sed -n '/#.*$/s|^.*#||p'`
|
||||
httpup sync $REPO $ROOT_DIR/$PORT
|
||||
done
|
||||
|
||||
# End of file.
|
17
files/pkgin
17
files/pkgin
|
@ -11,7 +11,7 @@
|
|||
|
||||
trap "exit 1" SIGHUP SIGINT SIGQUIT SIGTERM
|
||||
|
||||
PORT="/usr/ports"
|
||||
REPO="/usr/ports/core /usr/ports/extra /usr/ports/xorg /usr/ports/multilib"
|
||||
|
||||
while [ $1 ]; do
|
||||
case $1 in
|
||||
|
@ -31,13 +31,18 @@ for p in ${PKG[@]}; do
|
|||
echo "Package '$p' is installed."
|
||||
continue
|
||||
fi
|
||||
if [ -f $PORT/$p/Pkgfile ]; then
|
||||
cd $PORT/$p &>/dev/null
|
||||
PKGFOUND=no
|
||||
for r in $REPO; do
|
||||
if [ -f $r/$p/Pkgfile ]; then
|
||||
PKGFOUND=yes
|
||||
cd $r/$p &>/dev/null
|
||||
pkgmk ${PKGMK_CMD[@]} || exit $?
|
||||
[ -x bootstrap-post-install ] && ./bootstrap-post-install
|
||||
[ -x post-install ] && ./post-install
|
||||
[ -e bootstrap-post-install ] && sh bootstrap-post-install
|
||||
[ -e post-install ] && sh post-install
|
||||
cd - &>/dev/null
|
||||
else
|
||||
fi
|
||||
done
|
||||
if [ "$PKGFOUND" = "no" ]; then
|
||||
echo "Port '$p' not found."
|
||||
exit 1
|
||||
fi
|
||||
|
|
13
toolchain/43-curl
Executable file
13
toolchain/43-curl
Executable file
|
@ -0,0 +1,13 @@
|
|||
name=curl
|
||||
version=7.66.0
|
||||
source=(https://curl.haxx.se/download/$name-$version.tar.xz)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
./configure --prefix=/tools \
|
||||
--disable-static \
|
||||
--enable-threaded-resolver \
|
||||
--with-ca-bundle=/tools/etc/ssl/certs/ca-certificates.crt
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
}
|
9
toolchain/44-httpup
Executable file
9
toolchain/44-httpup
Executable file
|
@ -0,0 +1,9 @@
|
|||
name=httpup
|
||||
version=0.5.0
|
||||
source=(https://crux.nu/files/$name-$version.tar.xz)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
make
|
||||
make DESTDIR=$PKG prefix=/tools mandir=/tools/share/man install
|
||||
}
|
12
toolchain/45-ports
Executable file
12
toolchain/45-ports
Executable file
|
@ -0,0 +1,12 @@
|
|||
name=ports
|
||||
version=1.6
|
||||
source=(https://crux.nu/files/tools/ports/$name-$version.tar.gz)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
make
|
||||
make DESTDIR=$PKG BINDIR=/tools/bin ETCDIR=/tools/etc/ports PORTSDIR=/tools/etc/ports MANDIR=/tools/share/man install
|
||||
install -D -m 755 $FILEDIR/httpup /tools/etc/ports/drivers/httpup
|
||||
install -m 644 $FILEDIR/core.httpup /tools/etc/ports/core.httpup
|
||||
sed 's,etc/ports,tools/etc/ports,g' -i /tools/bin/ports
|
||||
}
|
Loading…
Add table
Reference in a new issue