# 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 7.1-1 - check for last version removal in preun * Tue Apr 5 2005 Rich Megginson 7.1-1 - make rpm name .flavor.rpm - flavor must be defined in rpmbuild * Tue Apr 5 2005 Rich Megginson 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 7.1-1 - use platform specific packaging directory; add preun to do uninstall * Fri Apr 1 2005 Rich Megginson 7.1-1 - use setup -q to suppress tar output * Tue Mar 29 2005 Richard Megginson 7.1-1 - use INTERNAL_BUILD=1 for internal builds - change rev to 1 * Tue Mar 8 2005 Richard Megginson 7.1-0 - use ${prefix} instead of /opt/ldapserver - prefix is defined as /opt/%{name} * Thu Jan 20 2005 Richard Megginson - Initial build.