blob: b33412f3628e7135a7ceb7af6876bfdce6c50932 (
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
|
Summary: Directory Server
Name: ldapserver
Version: 7.1
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://www.redhat.com
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_builddir}/%{name}-root
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/ldapserver
%description
ldapserver is an LDAPv3 compliant server.
# prep and setup expect there to be a Source0 file
# in the SOURCES directory - it will be unpacked
# in the _builddir (not BuildRoot)
%prep
%setup
%build
# This will do a regular make build and make pkg
# including grabbing the admin server, setup, etc.
# The resultant zip files and setup program will
# be in ldapserver/pkg
# INSTDIR is relative to ldap/cm
# build the file structure to package under ldapserver/pkg
# instead of MM.DD/platform
# remove BUILD_DEBUG=optimize to build the debug version
make BUILD_JAVA_CODE=1 BUILD_DEBUG=optimize NO_INSTALLER_TAR_FILES=1 INSTDIR=../../pkg
%install
# all we do here is run setup -b to unpack the binaries
# into the BuildRoot
rm -rf $RPM_BUILD_ROOT
cd pkg
# hack hack hack
# hack for unbundled jre - please fix!!!!!!
export NSJRE=/share/builds/components/jdk/1.4.2/Linux/jre
mkdir tmp
cd tmp
mkdir -p bin/base/jre
cp -r $NSJRE/bin bin/base/jre
cp -r $NSJRE/lib bin/base/jre
zip -q -r ../base/nsjre.zip bin
cd ..
rm -rf tmp
echo yes | ./setup -b $RPM_BUILD_ROOT/opt/ldapserver
# this is our setup script that sets up the initial
# server instances after installation
cd ..
cp ldap/cm/newinst/setup $RPM_BUILD_ROOT/opt/ldapserver/setup
%clean
rm -rf $RPM_BUILD_ROOT
%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 don't be able to do this anymore
%defattr(-,root,root,-)
/opt/ldapserver
%post
echo ""
echo "Please cd /opt/ldapserver and run ./setup/setup"
%changelog
* Thu Jan 20 2005 Richard Megginson <rmeggins@redhat.com>
- Initial build.
|