Imported Upstream version 3.3.0
[debian/amanda] / packaging / rpm / amanda.spec.src
index 291c44f505c36ec8ed619cedc68efbf32fa46c98..d79078607bf9cbed11176d06053de75414f25c10 100644 (file)
@@ -33,7 +33,7 @@
 
 # LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones,
 # like rhel3 and sles9 can't.
-%define LDFLAGS -Wl,--as-needed
+%define enable_as_needed --enable-as-needed
 
 # Define which Distribution we are building:
 # Try to detect the distribution we are building:
        %define requires_libtermcap Requires: libtermcap.so.2
        %define curl curl
        %define without_ipv6 --without-ipv6
-       %undefine LDFLAGS
     %endif
     %if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
         %define dist redhat
        # as integers.
        %define curl curl
        %if "%{distver}" == "9"
-           %undefine LDFLAGS
+           %undefine enable_as_needed
        %endif
     %endif
 %endif
@@ -369,10 +368,13 @@ Amanda Documentation is available at: http://wiki.zmanda.com/
 # the platform detection bits.
 # without_ipv6 should only be defined on rhel3.
 # LDFLAGS macro is defined except on rhel3.
+# --enable-as-needed must be conditional until configure tests whether
+# ld can accept --as-needed.
 ./configure \
         %{?PKG_CONFIG_PATH: PKG_CONFIG_PATH=%PKG_CONFIG_PATH} \
         CFLAGS="%{optflags} -g -pipe" CXXFLAGS="%{optflags}" \
         %{?LDFLAGS:LDFLAGS="${LDFLAGS} %{?LDFLAGS:%LDFLAGS}"} \
+       %{?enable_as_needed:%{enable_as_needed}} \
         --quiet \
         --prefix=%{PREFIX} \
         --sysconfdir=%{SYSCONFDIR} \
@@ -1595,6 +1597,7 @@ echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if an
 %{AMLIBEXECDIR}/dumper
 %{AMLIBEXECDIR}/planner
 %{SBINDIR}/amcheck
+%{SBINDIR}/amservice
 %defattr(0750,%{amanda_user},%{amanda_group},0750)
 %{LOGDIR}
 %{SYSCONFDIR}/amanda