Name:           unbound-adblocker
Version:        0.3.1
Release:        1%{?dist}
Summary:        Simple program that makes Unbound an adblocker

License:        GPLv2+
URL:            https://gitlab.com/Leuca/unbound-adblocker
VCS:            git+https://gitlab.com/Leuca/unbound-adblocker.git#05ccba14b7130f558c245456d03637630e84ab6d:

Source:         unbound-adblocker-05ccba14.tar.gz

BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  make
BuildRequires:  gcc
BuildRequires:  curl-devel
BuildRequires:  systemd-rpm-macros

Requires:   curl
Requires:   unbound

%description
This program is able to generate a drop-in configuration file for Unbound to block unwanted domain names

%prep
%setup -T -b 0 -q -n unbound-adblocker

%build
autoreconf
%configure --enable-systemd
%make_build

%install
%make_install

# Quick fix for systemd units installation
%{__mkdir} -p %{buildroot}%{_unitdir}
%{__install} -m 0644 systemd/%{name}.service systemd/%{name}.timer %{buildroot}%{_unitdir}

%files
%license LICENSE
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.timer

%changelog
* Mon Jul 31 2023 Luca Magrone <luca@magrone.cc> 0.3.1-1
- Version 0.3.1
- Fix redirection configuration
- spec: avoid 0-release

* Sun Jul 30 2023 Luca Magrone <luca@magrone.cc> 0.3.0-1
- Version 0.3.0
- Allow domains redirection
- spec: Always apply fix
- systemd: timer: run once a day

* Fri Sep 02 2022 Luca Magrone <luca@magrone.cc> 0.2.1-1
- Version 0.2.1
- Add time of generation in output file

* Thu Aug 18 2022 Luca Magrone <luca@magrone.cc> 0.2.0-1
- Bump to version 0.2.0
- Add option to load hosts file from disk
- style: convert tabs to spaces

* Fri Jul 22 2022 Luca Magrone <luca@magrone.cc> 0.1.2-1
- Bump to version 0.1.2
- spec: update package URL

* Fri Jul 22 2022 Luca Magrone <luca@magrone.cc> 0.1.1-1
- Bump to version 0.1.1
- util: save: stop at whitespace instead of #

* Fri Jul 22 2022 Luca Magrone <luca@magrone.cc> 0.1.0-1
- Release 0.1.0
- systemd: fix service unit
- fix warnings
- spec: add temporary fix for fedora mock builds
- configure.ac: lower autoconf requirement
- spec: re-add autoconf dependency
- spec: require automake
- Add version option
- Add specfile
- Add systemd units
- Initial commit