]> git.pld-linux.org Git - packages/rpm-pld-macros.git/blobdiff - macros.pld
- find_lang 1.42: allow three-letter language codes for *.qm
[packages/rpm-pld-macros.git] / macros.pld
index 4b44357e7a641c5a9331bb0ed0175a5f0bad4739..7f9df34d3cf6e3adae4a18f6692da292426be40a 100644 (file)
@@ -25,6 +25,8 @@
 %_lispdir                      %{_datadir}/emacs/site-lisp
 %_initddir                     %{_sysconfdir}/rc.d/init.d
 
+%_metainfodir  %{_datadir}/metainfo
+
 %_defaultdocdir                %{_usr}/share/doc
 
 %_fmoddir              %{_libdir}/gfortran/modules
@@ -193,7 +195,7 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 %debugcppflags %{nil}
 %debugldflags  %{nil}
 
-%optldflags    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
+%optldflags    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}}
 %optcppflags   %{nil}
 
 # common compilation flags
@@ -249,7 +251,7 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 %__make                /usr/bin/make %{?_make_opts} %{?_smp_mflags}
 %__scons       /usr/bin/scons %{?_smp_mflags}
 %__waf         /usr/bin/waf %{?_smp_mflags}
-%__cmake       /usr/bin/cmake -Wno-dev
+%__cmake       /usr/bin/cmake
 %__meson       /usr/bin/meson
 %__meson_wrap_mode     nodownload
 %__ninja       /usr/bin/ninja
@@ -281,10 +283,10 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
        elif [ -d $HOME/rpm/SPECS -a -d $HOME/rpm/SOURCES ]; then \
                # if old style rpm dir exist, go with it
                echo $HOME/rpm; \
-       elif [ -x ../builder -a ! -d ../builder ]; then
+       elif [ -x ../builder -a ! -d ../builder ] && [ "$(realpath -s ../builder)" != "/usr/bin/builder" ]; then
                # relative new style rpmdir: in package dir
                cd ..; pwd
-       elif [ -x builder -a ! -d builder ]; then
+       elif [ -x builder -a ! -d builder ] && [ "$(realpath -s builder)" != "/usr/bin/builder" ]; then
                # relative new style rpmdir: in packages
                pwd
        elif [ -x packages/builder -a ! -d packages/builder ]; then
@@ -485,6 +487,14 @@ CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\
 %{__cmake} \\\
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
        -DCMAKE_BUILD_TYPE=%{!?debug:PLD}%{?debug:Debug} \\\
+       -DCMAKE_SYSTEM_NAME=Linux \\\
+       -DCMAKE_SYSTEM_VERSION="%(uname -r)" \\\
+       -DCMAKE_CROSSCOMPILING:BOOL=FALSE \\\
+%ifarch x32\
+       -DCMAKE_SYSTEM_PROCESSOR=x86_64 \\\
+%else\
+       -DCMAKE_SYSTEM_PROCESSOR=%{_target_cpu} \\\
+%endif\
        -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \\\
        -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \\\
        -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \\\
@@ -549,6 +559,8 @@ CFLAGS="${CFLAGS:-%{rpmcflags}}" \
 CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \
 CXXFLAGS="${CXXFLAGS:-%{rpmcxxflags}}" \
 LDFLAGS="${LDFLAGS:-%{rpmldflags}}" \
+RUSTC="${RUSTC:-%{__rustc}}" \
+RUSTFLAGS="${RUSTFLAGS:-%{rpmrustflags} --target %rust_target}" \
 LC_ALL=C.UTF-8 %{__meson} \
        --buildtype=plain \
        --bindir=%{_bindir} \
@@ -689,12 +701,12 @@ LC_ALL=C.UTF-8 %{__meson} \
 # Requires: name = version
 %requires_eq()         %{!?1:ERROR}%{?2:ERROR}%{?1:%{!?2:%{expand:%%requires_eq_to %1 %1}}}
 # Requires: name = version (version based on querying package %2)
-%requires_eq_to(r)     %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(if ! LC_ALL=C rpm -q --qf 'Requires: %1 = %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2 | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
+%requires_eq_to(r)     %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(if ! LC_ALL=C rpm -q --whatprovides --qf 'Requires: %1 = %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2 | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
 
 # Requires: name >= version
 %requires_ge()         %{!?1:ERROR}%{?2:ERROR}%{?1:%{!?2:%{expand:%%requires_ge_to %1 %1}}}
 # Requires: name >= version (version based on querying package %2)
-%requires_ge_to(r)     %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(if ! LC_ALL=C rpm -q --qf 'Requires: %1 >= %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2 | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
+%requires_ge_to(r)     %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(if ! LC_ALL=C rpm -q --whatprovides --qf 'Requires: %1 >= %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2 | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
 
 # helper for renaming packages
 # %rename old-package
@@ -1179,10 +1191,12 @@ fi; \
        %{?_noautoreq_py3egg: %{__noauto_regexp_helper -p python3egg %{_noautoreq_py3egg}}} \
        %{nil}
 
-%__noautodep_helper() %(awk -v x="%*" 'BEGIN {
+%__noautodep_helper() %(echo '%*' | awk 'BEGIN {
        RS = "\n([ \t]+\n)+";
        FS = " ";
-       split(x, F);
+}
+{
+       split($0, F);
        if (length(F) > 0) {
                printf("(");
                for (i=1; i<=length(F); i++) {
@@ -1221,7 +1235,7 @@ fi; \
 # %define _noautoprov_pyegg excluded
 # %define _noautoprov_py3egg excluded3
 #
-%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}%{__qchar}(%%s%{__qchar}) ", $1)}')
+%__noauto_regexp_helper(p:) %(echo '%*' | awk 'BEGIN{RS=" "}{printf("%{-p*}%{__qchar}(%%s%{__qchar}) ", $1)}')
 # detect quote character runtime
 %__qchar_4 \\\\%{nil}
 %__qchar_5 \\\\\\%{nil}
This page took 0.079586 seconds and 4 git commands to generate.