Femboyos 2 full rewrite full working CI
This commit is contained in:
62
xorg-libs.recipe.py
Normal file
62
xorg-libs.recipe.py
Normal file
@@ -0,0 +1,62 @@
|
||||
pkgname = "xorg-libs"
|
||||
pkgver = "7.0" # meta version
|
||||
source = "https://www.x.org/pub/individual/lib/libX11-1.8.12.tar.xz"
|
||||
builddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
outputdir = "/home/gabry/lfs-repo/binpkg"
|
||||
manifestdir = "/home/gabry/lfs-repo/manifests"
|
||||
destdir = f"{fembuilddir}/DESTDIR"
|
||||
deps = ["fontconfig", "libxcb"]
|
||||
|
||||
build = [
|
||||
# Prepare dirs
|
||||
f"mkdir -p {fembuilddir} && cd {fembuilddir}",
|
||||
|
||||
# Get the tarball list and download each tarball
|
||||
f"cd {fembuilddir} && wget https://rocketleaguechatp.duckdns.org/lib-7.md5",
|
||||
f"cd {fembuilddir} && grep -v '^#' lib-7.md5 | awk '{{print $2}}' | wget -i- -c -B https://www.x.org/pub/individual/lib/",
|
||||
|
||||
# Build all
|
||||
f"""cd {fembuilddir} && for package in $(grep -v '^#' lib-7.md5 | awk '{{print $2}}'); do
|
||||
dir=${{package%.tar.*}}
|
||||
echo ">>> Building $dir"
|
||||
tar -xf $package
|
||||
cd $dir
|
||||
export XORG_PREFIX="/usr"
|
||||
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var --disable-static"
|
||||
docdir="--docdir=$XORG_PREFIX/share/doc/$dir"
|
||||
|
||||
case $dir in
|
||||
libXfont2-*) ./configure $XORG_CONFIG $docdir --disable-devel-docs ;;
|
||||
libXt-*) ./configure $XORG_CONFIG $docdir --with-appdefaultdir=/etc/X11/app-defaults ;;
|
||||
libXpm-*) ./configure $XORG_CONFIG $docdir --disable-open-zfile ;;
|
||||
libpciaccess-*) mkdir build && cd build && meson setup --prefix=$XORG_PREFIX --buildtype=release .. && ninja && DESTDIR={destdir} ninja install && cd .. && cd .. && rm -rf $dir && continue ;;
|
||||
*) ./configure $XORG_CONFIG $docdir ;;
|
||||
esac
|
||||
|
||||
make -j$(nproc)
|
||||
make DESTDIR={destdir} install
|
||||
|
||||
# licenses... lice- just one mor-
|
||||
licdir="{destdir}/usr/share/licenses/$dir"
|
||||
mkdir -p "$licdir"
|
||||
for f in COPYING COPYRIGHT LICENSE LICENSE* COPYING*; do
|
||||
[ -f "$f" ] && cp "$f" "$licdir/" && echo " -> Copied $f"
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf $dir
|
||||
ldconfig
|
||||
done""",
|
||||
|
||||
# Make tarball + manifests
|
||||
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
||||
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
||||
|
||||
# Cleanup
|
||||
f"rm -rf {fembuilddir}"
|
||||
]
|
||||
|
||||
triggers = [
|
||||
f"cd /tmp && ldconfig"
|
||||
]
|
||||
Reference in New Issue
Block a user