File pisg.spec of Package pisg

#
# spec file for package pisg
#
# Copyright (c) 2014 by SUSE Linux Products GmbH, Nuremberg
#
# 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:           pisg
Version:        0.73
Release:        1
License:        GPL-2.0+
Summary:        IRC Statistics generator
Url:            http://pisg.sourceforge.net/
Group:          Applications/Internet
Source0:        http://prdownloads.sourceforge.net/pisg/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE -- use FHS based directories and config file locations
Patch0:         pisg-0.73-systemdirs.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       perl(Text::Iconv)
%if %{defined suse_version}
Requires:       perl(Exporter)
Recommends:     perl(CGI::Carp)
Recommends:     perl(File::Basename)
Recommends:     perl(File::Copy)
Recommends:     perl(Time::Local)
Recommends:     perl(Data::Dumper)
%endif

%description
Pisg is an IRC statistics generator. It takes IRC log-files and turns
them into nice looking stats.

%prep
%setup -q
%patch0 -p0
#permissions
find . -type f -exec chmod 644 {} \;

%build
#no build

%install
install -p -D -m 0755 pisg %{buildroot}%{_bindir}/pisg
install -p -D -m 0644 pisg.cfg %{buildroot}%{_sysconfdir}/pisg.cfg
install -p -D -m 0644 lang.txt %{buildroot}%{_datadir}/%{name}/lang.txt
cp -rp gfx %{buildroot}%{_datadir}/%{name}/gfx
cp -rp layout %{buildroot}%{_datadir}/%{name}/layout
# modules into perl dir
install -p -D -m 0644 modules/Pisg.pm %{buildroot}%{perl_vendorlib}/Pisg.pm
cp -rp modules/Pisg %{buildroot}%{perl_vendorlib}/Pisg
# man file into mandir
install -p -D -m 0644 docs/pisg.1 %{buildroot}%{_mandir}/man1/pisg.1

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING README docs/Changelog docs/CREDITS docs/pisg-doc.txt
%doc scripts
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man1/%{name}.1*
%{perl_vendorlib}/Pisg*
%config(noreplace)%{_sysconfdir}/%{name}.cfg

%changelog
openSUSE Build Service is sponsored by