summaryrefslogtreecommitdiffstats
path: root/ldapserver.spec.tmpl
blob: c1f073be9a504c78cd2ffcabaaf74eae9c515780 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
# The way we do packaging seems to leave unpackaged files in the builddir;
# however, we really don't want them
%define _unpackaged_files_terminate_build 0
# override the default build name format - we do not want the arch subdir
%define _build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.%{flavor}.rpm
# don't bother stripping - we already do this for optimized, and we definitely
# want the symbols in the debug builds
%define __os_install_post %{nil}
Summary: @COMPANY-PRODUCT-NAME@
Name: @LCASE-COMPANY-NAME-NOSP@-ds
Version: @GEN-VERSION@
Release: 1.@PLATFORM@
License: GPL plus extensions
Group: System Environment/Daemons
URL: @COMPANY-URL@
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_builddir}
BuildPreReq: perl, fileutils, make
# Without Autoreq: 0, rpmbuild finds all sorts of crazy
# dependencies that we don't care about, and refuses to install
Autoreq: 0
# Without Requires: something, rpmbuild will abort!
Requires: perl
Prefix: /opt/%{name}

%description
@COMPANY-PRODUCT-NAME@ is an LDAPv3 compliant server.

# wait! what's going on here?  where are the prep and build sections?
# what kind of a .spec file is this anyway?
# A: one that works well with the current DS build system
# As we move towards a completely open source build
# process, will begin doing things in the more RPM way
# but for now, in order to make our tight deadlines and
# support RHN distribution, this is the way we do it

%install
# all we do here is run setup -b to unpack the binaries
# into the BuildRoot
# the echo yes is for dsktune to continue
echo yes | ./setup -b $RPM_BUILD_ROOT/%{prefix}

%clean
if [ -z "$RPM_INSTALL_PREFIX" ]; then
	RPM_INSTALL_PREFIX=%{prefix}
fi
rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX

%files
# rather than listing individual files, we just package (and own)
# the entire ldapserver directory - if we change this to put
# files in different places, we won't be able to do this anymore
%defattr(-,root,root,-)
%{prefix}

%post
echo ""
if [ -z "$RPM_INSTALL_PREFIX" ]; then
	RPM_INSTALL_PREFIX=%{prefix}
fi
echo "Install finished.  Please run $RPM_INSTALL_PREFIX/setup/setup to set up the servers."

%preun
# only run uninstall if this is the last version of the package
if [ "$1" = 0 ] ; then
	if [ -z "$RPM_INSTALL_PREFIX" ]; then
		RPM_INSTALL_PREFIX=%{prefix}
	fi
	cd $RPM_INSTALL_PREFIX
	./uninstall -s -force
fi

%changelog
* Fri Apr  8 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1
- check for last version removal in preun

* Tue Apr  5 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1
- make rpm name .flavor.rpm - flavor must be defined in rpmbuild

* Tue Apr  5 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1
- Removed all of the setup and build stuff - just use the regular DS build process for that

* Tue Apr  5 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1
- use platform specific packaging directory; add preun to do uninstall

* Fri Apr  1 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1
- use setup -q to suppress tar output

* Tue Mar 29 2005 Richard Megginson <rmeggins@redhat.com> 7.1-1
- use INTERNAL_BUILD=1 for internal builds - change rev to 1

* Tue Mar  8 2005 Richard Megginson <rmeggins@redhat.com> 7.1-0
- use ${prefix} instead of /opt/ldapserver - prefix is defined as /opt/%{name}

* Thu Jan 20 2005 Richard Megginson <rmeggins@redhat.com>
- Initial build.