diff --git a/index.txt b/index.txt index d72a272..406ac59 100644 --- a/index.txt +++ b/index.txt @@ -266,6 +266,7 @@ ModemManager.recipe.py mpc.recipe.py mpfr.recipe.py mtdev.recipe.py +muparser.recipe.py nasm.recipe.py ncurses.recipe.py neon.recipe.py diff --git a/muparser.recipe.py b/muparser.recipe.py new file mode 100644 index 0000000..41c29c6 --- /dev/null +++ b/muparser.recipe.py @@ -0,0 +1,30 @@ +pkgname = "muparser" +pkgver = "2.3.5" +source = f"https://github.com/beltoforion/muparser/archive/v{pkgver}/muparser-{pkgver}.tar.gz" +builddir = f"/tmp/fempkg/build/{pkgname}/{pkgname}-{pkgver}" +fembuilddir = f"/tmp/fempkg/build/{pkgname}" +outputdir = "/home/gabry/lfs-repo/binpkg" +manifestdir = "/home/gabry/lfs-repo/manifests" +destdir = f"{fembuilddir}/DESTDIR" + +deps = ["cmake"] + +build = [ + # Extract + f"mkdir -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.gz", + + # 64-bit build + f"cd {builddir} && mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=Release ..", + f"cd {builddir}/build && make -j$(nproc)", + f"cd {builddir}/build && make DESTDIR={destdir} install", + + f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/", + f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE", + + # 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}" +]