From 5522a5c0c6bc3578ea7c1cb3e15e34602c76b7f5 Mon Sep 17 00:00:00 2001 From: Sindre Pedersen Bjørdal Date: Aug 12 2008 08:09:45 +0000 Subject: add files to branch --- diff --git a/pisg-0.72-systemdirs.patch b/pisg-0.72-systemdirs.patch new file mode 100644 index 0000000..84ca69a --- /dev/null +++ b/pisg-0.72-systemdirs.patch @@ -0,0 +1,32 @@ +diff -up pisg-0.72/pisg.orig pisg-0.72/pisg +--- pisg-0.72/pisg.orig 2008-08-08 02:18:01.000000000 +0200 ++++ pisg-0.72/pisg 2008-08-08 02:49:52.000000000 +0200 +@@ -29,11 +29,14 @@ sub main + # If the script was executed as ./pisg - then we just remove + # everything after the last slash, if it was executed as 'perl pisg' + # we assume that we are executing in the current dir. +- if ($script_dir =~ m/\/[^\/]*$/) { +- $script_dir =~ s/\/[^\/]*$//; +- } else { +- $script_dir = "."; +- } ++# if ($script_dir =~ m/\/[^\/]*$/) { ++# $script_dir =~ s/\/[^\/]*$//; ++# } else { ++# $script_dir = "."; ++# } ++ ++#for Fedora, use shared datadir ++ $script_dir = "/usr/share/pisg/"; + + if (!-t STDOUT) { # we are not writing to a terminal + push @ARGV, "--silent"; +@@ -79,6 +82,8 @@ sub get_cmdline_options + modules_dir => "$script_dir/modules/", # Module search path + logfile => [], + logdir => [], ++#for Fedora, used system dirs ++ configfile => "/etc/pisg.cfg" + ); + + # Commandline options diff --git a/pisg.spec b/pisg.spec new file mode 100644 index 0000000..eea656a --- /dev/null +++ b/pisg.spec @@ -0,0 +1,69 @@ +Name: pisg +Version: 0.72 +Release: 3%{?dist} +Summary: IRC Statistics generator + +Group: Applications/Internet +License: GPLv2+ +URL: http://pisg.sourceforge.net/ +Source0: http://prdownloads.sourceforge.net/pisg/%{name}-%{version}.tar.gz +#use system dirs +Patch0: pisg-0.72-systemdirs.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +#no build needed +BuildArch: noarch + +#BuildRequires: +Requires: perl(Text::Iconv) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + + + +%description +Pisg is an IRC statistics generator. It takes IRC logfiles and turns +them into nice looking stats. + +%prep +%setup -q +%patch0 -p1 + +#permissions +chmod 0644 scripts/pum/pum.pl + +%build +#no build + +%install +rm -rf $RPM_BUILD_ROOT +#manual installation of all needed files +install -p -D -m 0755 pisg $RPM_BUILD_ROOT/usr/bin/pisg +install -p -D -m 0644 pisg.cfg $RPM_BUILD_ROOT/etc/pisg.cfg + +install -p -D -m 0644 lang.txt $RPM_BUILD_ROOT%{_datadir}/pisg/lang.txt +cp -rp gfx $RPM_BUILD_ROOT%{_datadir}/pisg/gfx +cp -rp layout $RPM_BUILD_ROOT%{_datadir}/pisg/layout + +#modules into perl dir +install -p -D -m 0644 modules/Pisg.pm $RPM_BUILD_ROOT%{perl_vendorlib}/Pisg.pm +cp -rp modules/Pisg $RPM_BUILD_ROOT%{perl_vendorlib}/Pisg + +#man file into mandir +install -p -D -m 0644 docs/pisg.1 $RPM_BUILD_ROOT%{_mandir}/man1/pisg.1 +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING README docs/Changelog docs/CREDITS docs/pisg-doc.txt +%doc scripts +%{_bindir}/* +%{_datadir}/pisg +%{_mandir}/man?/* +%{perl_vendorlib}/* +%config(noreplace)%{_sysconfdir}/* + +%changelog +* Fri Aug 08 2008 Sindre Pedersen Bjørdal - 0.72-3 +- Initial build diff --git a/sources b/sources index e69de29..6adeba9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +28ffff94b052ff8ba7621d7d8394b296 pisg-0.72.tar.gz