Files
perl-RT-admin-tools/perl-RT-admin-tools.spec
2025-08-12 18:16:56 +02:00

85 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-RT-admin-tools
#
# Copyright (c) 2013 SUSE LINUX Products 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: perl-RT-admin-tools
Version: 0.1
Release: 0
Summary: Tools to automate certain RT management tasks
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://en.opensuse.org/openSUSE:Services_team
Source0: rt-queue-count
Source1: rt-user-count
Source2: sysconfig.%{name}
Source3: create_manfile.pl
Source4: %{name}.changes
Source5: crontab
Source6: README
Source100: README.md
PreReq: %fillup_prereq
Requires: cron
Requires: perl(Config::Simple)
Requires: perl(Date::Calc)
Requires: perl(Getopt::Long)
Requires: perl(Pod::Usage)
Requires: perl(RT)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Pod::Man)
%{perl_requires}
%description
Currently, this package provides two scripts, rt-queue-count and
rt-user-count, which provide weekly statistics on RT tickets per queue
and per user, respectively.
%prep
cp %{S:4} %{S:6} .
%build
%install
%{__install} -D -m 0755 %{S:0} %{buildroot}/%{_bindir}/rt-queue-count
%{__install} -D -m 0755 %{S:1} %{buildroot}/%{_bindir}/rt-user-count
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
%{__install} -D -m 0644 %{S:5} %{buildroot}/etc/cron.d/%{name}
mkdir -p %{buildroot}/%{_mandir}/man1
perl %{S:3} "%version" "1" %{buildroot}/%{_bindir}/rt-queue-count %{buildroot}/%{_mandir}/man1/rt-queue-count.1
perl %{S:3} "%version" "1" %{buildroot}/%{_bindir}/rt-user-count %{buildroot}/%{_mandir}/man1/rt-user-count.1
%clean
%{__rm} -rf %{buildroot}
%post
%fillup_only
%files
%defattr(-,root,root)
%{_bindir}/rt-queue-count
%{_bindir}/rt-user-count
/var/adm/fillup-templates/sysconfig.%{name}
%doc %{name}.changes README
%{_mandir}/man1/rt-queue-count.1*
%{_mandir}/man1/rt-user-count.1*
%config /etc/cron.d/%{name}
%changelog