source: xas/trunk/perl-XAS.spec @ 1f7fb7c704e27b311427c5e6e34839af55d3bd25

Revision 1f7fb7c704e27b311427c5e6e34839af55d3bd25, 3.9 KB checked in by Kevin L. Esteb <kevin@…>, 19 months ago (diff)

updated documentation

  • Property mode set to 100644
Line 
1Name:           perl-XAS
2Version:        0.17
3Release:        1%{?dist}
4Summary:        XAS - Middleware for Datacener Operations
5License:        GPL+ or Artistic
6Group:          Development/Libraries
7URL:            http://search.cpan.org/dist/XAS/
8Source0:        http://www.cpan.org/modules/by-module/XAS/XAS-%{version}.tar.gz
9BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10BuildArch:      noarch
11BuildRequires:  perl(Test::More)
12BuildRequires:  perl(Module::Build)
13Requires:       perl(Badger) >= 0.09
14Requires:       perl(POE) >= 1.35
15Requires:       perl(DateTime) >= 0.53
16Requires:       perl(DateTime::Format::Strptime) >= 1.1
17Requires:       perl(DateTime::Format::Pg) >= 0.0
18Requires:       perl(Config::IniFiles) >= 2.72
19Requires:       perl(Hash::Merge) >= 0.12
20Requires:       perl(HTTP::Response) >= 0.0
21Requires:       perl(JSON::XS) >= 2.27
22Requires:       perl(KeyedMutex) >= 0.06
23Requires:       perl(MIME::Lite) >= 3.027
24Requires:       perl(Params::Validate) >= 0.92
25Requires:       perl(Pod::Usage) >= 1.35
26Requires:       perl(Try::Tiny) >= 0.0
27Requires:       perl(Try::Tiny::Retry) >= 0.0
28Requires:       perl(Set::Light) >= 0.04
29Requires:       perl(Net::SSH2) >= 0.44
30Requires:       perl(WWW::Curl) >= 4.15
31Requires:       perl(XML::LibXML) => 0.0
32Requires:       perl(IPC::Semaphore)
33Requires:       perl(Sys::Syslog)
34Requires:       perl(Data::UUID)
35Requires:       perl(Data::Hexdumper)
36Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
37
38%define _initrddir  %{_sysconfdir}/init.d
39%define _sysconfigs %{_sysconfdir}/sysconfig
40%define _logrotated %{_sysconfdir}/logrotate.d
41%define _profiled   %{_sysconfdir}/profile.d
42
43%if 0%{?rhel} >= 6
44%{?filter_setup: %{?perl_default_filter} }
45%filter_from_requires /Win32/d
46%filter_from_provides /Win32/d
47%filter_setup
48%endif
49
50%description
51This is middleware for datacenter operations. It is cross platform capable.
52
53%pre
54getent group xas >/dev/null || groupadd -f -r xas
55if ! getent passwd xas >/dev/null ; then
56    useradd -r -g xas -d /var/lib/xas -s /sbin/nologin -c "XAS" xas
57fi
58exit 0
59
60%prep
61%setup -q -n XAS-%{version}
62
63%if 0%{?rhel} == 5
64
65cat << \EOF > %{name}-prov
66#!/bin/sh
67%{__perl_provides} $* | sed -e '/Win32/d'
68EOF
69%global __perl_provides %{_builddir}/XAS-%{version}/%{name}-prov
70chmod +x %{__perl_provides}
71
72cat << \EOF > %{name}-req
73#!/bin/sh
74%{__perl_requires} $* | sed -e '/Win32/d'
75EOF
76%global __perl_requires %{_builddir}/XAS-%{version}/%{name}-req
77chmod +x %{__perl_requires}
78
79%endif
80
81%build
82%{__perl} Build.PL --installdirs vendor
83./Build
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
88install -m 755 -d %{buildroot}/etc/xas
89install -m 775 -d %{buildroot}/var/lib/xas
90install -m 775 -d %{buildroot}/var/run/xas
91install -m 775 -d %{buildroot}/var/log/xas
92install -m 775 -d %{buildroot}/var/lock/xas
93install -m 775 -d %{buildroot}/var/spool/xas
94install -m 775 -d %{buildroot}/var/spool/xas/alerts
95install -m 775 -d %{buildroot}/var/spool/xas/logs
96
97./Build install --destdir $RPM_BUILD_ROOT create_packlist=0
98./Build redhat --destdir $RPM_BUILD_ROOT
99
100find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
101%{_fixperms} $RPM_BUILD_ROOT/*
102
103%check
104./Build test
105
106%post
107chown -R root.xas /etc/xas
108chown -R xas.xas  /var/lib/xas
109chown -R xas.xas  /var/log/xas
110chown -R xas.xas  /var/run/xas
111chown -R xas.xas  /var/lock/xas
112chown -R xas.xas  /var/spool/xas
113
114chmod g+ws /var/lib/xas
115chmod g+ws /var/run/xas
116chmod g+ws /var/log/xas
117chmod g+ws /var/lock/xas
118chmod g+ws /var/spool/xas
119chmod g+ws /var/spool/xas/alerts
120chmod g+ws /var/spool/xas/logs
121
122%postun
123if [ "$1" = 0 ]; then
124    rm -Rf /etc/xas
125    rm -Rf /var/lib/xas
126    rm -Rf /var/run/xas
127    rm -Rf /var/log/xas
128    rm -Rf /var/lock/xas
129    rm -Rf /var/spool/xas
130fi
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%files
136%defattr(-,root,root,-)
137%doc Changes perl-XAS.spec README
138%{perl_vendorlib}/*
139%config(noreplace) %{_profiled}/xas.sh
140%{_manddir}/*
141%{_sysconfdir}/*
142
143%changelog
144* Tue Sep 24 2013 kesteb 0.07-1
145- Specfile autogenerated by cpanspec 1.78.
Note: See TracBrowser for help on using the repository browser.