From: Marcin Krol Date: Sun, 6 Nov 2022 15:12:44 +0000 (+0100) Subject: - merged 2.019 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=cf003b2dfbe72b28f3fb8108f24290b760365f24;p=packages%2Frpm-tld-macros.git - merged 2.019 from PLD --- diff --git a/attr.mono b/attr.mono new file mode 100644 index 0000000..b9960d4 --- /dev/null +++ b/attr.mono @@ -0,0 +1,3 @@ +%__mono_provides %{_rpmconfigdir}/mono-find-provides +%__mono_requires %{_rpmconfigdir}/mono-find-requires +%__mono_magic Mono/.Net assembly diff --git a/find-lang.sh b/find-lang.sh index 3e13e14..fa120e8 100755 --- a/find-lang.sh +++ b/find-lang.sh @@ -36,7 +36,7 @@ # * start support for KDE help files PROG=${0##*/} -VERSION=1.40 +VERSION=1.41 usage () { cat <&2 "$PROG: Enabling with Dokuwiki" + shift + ;; --with-gnome) GNOME='' echo >&2 "$PROG: Enabling with GNOME" @@ -156,6 +163,12 @@ while test $# -gt 0; do esac done +if $DOKUWIKI; then + exec /usr/lib/rpm/dokuwiki-find-lang.sh "$TOP_DIR" "$NAME" + echo >&2 "$PROG: ERROR: Unable to execute dokuwiki-find-lang" + exit 2 +fi + echo >&2 "$PROG/$VERSION: find-lang '$NAME' $APPEND> $OUTPUT" MO_NAME=.$OUTPUT.tmp~ diff --git a/kmod-deps.sh b/kmod-deps.sh index a78598b..c9bee5e 100755 --- a/kmod-deps.sh +++ b/kmod-deps.sh @@ -3,7 +3,7 @@ # Kernel module dependency extractor. # # Author(s): Danny Tholen -# Olivier Blin +# Olivier Blin # Per Øyvind Karlsen # @@ -34,7 +34,7 @@ fi if [ $provides -eq 1 ]; then provideslist=`sed "s/['\"]/\\\&/g"` - modulelist=$(echo "$provideslist" | egrep '^.*(/lib/modules/|/var/lib/dkms/).*\.ko(\.gz|\.xz)?$') + modulelist=$(echo "$provideslist" | grep -E '^.*(/lib/modules/|/var/lib/dkms/).*\.ko(\.gz|\.xz)?$') echo $modulelist | xargs -r $modinfo | \ perl -lne ' $name = $1 if m!^filename:\s*(?:.*/)?([^/]+)\.k?o!; @@ -45,7 +45,7 @@ if [ $provides -eq 1 ]; then undef $name; undef $ver; } ' - dkmslist=$(echo "$provideslist" | egrep '(/var/lib/dkms-binary/[^/]+/[^/]+|/usr/src)/[^/]+/dkms.conf$') + dkmslist=$(echo "$provideslist" | grep -E '(/var/lib/dkms-binary/[^/]+/[^/]+|/usr/src)/[^/]+/dkms.conf$') [ -n "$dkmslist" ] && for d in $dkmslist; do VERSION=`sed -rne 's/^PACKAGE_VERSION="?([^"]+)"?$/\1/;T;p' $d` [ -z "$VERSION" ] && continue diff --git a/macros.kernel b/macros.kernel index 40cb813..8aa96bb 100644 --- a/macros.kernel +++ b/macros.kernel @@ -112,12 +112,12 @@ done) if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \ tool=$(%{kmod_compress_cmd} --version | head -n1); \ case "$tool" in gzip*) ext=gz;; xz*) ext=xz;; esac; \ - q=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type f -print); \ + q=$(find $RPM_BUILD_ROOT/lib/modules -name '*.ko' -type f -print); \ if [ "$q" ]; then \ printf "Compress %d kernel modules..." $(echo "$q" | wc -l); \ echo "$q" | xargs -r %{kmod_compress_cmd}; \ echo "DONE"; \ - find $RPM_BUILD_ROOT/lib/modules -name '*o' -type l -printf "%p %l\n" | \ + find $RPM_BUILD_ROOT/lib/modules -name '*.ko' -type l -printf "%p %l\n" | \ while read a b; do ln -sf $b.$ext $a.$ext; rm -f $a; done; \ fi; \ fi; \ diff --git a/macros.qt b/macros.qt new file mode 100644 index 0000000..bc6b347 --- /dev/null +++ b/macros.qt @@ -0,0 +1,23 @@ +%_qt5_qmake /usr/bin/qmake-qt5 +%qmake_qt5 %{_qt5_qmake} \\\ + %{?__cc:QMAKE_CC="%{__cc}"} \\\ + %{?__cxx:QMAKE_CXX="%{__cxx}"} \\\ + QMAKE_CFLAGS_RELEASE="${CFLAGS:-%rpmcflags %rpmcppflags}" \\\ + QMAKE_CFLAGS_DEBUG="${CFLAGS:-%rpmcflags %rpmcppflags}" \\\ + QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%rpmcxxflags %rpmcppflags}" \\\ + QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%rpmcxxflags %rpmcppflags}" \\\ + QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%rpmldflags}" \\\ + QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%rpmldflags}" \\\ +%{nil} + +%_qt6_qmake /usr/bin/qmake-qt6 +%qmake_qt6 %{_qt6_qmake} \\\ + %{?__cc:QMAKE_CC="%{__cc}"} \\\ + %{?__cxx:QMAKE_CXX="%{__cxx}"} \\\ + QMAKE_CFLAGS_RELEASE="${CFLAGS:-%rpmcflags %rpmcppflags}" \\\ + QMAKE_CFLAGS_DEBUG="${CFLAGS:-%rpmcflags %rpmcppflags}" \\\ + QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%rpmcxxflags %rpmcppflags}" \\\ + QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%rpmcxxflags %rpmcppflags}" \\\ + QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%rpmldflags}" \\\ + QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%rpmldflags}" \\\ +%{nil} diff --git a/macros.rust b/macros.rust index 9ad61a0..51f8fe4 100644 --- a/macros.rust +++ b/macros.rust @@ -1,4 +1,4 @@ -%debuginforustflags -C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}} +%debuginforustflags -C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}} -C strip=none %rpmrustflags %debuginforustflags %rust_arches %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl @@ -42,6 +42,7 @@ thumbv7neon-unknown-linux-gnueabihf\\\ CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \\\ LDFLAGS="%{rpmldflags}" \\\ PKG_CONFIG_ALLOW_CROSS=1 \\\ + %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"} \\\ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\ %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\ %{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\ diff --git a/macros.tld b/macros.tld index 307702c..f12b3d5 100644 --- a/macros.tld +++ b/macros.tld @@ -282,10 +282,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 @@ -690,12 +690,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 @@ -1156,10 +1156,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++) { @@ -1198,7 +1200,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} diff --git a/rpm-tld-macros.spec b/rpm-tld-macros.spec index 9649c7c..97feaee 100644 --- a/rpm-tld-macros.spec +++ b/rpm-tld-macros.spec @@ -1,12 +1,12 @@ -%define rpm_macros_rev 2.013 -%define find_lang_rev 1.40 +%define rpm_macros_rev 2.019 +%define find_lang_rev 1.41 # split into individual X_prov_ver if there is a reason to desync %define prov_ver 4.15 Summary: TLD Linux RPM macros Summary(pl.UTF-8): Makra RPM dla Linuksa TLD Name: rpm-tld-macros Version: %{rpm_macros_rev} -Release: 1 +Release: 5 License: GPL v2+ Group: Development/Building Source0: macros.tld @@ -53,14 +53,16 @@ Source54: macros.selinux Source55: macros.rust Source56: macros.arch Source57: macros.go +Source58: macros.qt Source60: macros.gstreamer Source61: attr.gstreamer Source62: kmod-deps.sh +Source63: attr.mono BuildRequires: rpm >= 4.4.9-56 BuildRequires: sed >= 4.0 -Obsoletes: rpm-macros +Obsoletes: rpm-macros < 1.254 # rm: option `--interactive' doesn't allow an argument Conflicts: coreutils < 6.9 # tmpdir/_tmppath macros problems; optcppflags missing @@ -80,12 +82,11 @@ Ten pakiet zawiera makra rpm-a dla Linuksa TLD. %package build Summary: TLD Linux RPM build macros Summary(pl.UTF-8): Makra do budowania pakietów RPM dla Linuksa TLD -Group: Development/Building Requires: %{name} = %{version}-%{release} Requires: findutils >= 1:4.2.26 Provides: rpmbuild(find_lang) = %{find_lang_rev} Provides: rpmbuild(macros) = %{rpm_macros_rev} -Obsoletes: rpm-build-macros +Obsoletes: rpm-build-macros < 1.745 Conflicts: gettext-devel < 0.11 # macros.d/* Conflicts: rpm-build < 4.5-90 @@ -233,9 +234,11 @@ cp -p %{SOURCE54} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.selinux cp -p %{SOURCE55} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.rust cp -p %{SOURCE56} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.arch cp -p %{SOURCE57} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.go +cp -p %{SOURCE58} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.qt cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.gstreamer cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/gstreamer.attr +cp -p %{SOURCE63} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/mono.attr %clean rm -rf $RPM_BUILD_ROOT @@ -250,6 +253,7 @@ rm -rf $RPM_BUILD_ROOT %{_usrlibrpm}/fileattrs/java.attr %{_usrlibrpm}/fileattrs/gstreamer.attr %{_usrlibrpm}/fileattrs/kernel.attr +%{_usrlibrpm}/fileattrs/mono.attr %{_usrlibrpm}/fileattrs/php.attr %{_usrlibrpm}/fileattrs/ruby.attr @@ -267,6 +271,7 @@ rm -rf $RPM_BUILD_ROOT %{_usrlibrpm}/macros.d/macros.perl %{_usrlibrpm}/macros.d/macros.php %{_usrlibrpm}/macros.d/macros.python +%{_usrlibrpm}/macros.d/macros.qt %{_usrlibrpm}/macros.d/macros.ruby %{_usrlibrpm}/macros.d/macros.rust %{_usrlibrpm}/macros.d/macros.selinux