# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # 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.