File clamav-unofficial-sigs.spec of Package clamav-unofficial-sigs
#
# spec file for package clamav-unofficial-sigs
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name:           clamav-unofficial-sigs
Version:        7.2.5
Release:        0
Summary:        ClamAV Unofficial Signatures Updater
License:        BSD-3-Clause
Group:          Productivity/Security
Url:            https://github.com/extremeshok/clamav-unofficial-sigs
Source:         %{name}-%{version}.tar.xz
BuildRequires:  systemd-rpm-macros
Requires:       clamav
BuildArch:      noarch
%description
ClamAV Unofficial Signatures Updater.
%prep
%setup -q
perl -pi -e 's|^ExecStart=/usr/local/sbin/clamav-unofficial-sigs\.sh|ExecStart=/usr/sbin/clamav-unofficial-sigs.sh|g' systemd/clamav-unofficial-sigs.service
perl -pi -e 's|^#!/usr/bin/env bash|#!/bin/bash|g' clamav-unofficial-sigs.sh
%build
cp config/os/os.opensuse.conf config/os.conf
%install
install -D -m 0755 clamav-unofficial-sigs.sh %{buildroot}%{_sbindir}/clamav-unofficial-sigs.sh
install -d -m 0750 %{buildroot}%{_sysconfdir}/clamav-unofficial-sigs %{buildroot}/var/log/clamav-unofficial-sigs/ %{buildroot}%{_unitdir}
cp -a config/{master,os,user}.conf %{buildroot}%{_sysconfdir}/clamav-unofficial-sigs
install -m 0644 systemd/clamav* %{buildroot}%{_unitdir}
%__ln_s /usr/sbin/service %{buildroot}/usr/sbin/rc%{name}
%pre
%service_add_pre %{name}.timer %{name}.service
%preun
%service_del_preun %{name}.timer %{name}.service
%post
%service_add_post %{name}.timer %{name}.service
%postun
%service_del_postun %{name}.timer %{name}.service
%files
%defattr(-,root,root)
%{_sbindir}/clamav-unofficial-sigs.sh
%{_sbindir}/rc%{name}
%dir /var/log/clamav-unofficial-sigs/
%{_unitdir}/%{name}.*
%config(noreplace) %{_sysconfdir}/clamav-unofficial-sigs