]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/blobdiff - macros.tld
- exclude entire /lib/systemd from packages
[packages/rpm-tld-macros.git] / macros.tld
index 522578804c9f7ee7dabe99134476cfccfda37c3f..f3e511961a96bd7a08adda481438b8e578234330 100644 (file)
@@ -82,7 +82,6 @@
 %{__spec_install_post_chrpath}\
 %{__spec_install_post_compress_modules}\
 %{__spec_install_post_check_so}\
-%{__spec_install_post_check_tmpfiles}\
 %{__spec_install_post_check_shebangs}\
 %{__spec_install_post_compress_docs}\
 %{__spec_install_post_py_hardlink}\
@@ -461,7 +460,7 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 %{?__cxx:CXX="${CXX:-%{__cxx}}"} \\\
 CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\
 %{__cmake} \\\
-       -DCMAKE_VERBOSE_MAKEFILE=BOOL:ON \\\
+       -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
        -DCMAKE_BUILD_TYPE=%{!?debug:TLD}%{?debug:Debug} \\\
        -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \\\
        -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \\\
@@ -629,6 +628,10 @@ LC_ALL=C.UTF-8 %{__meson} \
 %__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
 %__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
 
+# expands to enabled or disabled based on bcond; for use with meson or cmake
+%__enabled_disabled() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+%__enabled_disabled_not() %{expand:%%{?with_%{1}:disabled}%%{!?with_%{1}:enabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742
@@ -644,6 +647,8 @@ LC_ALL=C.UTF-8 %{__meson} \
 %%prep\
 %{nil}
 
+%_build_id_links       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:alldebug}%{?__dic_0:none}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
+
 # If non-empty "debug" macro defined, add "dbg" suffix to release number
 %_rpmfilename          %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
 
@@ -943,14 +948,6 @@ __spec_install_post_check_execstack() { \
        %{!?no_install_post_check_execstack:return $fail;} \
 }; __spec_install_post_check_execstack }}
 
-#-----------------------------------------------------------------
-# Do not verify if each directory under /var/run contains
-# tmpfiles.d configuration. TLD Linux doesn't use tmpfiles.d.
-#
-%no_install_post_check_tmpfiles 1
-#
-%__spec_install_post_check_tmpfiles %{nil}
-
 #-----------------------------------------------------------------
 # Verify that scripts have reasonable shebangs
 # Test spec: see "test/spec_install_post_check_shebangs" branch on packages/test.spec
@@ -1115,7 +1112,6 @@ fi; \
 #
 %__noautoreqfiles      %(sed -e s'/#.*//' /etc/rpm/noautoreqfiles)%{?_noautoreqfiles: %{_noautoreqfiles}}
 %__noautoprovfiles     %(sed -e s'/#.*//' /etc/rpm/noautoprovfiles)%{?_noautoprovfiles: %{_noautoprovfiles}}
-%__noautoreqdep                %(sed -e s'/#.*//' /etc/rpm/noautoreqdep)%{?_noautoreqdep: %{_noautoreqdep}}
 %__noautoprov          %(sed -e s'/#.*//' /etc/rpm/noautoprov) \
        %{?_noautoprov: %{_noautoprov}} \
        %{?_noautoprov_java: %{__noauto_regexp_helper -p java %{_noautoprov_java}}} \
@@ -1127,6 +1123,7 @@ fi; \
        %{nil}
 %__noautoreq           %(sed -e s'/#.*//' /etc/rpm/noautoreq) \
        %{?_noautoreq: %{_noautoreq}} \
+       %{?_noautoreqdep: %{_noautoreqdep}} \
        %{?_noautoreq_java: %{__noauto_regexp_helper -p java %{_noautoreq_java}}} \
        %{?_noautoreq_mono: %{__noauto_regexp_helper -p mono %{_noautoreq_mono}}} \
        %{?_noautoreq_pear: %{__noauto_regexp_helper -p pear %{_noautoreq_pear}}} \
@@ -1135,6 +1132,27 @@ fi; \
        %{?_noautoreq_py3egg: %{__noauto_regexp_helper -p python3egg %{_noautoreq_py3egg}}} \
        %{nil}
 
+%__noautodep_helper() %(awk -v x="%*" 'BEGIN {
+       RS = "\n([ \t]+\n)+";
+       FS = " ";
+       split(x, F);
+       if (length(F) > 0) {
+               printf("(");
+               for (i=1; i<=length(F); i++) {
+                       s = F[i];
+                       sub(/#.*/, "z&z", s);
+                       if (s ~ /^$/) { continue; };
+                       printf(s);
+                       if (i != length(F)) { printf("|"); };
+               };
+               printf(")");
+       }
+}')
+%__requires_exclude_from       %{__noautodep_helper %{__noautoreqfiles}}%{nil}
+%__provides_exclude_from       %{__noautodep_helper %{__noautoprovfiles}}%{nil}
+%__requires_exclude                    %{__noautodep_helper %{__noautoreq}}%{nil}
+%__provides_exclude                    %{__noautodep_helper %{__noautoprov}}%{nil}
+
 # helper for wrapping _noautoreq between perl() or pear()
 # Author: Elan Ruusamäe <glen@pld-linux.org>
 # Usage: