ldapserver.spec 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Summary: Directory Server
  2. Name: ldapserver
  3. Version: 7.1
  4. Release: 1
  5. License: GPL
  6. Group: System Environment/Daemons
  7. URL: http://www.redhat.com
  8. Source0: %{name}-%{version}.tar.gz
  9. BuildRoot: %{_builddir}/%{name}-root
  10. BuildPreReq: perl, fileutils, make
  11. # Without Autoreq: 0, rpmbuild finds all sorts of crazy
  12. # dependencies that we don't care about, and refuses to install
  13. Autoreq: 0
  14. # Without Requires: something, rpmbuild will abort!
  15. Requires: perl
  16. Prefix: /opt/ldapserver
  17. %description
  18. ldapserver is an LDAPv3 compliant server.
  19. # prep and setup expect there to be a Source0 file
  20. # in the SOURCES directory - it will be unpacked
  21. # in the _builddir (not BuildRoot)
  22. %prep
  23. %setup
  24. %build
  25. # This will do a regular make build and make pkg
  26. # including grabbing the admin server, setup, etc.
  27. # The resultant zip files and setup program will
  28. # be in ldapserver/pkg
  29. # INSTDIR is relative to ldap/cm
  30. # build the file structure to package under ldapserver/pkg
  31. # instead of MM.DD/platform
  32. # remove BUILD_DEBUG=optimize to build the debug version
  33. make BUILD_JAVA_CODE=1 BUILD_DEBUG=optimize NO_INSTALLER_TAR_FILES=1 INSTDIR=../../pkg
  34. %install
  35. # all we do here is run setup -b to unpack the binaries
  36. # into the BuildRoot
  37. rm -rf $RPM_BUILD_ROOT
  38. cd pkg
  39. # hack hack hack
  40. # hack for unbundled jre - please fix!!!!!!
  41. export NSJRE=/share/builds/components/jdk/1.4.2/Linux/jre
  42. mkdir tmp
  43. cd tmp
  44. mkdir -p bin/base/jre
  45. cp -r $NSJRE/bin bin/base/jre
  46. cp -r $NSJRE/lib bin/base/jre
  47. zip -q -r ../base/nsjre.zip bin
  48. cd ..
  49. rm -rf tmp
  50. echo yes | ./setup -b $RPM_BUILD_ROOT/opt/ldapserver
  51. # this is our setup script that sets up the initial
  52. # server instances after installation
  53. cd ..
  54. cp ldap/cm/newinst/setup $RPM_BUILD_ROOT/opt/ldapserver/setup
  55. %clean
  56. rm -rf $RPM_BUILD_ROOT
  57. %files
  58. # rather than listing individual files, we just package (and own)
  59. # the entire ldapserver directory - if we change this to put
  60. # files in different places, we don't be able to do this anymore
  61. %defattr(-,root,root,-)
  62. /opt/ldapserver
  63. %post
  64. echo ""
  65. echo "Please cd /opt/ldapserver and run ./setup/setup"
  66. %changelog
  67. * Thu Jan 20 2005 Richard Megginson <[email protected]>
  68. - Initial build.