@@ -1,3670 +0,0 @@
-#
-# Copyright (C) 2005-2013 Zmanda Incorporated.
-# All Rights Reserved.
-#
-# 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; either version 2
-# of the License, or (at your option) any later version.
-#
-# 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
-#
-# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
-# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-#
-
-
-%define build_srpm 0
-%{?srpm_only: %define build_srpm 1}
-
-# Pkg-config sometimes needs its own path set, and we need to allow users to
-# override our guess during detection. This macro takes care of that.
-# If no --define PKG_CONFIG_PATH was passed and env var $PKG_CONFIG_PATH is
-# set then use the env var.
-%{!?PKG_CONFIG_PATH: %{expand:%(echo ${PKG_CONFIG_PATH:+"%%define PKG_CONFIG_PATH $PKG_CONFIG_PATH"})}}
-
-%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}\n}}
-
-# LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones,
-# like rhel3 and sles9 can't.
-%define enable_as_needed --enable-as-needed
-
-# Define which Distribution we are building:
-# Try to detect the distribution we are building:
-%if %{_vendor} == redhat
- # Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least
- # fc3-8. So RHEL and Fedora look at the same file. Different versions have
- # different numbers of spaces; hence the use of $3 vs. $4..
- %if %(awk '$1 == "Fedora" { exit 1; }' /etc/redhat-release; echo $?)
- %define dist fedora
- %define disttag fc
- %define distver %(awk '{print $4}' /etc/redhat-release)
- %endif
- # if macro cannot have an empty test and we're just testing the existance
- %if %{?fedora:yes}%{!?fedora:no} == yes
- # In theory this should be more reliable than awking for distver.
- %define distver %{fedora}
- %endif
- %if "%{dist}" == "fedora"
- %if %{distver} <= 8
- %define requires_libtermcap Requires: libtermcap.so.2
- %define curl curl
- %endif
- %if %{distver} >= 9
- %define curl libcurl
- %endif
- %if %{_host_cpu} == x86_64 && %{_target_cpu} == i686
- # Do nothing if PKG_CONFIG_PATH was set by the user above.
- %{!?PKG_CONFIG_PATH: %define PKG_CONFIG_PATH /usr/lib/pkgconfig}
- %endif
- %endif
- %if %(awk '$1 == "Red" && $7 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 3
- %define tarver 1.14
- %define requires_libtermcap Requires: libtermcap.so.2
- %define curl curl
- %define without_ipv6 --without-ipv6
- %undefine enable_as_needed
- %define prereq_sharutils PreReq: sharutils
- %endif
- %if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 4
- %define tarver 1.14
- %define requires_libtermcap Requires: libtermcap.so.2
- %define curl curl
- %define prereq_sharutils PreReq: sharutils
- %endif
- %if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 4
- %define tarver 1.14
- %define requires_libtermcap Requires: libtermcap.so.2
- %define curl curl
- %define prereq_sharutils PreReq: sharutils
- %endif
- %if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 5
- %define curl curl
- %endif
- %if %(awk '$1 == "CentOS" && $3 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 5
- %define curl curl
- %endif
- %if %(awk '$1 == "Red" && $7 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?)
- %define dist redhat
- %define disttag rhel
- %define distver 6
- %define curl libcurl
- %endif
-
- # If dist is undefined, we didn't detect.
- %{!?dist:%define dist unknown}
-%endif
-# Detect Suse variants.
-%if %{_vendor} == "suse"
- %define dist SuSE
- %define disttag %(awk '$1=="openSUSE" { print "suse"; } $1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release)
- # use printf to be sure rpm gets a number type
- %define distver %(awk '$1=="openSUSE" { printf("%d", $2); } $1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; printf("%d", VER)}' /etc/SuSE-release)
- %define curl curl
- %if %{distver} == 9
- %undefine enable_as_needed
- %endif
- %if %{distver} < 11
- %define prereq_sharutils PreReq: sharutils
- %endif
-%endif
-
-# Set options per distribution
-%if %{dist} == redhat || %{dist} == fedora
- %define rpm_group Applications/Archiving
- %define requires_initscripts Requires: initscripts
-%endif
-%if %{dist} == SuSE
- %define rpm_group Productivity/Archiving/Backup
-%endif
-
-# Let's die if we haven't detected the distro. This might save some frustration.
-# RPM does not provide a way to exit gracefully, hence the tag_to_cause_exit.
-%{!?distver: %{error:"Your distribution and its version were not detected."}; %tag_to_cause_exit }
-# Set minimum tar version if it wasn't set in the per-distro section
-%{!?tarver: %define tarver 1.15}
-
-# Define the native binary data encoder (for create_amkey)
-%define encoder %({ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; })
-
-%define packer %(%{__id_u} -n)
-
-# --- Definitions ---
-
-# Define amanda_version using the value determined by
-# packaging/common/substitute.pl.
-%{!?amanda_version: %define amanda_version 3.3.4 }
-%{!?amanda_release: %define amanda_release 1}
-%define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
-%define amanda_user amandabackup
-%define amanda_group disk
-
-Summary: The Amanda Backup and Archiving System
-Name: amanda
-Version: %{amanda_version}
-%define rpm_release %{amanda_release}.%{disttag}%{distver}
-%if %{build_srpm}
-%define rpm_release %{amanda_release}
-%endif
-Release: %{rpm_release}
-Source: %{name}-%{version}.tar.gz
-License: http://wiki.zmanda.com/index.php/Amanda_Copyright
-Vendor: Zmanda, Inc.
-Packager: www.zmanda.com
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{packer}-buildroot
-Group: %{rpm_group}
-# TODO - Need required versions for these:
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: binutils
-BuildRequires: bison
-BuildRequires: flex
-BuildRequires: gcc
-BuildRequires: glib2 >= 2.2.0
-BuildRequires: glib2-devel
-BuildRequires: gettext
-BuildRequires: readline
-# Note: newer distros have changed most *-devel to lib*-devel, and added a
-# provides tag for backwards compat.
-BuildRequires: readline-devel
-BuildRequires: %{curl} >= 7.10.0
-BuildRequires: %{curl}-devel >= 7.10.0
-BuildRequires: openssl
-BuildRequires: openssl-devel
-BuildRequires: perl(ExtUtils::Embed)
-%{?prereq_sharutils}
-Requires: /bin/awk
-Requires: /bin/date
|