File: bdii.spec

package info (click to toggle)
bdii4 4.0.2.2-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 284 kB
  • ctags: 33
  • sloc: sh: 804; perl: 715; makefile: 121
file content (79 lines) | stat: -rwxr-xr-x 1,761 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%define topdir %(pwd)/rpmbuild
%define _topdir %{topdir} 
Summary: bdii
Name: bdii
Version:  4.0.1
Vendor: LCG
Release: 2
License: LCG
Group: LCG
Source: %{name}.src.tgz
BuildArch: noarch
Requires: openldap-clients
Requires: openldap-servers
Requires: perl-libwww-perl
Obsoletes: lcg-bdii
Prefix: /opt/bdii
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Packager: LCG

%description
BDII is an "Information Index" based on a standard OpenLDAP server.

%prep

%setup -c

%build
make install prefix=%{buildroot}%{prefix}

%post
if [ $1 -eq 1 -a -d "/etc/rc.d/init.d" ]; then
    ln -s ${RPM_INSTALL_PREFIX}/sbin/bdii /etc/rc.d/init.d/bdii
fi
${RPM_INSTALL_PREFIX}/sbin/bdii condrestart || true

%preun
if [ $1 -eq 0 ]; then
    ${RPM_INSTALL_PREFIX}/sbin/bdii stop || true
fi

%postun
# this is the final remove case
if [ $1 -eq 0 -a -L "/etc/rc.d/init.d/bdii" ]; then
    rm -f /etc/rc.d/init.d/bdii
fi
# This is the upgrade case, when the previous
# package contained the symlink as a file.
if [ $1 -eq 1 -a ! -L "/etc/rc.d/init.d/bdii" ]; then
    ln -s ${RPM_INSTALL_PREFIX}/sbin/bdii /etc/rc.d/init.d/bdii
fi

%files
%defattr(-,root,root)
%dir %{prefix}
%dir %{prefix}/etc
%config %{prefix}/etc/bdii.conf
%config %{prefix}/etc/bdii-update.conf
%config %{prefix}/etc/glue-slapd.conf
%config %{prefix}/etc/BDII.schema
%config %{prefix}/etc/DB_CONFIG
%config %{prefix}/etc/default.ldif
%dir %{prefix}/doc
%{prefix}/doc/README
%dir %{prefix}/bdii/man
%dir %{prefix}/bdii/man/man5
%{prefix}/bdii/man/man5/bdii.5
%dir %{prefix}/bdii/man/man8
%{prefix}/bdii/man/man8/bdii.8
%dir %{prefix}/sbin
/etc/logrotate.d/bdii
%{prefix}/sbin/bdii
%{prefix}/sbin/bdii-fwd
%{prefix}/sbin/bdii-proxy
%{prefix}/sbin/bdii-update
/var/bdii
/var/log/bdii

%clean
rm -rf %{buildroot}