Search
j0ke.net Open Build Service
>
Projects
>
SUSE
:
Manager
:
1.2
>
NPalert
> NPalert.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File NPalert.spec of Package NPalert
# # spec file for package NPalert # # Copyright (c) 2011 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/ # %define install_prefix %{_var}/lib/notification %define log_dir %{_var}/log/notification %if 0%{?suse_version} %define httpd_prefix /srv/www %define apache_user wwwrun %define apache_group www %else %define httpd_prefix %{_var}/www %define apache_user wwwrun %define apache_group www %endif %define notif_user nocpulse %define log_rotate_prefix %{_sysconfdir}/logrotate.d/ # Package specific stuff Name: NPalert Summary: NOCpulse notification system Url: https://fedorahosted.org/spacewalk Source0: NPalert-git-f1e93e638aef9caed20c73d21a326afe3ffcab0b.tar.gz Version: 1.126.16 Release: 0.4.10 BuildArch: noarch %if 0%{?suse_version} Requires: perl = %{perl_version} Requires: perl-Error Requires: perl-Crypt-GeneratePassword %else Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %endif #Requires: perl perl(Config::IniFiles) perl(DBI) perl(DBD::Oracle) perl(Class::MethodMaker) perl(Error) perl(Date::Manip) perl-TimeDate perl-MailTools perl-NOCpulse-Probe perl-libwww-perl perl(URI) perl(HTML::Parser) perl(FreezeThaw) Group: Applications/Communications License: GPL v2 only Requires: nocpulse-common %if 0%{?suse_version} Requires: smtp_daemon %else Requires: smtpdaemon %endif Requires: SatConfig-general BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} BuildRequires: nocpulse-common %endif %description NOCpulse provides application, network, systems and transaction monitoring, coupled with a comprehensive reporting system including availability, historical and trending reports in an easy-to-use browser interface. This package provides NOCpulse notification system. %prep %setup -q -n NPalert-git-f1e93e638aef9caed20c73d21a326afe3ffcab0b %build #nothing to do here %install rm -rf $RPM_BUILD_ROOT # Create directories mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/archive mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/generated mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/static mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification/stage/config mkdir -p --mode=755 $RPM_BUILD_ROOT%{_sysconfdir}/notification mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/ack_queue mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/ack_queue/.new mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/alert_queue mkdir -p --mode=775 $RPM_BUILD_ROOT%install_prefix/queue/alert_queue/.new mkdir -p --mode=755 $RPM_BUILD_ROOT%{_bindir} mkdir -p --mode=755 $RPM_BUILD_ROOT%log_dir mkdir -p --mode=755 $RPM_BUILD_ROOT%log_dir/archive mkdir -p --mode=755 $RPM_BUILD_ROOT%log_dir/ticketlog # Create symlinks ln -s ../../static $RPM_BUILD_ROOT%{_sysconfdir}/notification/stage/config/static # Install the perl modules mkdir -p $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Notif #mkdir -p --mode 755 $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Notif/test install -p -m 644 *.pm $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Notif #install -m 644 test/*.pm $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Notif/test # Install the scripts install -p -m 755 scripts/* $RPM_BUILD_ROOT%{_bindir} # Install the config stuff install -p config/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/notification/static # Make sure everything is owned by the right user/group and critical dirs # have the right permissions chmod 755 $RPM_BUILD_ROOT%install_prefix chmod -R 755 $RPM_BUILD_ROOT%{_bindir} # Install the html and cgi scripts mkdir -p --mode=755 $RPM_BUILD_ROOT%httpd_prefix/htdocs mkdir -p --mode=755 $RPM_BUILD_ROOT%httpd_prefix/cgi-bin mkdir -p --mode=755 $RPM_BUILD_ROOT%httpd_prefix/cgi-mod-perl mkdir -p --mode=755 $RPM_BUILD_ROOT%httpd_prefix/templates %if 0%{?suse_version} ln -s %log_dir $RPM_BUILD_ROOT%httpd_prefix/htdocs/alert_logs %else ln -s ../../../../%log_dir $RPM_BUILD_ROOT%httpd_prefix/htdocs/alert_logs %endif install -p -m 755 httpd/cgi-bin/redirmgr.cgi $RPM_BUILD_ROOT%httpd_prefix/cgi-bin/ install -p -m 755 httpd/cgi-mod-perl/*.cgi $RPM_BUILD_ROOT%httpd_prefix/cgi-mod-perl/ install -p -m 644 httpd/html/*.html $RPM_BUILD_ROOT%httpd_prefix/htdocs/ install -p -m 644 httpd/html/*.css $RPM_BUILD_ROOT%httpd_prefix/htdocs/ install -p -m 644 httpd/templates/*.html $RPM_BUILD_ROOT%httpd_prefix/templates/ # Install the cron stuff mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/ install -p -m 644 cron/notification $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/notification mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 /usr/bin/pod2man $RPM_BUILD_ROOT/%{_bindir}/monitor-queue | gzip > $RPM_BUILD_ROOT%{_mandir}/man3/monitor-queue.3pm.gz /usr/bin/pod2man $RPM_BUILD_ROOT/%{_bindir}/queue_remote_check.pl | gzip > $RPM_BUILD_ROOT%{_mandir}/man3/queue_remote_check.pl.3pm.gz %post if [ $1 -eq 2 ]; then ls /opt/notification/config/generated/* 2>/dev/null | xargs -I file mv file %{_sysconfdir}/notification/generated ls /opt/notification/config/static/notif.ini 2>/dev/null | xargs -I file mv file %{_sysconfdir}/notification/static ls /opt/notification/var/GenerateNotifConfig-error.log 2>/dev/null | xargs -I file mv file %{_var}/log/nocpulse ls /opt/notification/var/archive/* 2>/dev/null | xargs -I file mv file %log_dir/archive ls /opt/notification/var/ticketlog/* 2>/dev/null | xargs -I file mv file %log_dir/ticketlog fi %files %defattr(-,root,root,-) %{_sysconfdir}/cron.d/notification %{httpd_prefix}/htdocs/* %{httpd_prefix}/cgi-bin/* %{httpd_prefix}/cgi-mod-perl/* %{httpd_prefix}/templates/* %dir %{httpd_prefix}/templates %dir %{httpd_prefix}/cgi-mod-perl %dir %attr(-, %notif_user,%notif_user) %install_prefix %dir %{perl_vendorlib}/NOCpulse/Notif %{perl_vendorlib}/NOCpulse/Notif/* %{_bindir}/* %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification/archive %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification/generated %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification/static %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification/stage %attr (755,%notif_user,%notif_user) %dir %{_sysconfdir}/notification/stage/config %attr (755,%notif_user,%notif_user) %dir %install_prefix/queue %attr (775,mail, %notif_user) %dir %install_prefix/queue/ack_queue %attr (775,mail, %notif_user) %dir %install_prefix/queue/ack_queue/.new %attr (775,%{apache_user}, %notif_user) %dir %install_prefix/queue/alert_queue %attr (775,%{apache_user}, %notif_user) %dir %install_prefix/queue/alert_queue/.new %attr (755,%notif_user,%notif_user) %dir %log_dir %attr (755,%notif_user,%notif_user) %dir %log_dir/archive %attr (755,%notif_user,%notif_user) %dir %log_dir/ticketlog %attr(644,%notif_user,%notif_user) %{_sysconfdir}/notification/static/* %{_sysconfdir}/notification/stage/config/static %{_mandir}/man3/monitor-queue* %{_mandir}/man3/queue_remote_check.pl* %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Jan 30 2011 mc@suse.de - backport upstrem fixes * Tue Sep 14 2010 mantel@suse.de - Initial release of NPalert