source: LATMOS-Accounts/latmos-accounts.spec.in @ 736

Last change on this file since 736 was 736, checked in by nanardon, 14 years ago
  • restart services after rpm installation
File size: 2.2 KB
Line 
1%define realname   LATMOS-Accounts
2%define version    @VERSION@
3%define release    %mkrel 1
4
5Name:       latmos-accounts
6Version:    %{version}
7Release:    %{release}
8License:    GPL or Artistic
9Group:      Development/Perl
10Summary:    Latmos Account system
11Source:     %{realname}-%{version}.tar.gz
12Url:        http://search.cpan.org/dist/%{realname}
13BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-buildroot
14BuildArch:  noarch
15
16BuildRequires: perl(Net::LDAP)
17BuildRequires: perl(DBD::Pg)
18BuildRequires: perl(Unicode::Map8)                                 
19BuildRequires: perl(Crypt::RSA)                                 
20BuildRequires: perl(MIME::Base64)
21BuildRequires: perl(Term::ReadKey)
22BuildRequires: perl(Config::IniFiles)
23BuildRequires: perl(Mail::Sendmail)
24BuildRequires: perl(Net::DNS)
25BuildRequires: perl(Template)
26
27Requires: perl(Mail::Sendmail)
28Requires: perl(Net::DNS)
29Requires: perl(Template)
30Requires: perl(DBD::Pg)
31Requires: perl(IO::Socket::SSL)
32
33%description
34The core applications tools of the LATMOS-Accounts system. A batch of
35applucations to create user accounts and exchange information through several
36others accounts management system such ldap, nis, etc...
37
38%prep
39%setup -q -n %{realname}-%{version}
40
41%build
42%{__perl} Makefile.PL INSTALLDIRS=vendor
43%make
44
45%check
46make test
47
48%install
49rm -rf %buildroot
50%makeinstall_std
51
52mkdir %buildroot%_sysconfdir/init.d
53install -m 755 etc/init.d/la-sync-manager %buildroot%_sysconfdir/init.d/la-sync-manager
54
55mkdir -p %buildroot/%_sysconfdir/sysconfig
56install -m 600 etc/sysconfig/latmos-accounts %buildroot/%_sysconfdir/sysconfig/latmos-accounts
57
58mkdir -p %buildroot/%_sysconfdir/cron.d
59install -m 644 etc/cron.d/latmos-accounts %buildroot/%_sysconfdir/cron.d/latmos-accounts
60
61%clean
62rm -rf %buildroot
63
64%preun
65%_preun_service la-sync-manager
66
67%post
68%_post_service la-sync-manager
69if [ "$1" -ge "1" ] ; then
70    /sbin/service la-sync-manager restart
71fi
72
73%files
74%defattr(-,root,root)
75%doc Changes README
76%_sysconfdir/init.d/la-sync-manager
77%config(noreplace) %_sysconfdir/sysconfig/latmos-accounts
78%config %_sysconfdir/cron.d/latmos-accounts
79%attr(0600,root,root) %config(noreplace) %_sysconfdir/latmos-account.ini
80%_bindir/*
81%{_mandir}/man3/*
82%{_mandir}/man1/*
83%perl_vendorlib/*
84%_datadir/latmos-accounts
85
Note: See TracBrowser for help on using the repository browser.