forked from FemboyOS/fempkg_recipes
42 lines
1.8 KiB
Python
42 lines
1.8 KiB
Python
pkgname = "geoclue"
|
|
pkgver = "2.8.0"
|
|
source = f"https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/{pkgver}/geoclue-{pkgver}.tar.bz2"
|
|
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 = ["json-glib", "libsoup", "libnotify", "vala", "ModemManager"]
|
|
|
|
build = [
|
|
# Extract
|
|
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.bz2",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && mkdir build && cd build && meson setup --prefix=/usr --buildtype=release -D gtk-doc=false -D nmea-source=false ..",
|
|
f"cd {builddir}/build && ninja",
|
|
f"cd {builddir}/build && DESTDIR={destdir} ninja install",
|
|
f"""mkdir -p {destdir}/etc/geoclue/conf.d && cat > {destdir}/etc/geoclue/conf.d/90-lfs-google.conf << "EOF"
|
|
# Begin /etc/geoclue/conf.d/90-lfs-google.conf
|
|
|
|
# This configuration applies for the WiFi source.
|
|
[wifi]
|
|
|
|
# Set the URL to Google's Geolocation Service.
|
|
url=https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyCmBCAAwwSjPLqFOuQjDV2g7mkQmv2kiTs
|
|
|
|
# End /etc/geoclue/conf.d/90-lfs-google.conf
|
|
EOF""",
|
|
|
|
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
|
f"install -v -m644 {builddir}/COPYING {destdir}/usr/share/licenses/{pkgname}/COPYING",
|
|
f"install -v -m644 {builddir}/COPYING.LIB {destdir}/usr/share/licenses/{pkgname}/COPYING.LIB",
|
|
|
|
# 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 {builddir} {fembuilddir}"
|
|
]
|