summaryrefslogtreecommitdiffstats
path: root/ldapserver.spec.tmpl
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-03-31 22:55:27 +0000
committerRich Megginson <rmeggins@redhat.com>2005-03-31 22:55:27 +0000
commit12efac13b9043e382f02a7397f2942f2ab913852 (patch)
tree05c385994167c9bfa98c2381dbba3c263c17b17d /ldapserver.spec.tmpl
parentfeaff0bbfa49d25742e8101db1c1112d62ffca6a (diff)
downloadds-12efac13b9043e382f02a7397f2942f2ab913852.tar.gz
ds-12efac13b9043e382f02a7397f2942f2ab913852.tar.xz
ds-12efac13b9043e382f02a7397f2942f2ab913852.zip
I got rid of ldapserver.spec. Instead, the spec file will be created on the fly. The only parameter passed in is the flavor - redhat or fedora. Everything else comes from the brandver.dat file. PLATFORM is derived from BUILD_ARCH in the usual Makefile way. So we could easily support Solaris or whatever else. The Makefile change is to allow you to produce the .spec file without having to build everything else. The change to reltools/brandver.pl allows us to change only the named files rather than every file in the .dat file.
The builddsrpm.sh is now the only thing you need to build the ds rpms: cvs co ldapserver/builddsrpm.sh ; cp ldapserver/builddsrpm.sh . ; ./builddsrpm.sh [redhat|fedora]
Diffstat (limited to 'ldapserver.spec.tmpl')
-rw-r--r--ldapserver.spec.tmpl86
1 files changed, 86 insertions, 0 deletions
diff --git a/ldapserver.spec.tmpl b/ldapserver.spec.tmpl
new file mode 100644
index 00000000..7a3bf006
--- /dev/null
+++ b/ldapserver.spec.tmpl
@@ -0,0 +1,86 @@
+# BEGIN COPYRIGHT BLOCK
+# Copyright (C) 2005 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+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@
+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/%{name}
+
+%description
+@COMPANY-PRODUCT-NAME@ 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
+# INTERNAL_BUILD=1 uses the internal, proprietary packages
+# like setupsdk, adminsdk, admin server
+# BUILD_MODE=int builds the Redhat branded product
+BUILDMODE=@BUILD-MODE@
+if [ $BUILDMODE = int ]; then
+# brandDirectory makes the product use Redhat branded text and graphics
+ make brandDirectory
+fi
+make INTERNAL_BUILD=1 BUILD_MODE=$BUILDMODE 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
+# the echo yes is for dsktune to continue
+echo yes | ./setup -b $RPM_BUILD_ROOT/%{prefix}
+# this is our setup script that sets up the initial
+# server instances after installation
+cd ..
+cp ldap/cm/newinst/setup $RPM_BUILD_ROOT/%{prefix}/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 won't be able to do this anymore
+%defattr(-,root,root,-)
+%{prefix}
+
+%post
+echo ""
+echo "Please cd " %{prefix} " and run ./setup/setup"
+
+%changelog
+* Tue Mar 29 2005 Richard Megginson <rich@localhost.localdomain> 7.1-1
+- use INTERNAL_BUILD=1 for internal builds - change rev to 1
+
+* Tue Mar 8 2005 Richard Megginson <rich@localhost.localdomain> 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.
+
+