File airportsd.spec of Package airportsd
#
# spec file for package airportsd
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: airportsd
Version: 0.0.3
Release: 0
Summary: IATA airport code lookup server
License: GPL-2.0-or-later
Group: Productivity/Networking/Other
URL: https://github.com/jpmens/airportsd
Source: https://github.com/jpmens/airportsd/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: airportsd-fix-install.patch
Patch1: airportsd-cflags.patch
BuildRequires: groff
BuildRequires: pandoc
BuildRequires: pkgconfig
BuildRequires: tinycdb-devel
BuildRequires: pkgconfig(libmicrohttpd)
%description
airportsd is an HTTPâaccessible IATA airport code lookup daemon.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
cp config.mk.example config.mk
%make_build \
OPTFLAGS="%{optflags}" \
DBNAME="%{_datadir}/airportsd/airports.cdb"
%install
%make_install \
DBNAME="%{_datadir}/airportsd/airports.cdb" \
INSTALLDIR=%{_prefix}
%files
%license LICENSE
%doc README.txt
%{_sbindir}/airportsd
%dir %{_datadir}/airportsd
%{_datadir}/airportsd/airports.cdb
%{_mandir}/man8/airportsd.8%{?ext_man}
%changelog