]> git.pld-linux.org Git - packages/apparmor-parser.git/commitdiff
- added dynamic bcond
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 6 Apr 2012 19:49:54 +0000 (19:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apparmor-parser.spec -> 1.41

apparmor-parser.spec

index 3087cb695d52cd05b5ba8f92bf3c0903487c157f..6f0ac63220f552d3681f998f79b804c3f17684c5 100644 (file)
@@ -1,6 +1,8 @@
-
-%bcond_without tests
-
+#
+# Conditional build:
+%bcond_without tests   # don't perform "make tests"
+%bcond_with    dynamic # link libstdc++ and libgcc dynamically
+#
 Summary:       AppArmor userlevel parser utility
 Summary(pl.UTF-8):     Narzędzie przestrzeni użytkownika do przetwarzania AppArmor
 Name:          apparmor-parser
@@ -20,12 +22,12 @@ BuildRequires:      gettext-devel
 BuildRequires: libcap-devel
 BuildRequires: libstdc++-devel
 # for apparmor_profile which links statically sometimes
-BuildRequires: libstdc++-static
-BuildRequires: perl-Test-Harness
-BuildRequires: perl-tools-devel
+%{!?with_dynamic:BuildRequires:        libstdc++-static}
 BuildRequires: perl-tools-pod
 %if %{with tests}
 BuildRequires: perl-Locale-gettext
+BuildRequires: perl-Test-Harness
+BuildRequires: perl-tools-devel
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -48,9 +50,14 @@ SubDomain.
 %{__make} -j1 -C parser \
        CC="%{__cc}" \
        CXX="%{__cxx}" \
-       CFLAGS="%{rpmcflags} %{rpmcppflags}"
+       CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+       %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=}
 
-%{?with_tests:%{__make} -j1 -C parser tests}
+%if %{with tests}
+%{__make} -j1 -C parser tests \
+       CC="%{__cc}" \
+       %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=-lstdc++}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.126666 seconds and 4 git commands to generate.