File tzupdate.spec of Package tzupdate

#
# spec file for package tzupdate
#
# Copyright (c) 2022 tzupdate contributors
#
# 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/
#

# Generated by rust2rpm 15-15-2.17
%global __cargo_skip_build 0

Name:           tzupdate
Version:        3.1.0+git.1756752065.91d65d8
Release:        0
Summary:        Set the system timezone based on IP geolocation
License:        GPL-3.0-only OR GPL-2.0-only
URL:            https://github.com/cdown/tzupdate
Source:         %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz
ExclusiveArch:  %{rust_arches}
BuildRequires:  cargo-packaging
BuildRequires:  rust >= 1.70.0
BuildRequires:  libnettle-devel
BuildRequires:  clang-devel
BuildRequires:  gpg2
BuildRequires:  git

%description
tzupdate is a fully automated utility to set the system time
using geolocation.

Usage

    # tzupdate
    Set system timezone to Europe/London.

Internally, this geolocates you, gets the timezone for that
geolocation, and then updates the system's local time zone.

You can see what tzupdate would do without actually doing it by
passing -p, and specify an alternative IP address by using -i.
This is not an exhaustive list of options, see tzupdate --help
for that.

%prep
%autosetup -p1 -a1

%build
%cargo_build

%install
%cargo_install
mkdir -p %{buildroot}/%{_bindir}
mv target/release/tzupdate %{buildroot}/%{_bindir}

%check
%cargo_test

%files
%doc README.md 
%license LICENSE
%{_bindir}/tzupdate
openSUSE Build Service is sponsored by