--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = libloc
+version = 0.9.18
+release = 1
+
+groups = System/Libraries
+url = https://www.ipfire.org/location
+license = LGPLv2.1
+summary = libloc is a library for fast and efficient IP address location
+
+description
+ libloc is a library for fast and efficient IP address location
+end
+
+source_dl = https://source.ipfire.org/releases/libloc/
+
+build
+ requires
+ asciidoc
+ autoconf
+ automake
+ intltool
+ gettext-devel
+ libtool
+ lua-devel
+ openssl-devel
+ pkg-config
+ python3-devel
+ systemd-devel
+ zlib-devel
+ end
+
+ prepare_cmds
+ ./autogen.sh
+ end
+
+ configure_options += \
+ --enable-debug \
+ --enable-lua \
+ --disable-perl
+
+ test
+ make check
+ end
+
+ install_cmds
+ # Remove the importer because we don't have all the required Python modules
+ rm -vf %{BUILDROOT}%{bindir}/location-importer
+ end
+end
+
+packages
+ package %{name}
+
+ package %{name}-data
+ summary = Data files for libloc
+
+ # Install this with the main library
+ supplements
+ libloc
+ end
+
+ files
+ %{sharedstatedir}/location
+ end
+ end
+
+ package %{name}-tools
+ summary = Command line tools for libloc
+
+ requires += python3-location = %{thisver}
+
+ files
+ %{bindir}
+ %{datadir}/bash-completion
+ %{mandir}/man1
+ %{mandir}/man8
+ %{unitdir}
+ end
+ end
+
+ package lua-location
+ summary = Lua bindings for libloc
+
+ files
+ %{libdir}/lua
+ end
+ end
+
+ package python3-location
+ template PYTHON3
+
+ requires += libloc = %{thisver}
+ end
+
+ package %{name}-devel
+ template DEVEL
+ end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
+end