From: Marcin Krol Date: Thu, 29 Oct 2020 21:32:17 +0000 (+0100) Subject: - PLD merge with rpm.org RPM support X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=9a710165b069622ace5c1c784494f2281db74256;p=packages%2Frpm-tld-macros.git - PLD merge with rpm.org RPM support --- diff --git a/attr.gstreamer b/attr.gstreamer new file mode 100644 index 0000000..02e23ae --- /dev/null +++ b/attr.gstreamer @@ -0,0 +1,2 @@ +%__gstreamer_provides %{_rpmconfigdir}/gstreamer.sh --provides --gst-inspect %__gst_inspect +#__gstreamer_requires %{_rpmconfigdir}/gstreamer.sh --requires diff --git a/attr.java b/attr.java index a3d1191..604b47c 100644 --- a/attr.java +++ b/attr.java @@ -1,3 +1,3 @@ -%__java_requires env RPM_BUILD_ROOT=%{buildroot} MIN_CLASSDATAVERSION=%{?java_min_classdataversion} %{_rpmhome}/java-find-requires +%__java_requires env RPM_BUILD_ROOT=%{buildroot} MIN_CLASSDATAVERSION=%{?java_min_classdataversion} %{_rpmconfigdir}/java-find-requires %__java_magic ^Java .* %__java_path \\.(jar|class)$ diff --git a/attr.kernel b/attr.kernel index 1ff88f8..2660d2a 100644 --- a/attr.kernel +++ b/attr.kernel @@ -1,3 +1,3 @@ -%__kernel_provides %{_rpmhome}/kmod-deps.sh --provides --modinfo %__modinfo -#__kernel_requires %{_rpmhome}/kmod-deps.sh --requires --modinfo %__modinfo +%__kernel_provides %{_rpmconfigdir}/kmod-deps.sh --provides --modinfo %__modinfo +#__kernel_requires %{_rpmconfigdir}/kmod-deps.sh --requires --modinfo %__modinfo %__kernel_path ^.*/lib/modules/.*\.ko(\.gz|\.xz)?$ diff --git a/attr.php b/attr.php index 2b739e4..a59d7f6 100644 --- a/attr.php +++ b/attr.php @@ -1,5 +1,5 @@ -%__php_provides %{_rpmhome}/php.prov +#__php_provides %{_rpmconfigdir}/php.prov # define 'php_req_new' in ~/.rpmmacros to use php version of req finder -%__php_requires env PHP_MIN_VERSION=%{?php_min_version} %{_rpmhome}/php.req%{?php_req_new:.php} +#__php_requires env PHP_MIN_VERSION=%{?php_min_version} %{_rpmconfigdir}/php.req%{?php_req_new:.php} %__php_magic ^PHP script.* %__php_path \\.php$ diff --git a/attr.ruby b/attr.ruby index f43d2ff..7aff0c2 100644 --- a/attr.ruby +++ b/attr.ruby @@ -1,4 +1,4 @@ -%__ruby_provides %{_rpmhome}/rubygems.rb --provides -%__ruby_requires %{_rpmhome}/rubygems.rb --requires +%__ruby_provides %{_rpmconfigdir}/rubygems.rb --provides +%__ruby_requires %{_rpmconfigdir}/rubygems.rb --requires %__ruby_magic ^[rR]uby script text.* %__ruby_path ^/usr/(share|lib|lib64|libx32)/(ruby|gems/specifications)/.* diff --git a/macros.gstreamer b/macros.gstreamer new file mode 100644 index 0000000..bf64a74 --- /dev/null +++ b/macros.gstreamer @@ -0,0 +1,3 @@ +# Gstreamer specific macro definitions. + +%__gst_inspect /usr/bin/gst-inspect-1.0 diff --git a/macros.kernel b/macros.kernel index 84d96b0..12f2f4c 100644 --- a/macros.kernel +++ b/macros.kernel @@ -1,7 +1,5 @@ # vim:ts=4 sw=4 noet ft=spec # Kernel specific macro definitions. -# To make use of these macros insert the following line into your spec file: -# %{load:%{_usrlibrpm}/macros.d/kernel} %__modinfo /sbin/modinfo diff --git a/macros.mimetype b/macros.mimetype deleted file mode 100644 index 5f67ab5..0000000 --- a/macros.mimetype +++ /dev/null @@ -1,7 +0,0 @@ -#------------------------------------------------------------------------ -# mimetype(...) configuration. -# -# Path to script to autogenerate mimetype(foo) provides, based on MimeType -# key from desktop files. -# -%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides diff --git a/macros.ruby b/macros.ruby index e0d309a..becda24 100644 --- a/macros.ruby +++ b/macros.ruby @@ -30,7 +30,7 @@ %ruby_ver_requires_eq %{nil} %ruby_mod_ver_requires_eq %{nil} -%__gem_helper %{_usrlibrpm}/gem_helper.rb +%__gem_helper %{_rpmconfigdir}/gem_helper.rb %gem_build(f:j:) \ %__gem_helper build \\\ diff --git a/macros.selinux b/macros.selinux new file mode 100644 index 0000000..f5f5934 --- /dev/null +++ b/macros.selinux @@ -0,0 +1,38 @@ +# SELinux specific macro definitions. + +# Desired selinux policy tree +%__policy_tree %{expand:%%global __policy_tree %{lua:\ +t="targeted"\ +f = io.open("/etc/selinux/config")\ +if f then\ + for l in f:lines() do\ + if "SELINUXTYPE=" == string.sub(l,0,12) then t=string.sub(l,13); end\ + end\ + f:close()\ +end\ +print (t)\ +}}%{__policy_tree} + +# Path to selinux file context patterns. +%__file_context_path /etc/selinux/%{__policy_tree}/contexts/files/file_contexts + +# +# Path to selinux file context patterns used to add +# RPMTAG_FILECONTEXTS to packages when building. +# +# Undefined, missing or %{nil} will disable. +%_build_file_context_path %{nil} + +# +# Path to selinux file context patterns used to set +# (or override package content) file contexts when installing. +# +# Undefined, missing or %{nil} will use package content (if available). +%_install_file_context_path %{__file_context_path} + +# +# Path to selinux file context patterns used to verify +# file contexts on file system. +# +# Undefined, missing or %{nil} will use package content (if available). +%_verify_file_context_path %{__file_context_path} diff --git a/macros.tld b/macros.tld index 2d0e896..7e26d8c 100644 --- a/macros.tld +++ b/macros.tld @@ -3,11 +3,203 @@ # TLD Linux rpm macros. # +%distribution TLD Linux +%vendor tld +%bugurl https://tld-linux.org/ +%disturl https://tld-linux.org/ +%disttag tld + +# TLD Linux Release for backward compatibility with PLD spec files +%pld_release ti + # can be used by builder script to check for version %rpm_build_macros {Revision} %epoch 0 -%x8664 x86_64 amd64 ia32e + +#============================================================================== +# ---- configure macros. note that most of these are inherited +# from the defaults. +# +%_sharedstatedir /var/lib +%_localstatedir /var +%_localedir %{_datadir}/locale +%_lispdir %{_datadir}/emacs/site-lisp +%_initddir %{_sysconfdir}/rc.d/init.d + +%_defaultdocdir %{_usr}/share/doc + +%_fmoddir %{_libdir}/gfortran/modules + +# Location of autoconf macros +%_aclocaldir %{expand:%%global _aclocaldir %(aclocal --print-ac-dir 2>/dev/null || echo ERROR)}%_aclocaldir + +# Location of omf files +%_omf_dest_dir %{expand:%%global _omf_dest_dir %(scrollkeeper-config --omfdir || echo ERROR)}%_omf_dest_dir + +# Location of pkgconfig files +%_pkgconfigdir /usr/%{_lib}/pkgconfig +# noarch pkgconfig files +%_npkgconfigdir /usr/share/pkgconfig + +# Location of desktop files +%_desktopdir /usr/share/applications +%_applnkdir ERROR:_applnkdir_is_obsolete_use_desktopdir_instead + +# Location of pixmaps for applnk/desktop files +%_pixmapsdir /usr/share/pixmaps + +# Location of themable icons for applnk/desktop files +%_iconsdir /usr/share/icons + +# Location of fonts directories +%_fontsdir /usr/share/fonts + +# Location of Gtk and associated libraries documentation +%_gtkdocdir %{_defaultdocdir}/gtk-doc/html + +# Location of KDE documentation +%_kdedocdir %{_defaultdocdir}/kde/HTML + +# unsermake script +%__unsermake /usr/share/unsermake/unsermake + +# Current date +%date %(LC_ALL=C date +"%a %b %d %Y") + +# Example files, programs, scripts... +%_examplesdir /usr/src/examples + +# SysV-style initscripts dir +%_initddir /etc/rc.d/init.d + +# Executed at after copying %doc to DOCDIR, with $DOCDIR set +# TODO: teach rpm.org that compressed %doc is the same thing as uncompressed +#__compress_doc %{_rpmconfigdir}/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'} + +%__os_install_post \ +%{__spec_install_post_strip}\ +%{__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}\ +%{__spec_install_post_perl_clean}\ +%{__arch_install_post}\ +%{nil} + +%__spec_install_post\ +%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\ +%{__arch_install_post}\ +%{__os_install_post}\ +%{nil} + +#--------------------------------------------------------------------- +# Template for debug information sub-package. +%_enable_debug_packages 1 + +%debug_package \ +%ifnarch noarch\ +%global __debug_package 1\ +%package debuginfo\ +Summary: Debug information for package %{name}\ +Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\ +Group: Development/Debug\ +Requires: filesystem-debuginfo >= 3.0-16\ +AutoReqProv: 0\ +%description debuginfo\ +This package provides debug information for package %{name}.\ +Debug information is useful when developing applications that use this\ +package or when debugging this package.\ +%description debuginfo -l pl.UTF-8\ +Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\ +Informacje te są przydatne przy rozwijaniu aplikacji używających tego\ +pakietu oraz przy odpluskwianiu samego pakietu.\ +%files debuginfo -f debugfiles.list\ +%defattr(-,root,root)\ +%endif\ +%{nil} + +#--------------------------------------------------------------------- +# Overwrite RPM macros with TLD specific one here. + +%__find /usr/bin/find +%__lua %{_bindir}/lua +%__rc %{_bindir}/rc +%__xar %{_bindir}/xar + +%_source_payload w9.gzdio +%_binary_payload w6.xzdio + +%_rpmfc_magic_path /usr/share/file/magic + +# provides don't obsolete +%_upgrade_tag name + +# Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps) +%_check_symlink_deps 0 + +# Do not generate executable() dependencies for scriptlets, +# as it may give false positives, for example: +# [ ! -x /bin/prog ] || /bin/prog +# will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case +# 0 - Use external generator +# 1 - Use internal generator if available +# 2 - Use __scriptlet_requires to process scriptlet dependencies +%_use_internal_dependency_generator 1 + +%_duplicate_files_terminate_build 1 +%_files_listed_twice_terminate_build 1 +%_unpackaged_files_terminate_build 0 +%_unpackaged_subdirs_terminate_build 0 + +# +# Export package NEVRA (stamped with install tid) info for HRMIB on this path. +# +# XXX Note: escaped %% for use in headerSprintf() +%_hrmib_path /var/cache/hrmib/%{___NVRA} + +#----------------------------------------------------------------- +# CFLAGS and LDFLAGS used to build + +%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}} +# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed. + +%debugcflags -O0 -g -Wall +%debugcppflags %{nil} +%debugldflags %{nil} + +%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc +%optcppflags %{nil} + +# common compilation flags +%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2 + +# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments +%Werror_cflags -Wformat -Werror=format-security + +# Use -Werror=trampolines to prevent GCC from generating code that require executable stack +%_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines +%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}} +%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} + +# arch macros +%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon geode +%x8664 x86_64 amd64 ia32e +%ppc ppc ppc7400 ppc7450 + +# avoid fdatasync syscall flood during database operations. +%__nofsync nofsync + +#--------------------------------------------------------------------- +# Expanded at end of %prep +# +%__chown_Rhf %{__chown} -Rhf +%__chgrp_Rhf %{__chgrp} -Rhf +%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root +%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root # compiler version %cc_version %{expand:%%global cc_version %(%{__cc} -dumpversion 2>/dev/null || echo 0.0)}%cc_version @@ -16,9 +208,11 @@ %__rm /bin/rm --interactive=never # Build system path macros. -%__autoconf autoconf %{?debug:-Wall} -%__automake automake -a -c -f --foreign +%__autoconf autoconf %{?debug:-Wall} +%__automake automake -a -c -f --foreign %__autopoint autopoint --force +%__aclocal aclocal +%__autoheader autoheader # add parallel build flags: -jN # jobs macro is available since 1.657 @@ -80,6 +274,12 @@ fi; \ )}%_topdir +%_tmppath %(echo "${TMPDIR:-/var/tmp}") +%tmpdir %{_tmppath} + +%_buildrootdir %{_tmppath} +%buildroot %{_buildrootdir}/%{name}-%{version}-%{_arch}-root-%(id -u -n) + # if %{_topdir}/SPECS exists, it's old style structure %_specdir %{expand:%%global _specdir %([ ! -d %{_topdir}/SPECS ] && echo %{_topdir}/%{name} || echo %{_topdir}/SPECS)}%_specdir %_sourcedir %{expand:%%global _sourcedir %([ ! -d %{_topdir}/SOURCES ] && echo %{_specdir} || echo %{_topdir}/SOURCES)}%_sourcedir @@ -261,7 +461,7 @@ %{?__cxx:CXX="${CXX:-%{__cxx}}"} \\\ CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\ %{__cmake} \\\ - -DCMAKE_VERBOSE_MAKEFILE=ON \\\ + -DCMAKE_VERBOSE_MAKEFILE=BOOL:ON \\\ -DCMAKE_BUILD_TYPE=%{!?debug:TLD}%{?debug:Debug} \\\ -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \\\ -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \\\ @@ -444,48 +644,6 @@ LC_ALL=C.UTF-8 %{__meson} \ %%prep\ %{nil} -# Location of autoconf macros -%_aclocaldir %{expand:%%global _aclocaldir %(aclocal --print-ac-dir 2>/dev/null || echo ERROR)}%_aclocaldir - -# Location of omf files -%_omf_dest_dir %{expand:%%global _omf_dest_dir %(scrollkeeper-config --omfdir || echo ERROR)}%_omf_dest_dir - -# Location of pkgconfig files -%_pkgconfigdir /usr/%{_lib}/pkgconfig -# noarch pkgconfig files -%_npkgconfigdir /usr/share/pkgconfig - -# Location of desktop files -%_desktopdir /usr/share/applications -%_applnkdir ERROR:_applnkdir_is_obsolete_use_desktopdir_instead - -# Location of pixmaps for applnk/desktop files -%_pixmapsdir /usr/share/pixmaps - -# Location of themable icons for applnk/desktop files -%_iconsdir /usr/share/icons - -# Location of fonts directories -%_fontsdir /usr/share/fonts - -# Location of Gtk and associated libraries documentation -%_gtkdocdir %{_defaultdocdir}/gtk-doc/html - -# Location of KDE documentation -%_kdedocdir %{_defaultdocdir}/kde/HTML - -# unsermake script -%__unsermake /usr/share/unsermake/unsermake - -# Current date -%date %(LC_ALL=C date +"%a %b %d %Y") - -# Example files, programs, scripts... -%_examplesdir /usr/src/examples - -# SysV-style initscripts dir -%_initddir /etc/rc.d/init.d - # If non-empty "debug" macro defined, add "dbg" suffix to release number %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm @@ -516,6 +674,17 @@ LC_ALL=C.UTF-8 %{__meson} \ Obsoletes: %{1} < %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} \ Provides: %{1} = %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} +# for package versions comparison (incl. cc_version or _rpmversion) +# BuildRequires: rpmbuild(macros) >= 1.749 +%_ver_lt() %(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -ne 2; echo $?) +%_ver_ge() %(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -eq 2; echo $?) + +# noarch subpackage helper +# BuildRequires: rpmbuild(macros) >= 1.752 +%noarchpackage \ +BuildArch: noarch \ +%{nil} + %apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api # sgml macros @@ -925,6 +1094,14 @@ fi; \ };} \ %{nil} +# BuildRequires: rpmbuild(macros) >= 1.751 +# Requires(post,postun): /usr/bin/texhash # if you want to ensure cache is updated +%texhash() {{ \ + umask 022; \ + /usr/bin/texhash >&2; \ +};} \ +%{nil} + #----------------------------------------------------------------- # post %install sequence: # - autodeps exceptions @@ -1218,10 +1395,10 @@ fi; start=$(expr $base + %1); end=$(expr $base + %{?2}%{!?2:%{1}}); # we need to call seq twice as it doesn't allow two formats - seq -f 'Patch%g:' $start $end > %{tmpdir}/__ps1; - seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{tmpdir}/__ps2; - paste %{tmpdir}/__ps{1,2}; - rm -f %{tmpdir}/__ps{1,2}; + seq -f 'Patch%g:' $start $end > %{_tmppath}/__ps1; + seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{_tmppath}/__ps2; + paste %{_tmppath}/__ps{1,2}; + rm -f %{_tmppath}/__ps{1,2}; } ) \ %{nil} @@ -1392,5 +1569,3 @@ end\ umask 022; \ /usr/bin/vim -c ':helptags /usr/share/vim/doc' -c ':q' 2>/dev/null \ %{nil} - -# EOF diff --git a/rpm-mimetypedeps b/rpm-mimetypedeps deleted file mode 100644 index 6c0176d..0000000 --- a/rpm-mimetypedeps +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -case $1 in --P|--provides) - while read filename; do - case "$filename" in - *.desktop) - mime=$(awk -F= '/^MimeType=/{print $2}' "$filename") - IFS=';' - for type in $mime; do - if [ -n "$type" ]; then - echo "mimetype($type)" - fi - done - ;; - esac - done - ;; -esac - -exit 0 diff --git a/rpm-tld-macros.spec b/rpm-tld-macros.spec index 63b5496..f08edbc 100644 --- a/rpm-tld-macros.spec +++ b/rpm-tld-macros.spec @@ -1,4 +1,4 @@ -%define rpm_macros_rev 1.747 +%define rpm_macros_rev 1.753 %define find_lang_rev 1.40 # split into individual X_prov_ver if there is a reason to desync %define prov_ver 4.15 @@ -6,7 +6,7 @@ Summary: TLD Linux RPM macros Summary(pl.UTF-8): Makra RPM dla Linuksa TLD Name: rpm-tld-macros Version: %{rpm_macros_rev} -Release: 3 +Release: 1.1 License: GPL v2+ Group: Development/Building Source0: macros.tld @@ -15,21 +15,22 @@ Source3: find-lang.sh Source4: dokuwiki-find-lang.sh Source5: macros.kernel Source6: attr.kernel +Source7: rpmrc Source8: rpm-compress-doc Source9: rpm-find-spec-bcond -Source10: attr.ruby -Source11: macros.ruby +Source10: macros.ruby +Source11: attr.ruby Source12: rubygems.rb Source13: gem_helper.rb -Source20: attr.java -Source21: macros.java +Source20: macros.java +Source21: attr.java Source22: rpm-java-requires Source23: eclipse-feature.xslt -Source30: attr.php -Source31: macros.php +Source30: macros.php +Source31: attr.php Source32: rpm-php-provides Source33: rpm-php-requires Source34: rpm-php-requires.php @@ -48,12 +49,18 @@ Source50: macros.upstart Source51: macros.webapp Source52: macros.xmms Source53: macros.xorg +Source54: macros.selinux -Source60: rpm-mimetypedeps -Source61: macros.mimetype +Source60: macros.gstreamer +Source61: attr.gstreamer BuildRequires: rpm >= 4.4.9-56 BuildRequires: sed >= 4.0 +Obsoletes: rpm-macros +# rm: option `--interactive' doesn't allow an argument +Conflicts: coreutils < 6.9 +# tmpdir/_tmppath macros problems; optcppflags missing +Conflicts: rpm < 4.4.9-72 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -70,16 +77,12 @@ Ten pakiet zawiera makra rpm-a dla Linuksa TLD. 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-macros -# rm: option `--interactive' doesn't allow an argument -Conflicts: coreutils < 6.9 Conflicts: gettext-devel < 0.11 -# tmpdir/_tmppath macros problems; optcppflags missing -Conflicts: rpm < 4.4.9-72 # macros.d/* Conflicts: rpm-build < 4.5-90 # php-config --sysconfdir @@ -176,27 +179,33 @@ fi %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_usrlibrpm}/{macros.d,tld} +install -d $RPM_BUILD_ROOT%{_usrlibrpm}/{fileattrs,macros.d,tld} + +cp -p macros.tld $RPM_BUILD_ROOT%{_usrlibrpm}/tld/macros +cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_usrlibrpm}/tld/rpmrc -cp -p macros.tld $RPM_BUILD_ROOT%{_usrlibrpm}/macros.build cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_usrlibrpm}/compress-doc cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_usrlibrpm}/find-spec-bcond -cat %{SOURCE5} %{SOURCE6} >$RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.kernel +cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.kernel +cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/kernel.attr -install -p service_generator.sh $RPM_BUILD_ROOT%{_usrlibrpm} -install -p %{SOURCE3} $RPM_BUILD_ROOT%{_usrlibrpm}/find-lang.sh -install -p %{SOURCE4} $RPM_BUILD_ROOT%{_usrlibrpm}/dokuwiki-find-lang.sh +cp -p service_generator.sh $RPM_BUILD_ROOT%{_usrlibrpm} +cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_usrlibrpm}/find-lang.sh +cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_usrlibrpm}/dokuwiki-find-lang.sh -cat %{SOURCE11} %{SOURCE10} >$RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.ruby -install -p %{SOURCE12} $RPM_BUILD_ROOT%{_usrlibrpm}/rubygems.rb -install -p %{SOURCE13} $RPM_BUILD_ROOT%{_usrlibrpm}/gem_helper.rb +cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.ruby +cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/ruby.attr +cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_usrlibrpm}/rubygems.rb +cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_usrlibrpm}/gem_helper.rb -cat %{SOURCE21} %{SOURCE20} >$RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.java -install %{SOURCE22} $RPM_BUILD_ROOT%{_usrlibrpm}/java-find-requires -install %{SOURCE23} $RPM_BUILD_ROOT%{_usrlibrpm}/eclipse-feature.xslt +cp -p %{SOURCE20} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.java +cp -p %{SOURCE21} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/java.attr +cp -p %{SOURCE22} $RPM_BUILD_ROOT%{_usrlibrpm}/java-find-requires +cp -p %{SOURCE23} $RPM_BUILD_ROOT%{_usrlibrpm}/eclipse-feature.xslt -cat %{SOURCE31} %{SOURCE30} >$RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.php +cp -p %{SOURCE30} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.php +cp -p %{SOURCE31} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/php.attr cp -p %{SOURCE32} $RPM_BUILD_ROOT%{_usrlibrpm}/php.prov cp -p %{SOURCE33} $RPM_BUILD_ROOT%{_usrlibrpm}/php.req cp -p %{SOURCE34} $RPM_BUILD_ROOT%{_usrlibrpm}/php.req.php @@ -215,41 +224,53 @@ cp -p %{SOURCE50} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.upstart cp -p %{SOURCE51} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.webapp cp -p %{SOURCE52} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.xmms cp -p %{SOURCE53} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.xorg +cp -p %{SOURCE54} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.selinux -cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/mimetypedeps.sh -cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.mimetype +cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.gstreamer +cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/gstreamer.attr %clean rm -rf $RPM_BUILD_ROOT +%files +%defattr(644,root,root,755) +%{_usrlibrpm}/tld/macros +%{_usrlibrpm}/tld/rpmrc + %files build %defattr(644,root,root,755) -%{_usrlibrpm}/macros.build +%{_usrlibrpm}/fileattrs/java.attr +%{_usrlibrpm}/fileattrs/gstreamer.attr +%{_usrlibrpm}/fileattrs/kernel.attr +%{_usrlibrpm}/fileattrs/php.attr +%{_usrlibrpm}/fileattrs/ruby.attr + %{_usrlibrpm}/macros.d/macros.browser-plugins %{_usrlibrpm}/macros.d/macros.cacti %{_usrlibrpm}/macros.d/macros.emacs %{_usrlibrpm}/macros.d/macros.ghc +%{_usrlibrpm}/macros.d/macros.gstreamer %{_usrlibrpm}/macros.d/macros.java %{_usrlibrpm}/macros.d/macros.kernel -%{_usrlibrpm}/macros.d/macros.mimetype %{_usrlibrpm}/macros.d/macros.nagios %{_usrlibrpm}/macros.d/macros.openldap %{_usrlibrpm}/macros.d/macros.perl %{_usrlibrpm}/macros.d/macros.php %{_usrlibrpm}/macros.d/macros.python %{_usrlibrpm}/macros.d/macros.ruby +%{_usrlibrpm}/macros.d/macros.selinux %{_usrlibrpm}/macros.d/macros.systemd %{_usrlibrpm}/macros.d/macros.tcl %{_usrlibrpm}/macros.d/macros.upstart %{_usrlibrpm}/macros.d/macros.webapp %{_usrlibrpm}/macros.d/macros.xmms %{_usrlibrpm}/macros.d/macros.xorg -%attr(755,root,root) %{_usrlibrpm}/service_generator.sh -%attr(755,root,root) %{_usrlibrpm}/find-lang.sh -%attr(755,root,root) %{_usrlibrpm}/dokuwiki-find-lang.sh + %attr(755,root,root) %{_usrlibrpm}/compress-doc +%attr(755,root,root) %{_usrlibrpm}/dokuwiki-find-lang.sh +%attr(755,root,root) %{_usrlibrpm}/find-lang.sh %attr(755,root,root) %{_usrlibrpm}/find-spec-bcond -%attr(755,root,root) %{_usrlibrpm}/mimetypedeps.sh +%attr(755,root,root) %{_usrlibrpm}/service_generator.sh %files rubyprov %defattr(644,root,root,755) diff --git a/rpmrc b/rpmrc new file mode 100644 index 0000000..8957083 --- /dev/null +++ b/rpmrc @@ -0,0 +1,76 @@ +include: /usr/lib/rpm/rpmrc + +############################################################# +# Values for RPM_OPT_FLAGS for various platforms + +optflags: alpha %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee %{!?nospecflags:%{?specflags_alpha}} +optflags: alphaev5 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee -mcpu=ev5 %{!?nospecflags:%{?specflags_alpha} %{?specflags_alphaev5}} +optflags: alphaev56 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee -mcpu=ev56 %{!?nospecflags:%{?specflags_alpha} %{?specflags_alphaev56}} +optflags: alphaev6 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee -mcpu=ev6 %{!?nospecflags:%{?specflags_alpha} %{?specflags_alphaev6}} +optflags: alphaev67 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee -mcpu=ev67 %{!?nospecflags:%{?specflags_alpha} %{?specflags_alphaev67}} +optflags: alphapca56 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -mieee -mcpu=pca56 %{!?nospecflags:%{?specflags_alpha} %{?specflags_alphapca56}} + +optflags: aarch64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} %{!?nospecflags:%{?specflags_aarch64}} +optflags: riscv64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=rv64imafdc -mabi=lp64d %{!?nospecflags:%{?specflags_riscv64}} + +optflags: armv6j %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=armv6j -mfpu=vfp -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm6j}} +optflags: armv7l %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 %{!?nospecflags:%{?specflags_arm} %{?specflags_arm7l}} +optflags: armv7hl %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=armv7-a -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm7hl}} +optflags: armv7hnl %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} %{?!_disable_neon:-mfpu=neon-vfpv4} -march=armv7-a -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm7hnl}} +optflags: armv8l %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 %{!?nospecflags:%{?specflags_arm} %{?specflags_arm8l}} +optflags: armv8hl %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=armv8-a -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm8hl}} +optflags: armv8hnl %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} %{?!_disable_neon:-mfpu=neon-vfpv4} -march=armv8-a -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm8hnl}} +optflags: armv8hcnl %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} %{?!_disable_neon:-mfpu=neon-vfpv4} -march=armv8-a+crypto -mfloat-abi=hard %{!?nospecflags:%{?specflags_arm} %{?specflags_arm8hcnl}} + +optflags: athlon %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=athlon -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_athlon}} +optflags: geode %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=geode -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_geode}} +optflags: i386 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i386 -mtune=generic -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32:} %{?specflags_i386}} +optflags: i486 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i486 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_i486}} +optflags: i586 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer -mtune=generic}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=i586 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_i586}} +optflags: i686 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32 -mtune=generic} -march=i686 -fasynchronous-unwind-tables -mtune=pentium4 %{!?nospecflags:%{?specflags_ia32} %{?specflags_i686}} +optflags: pentium3 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=pentium3 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_pentium3}} +optflags: pentium4 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g -m32} -march=pentium4 -fasynchronous-unwind-tables %{!?nospecflags:%{?specflags_ia32} %{?specflags_pentium4}} + +optflags: ia64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} %{!?nospecflags:%{?specflags_ia64}} + +optflags: mips %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=mips3 %{!?nospecflags:%{?specflags_mips}} +optflags: mipsel %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fomit-frame-pointer}%{!?__common_cflags_with_ssp:-O2 -g} -march=mips3 -mtune=loongson2f %{!?nospecflags:%{?specflags_mipsel}} + +optflags: ppc64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m64 -mminimal-toc %{!?nospecflags:%{?specflags_ppc64}}} +optflags: ppc64iseries %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m64 -mminimal-toc %{!?nospecflags:%{?specflags_ppc64}}} +optflags: ppc64pseries %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m64 -mminimal-toc %{!?nospecflags:%{?specflags_ppc64}}} +optflags: ppc %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m32 -fsigned-char %{!?nospecflags:%{?specflags_ppc}}} +optflags: ppciseries %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m32 %{!?nospecflags:%{?specflags_ppc}}} +optflags: ppcpseries %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m32 %{!?nospecflags:%{?specflags_ppc}}} + +optflags: s390 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m31 %{!?nospecflags:%{?specflags_s390}} +optflags: s390x %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m64 %{!?nospecflags:%{?specflags_s390x}} + +optflags: sparc %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m32 -mcpu=v7 -mtune=ultrasparc %{!?nospecflags:%{?specflags_sparc}} +optflags: sparcv9 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m32 -mcpu=ultrasparc %{!?nospecflags:%{?specflags_sparc}} +optflags: sparc64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g} -m64 -mcpu=ultrasparc %{!?nospecflags:%{?specflags_sparc64}} + +optflags: x32 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -mx32} -mtune=generic -march=x86-64 %{!?nospecflags:%{?specflags_x32}} + +optflags: amd64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64} -march=x86-64 -mtune=generic %{!?nospecflags:%{?specflags_x86_64}} +optflags: ia32e %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64} -march=x86-64 -mtune=generic %{!?nospecflags:%{?specflags_x86_64}} +optflags: x86_64 %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-O2 -g -m64} -march=x86-64 -mtune=generic %{!?nospecflags:%{?specflags_x86_64}} + +############################################################# +# For a given uname().machine, the default build arch + +buildarchtranslate: athlon: i686 +buildarchtranslate: geode: i686 +buildarchtranslate: i386: i686 +buildarchtranslate: i486: i686 +buildarchtranslate: i586: i686 +buildarchtranslate: pentium3: i686 +buildarchtranslate: pentium4: i686 + +buildarchtranslate: amd64: x86_64 +buildarchtranslate: ia32e: x86_64 + +buildarchtranslate: armv7hl: armv7hnl +buildarchtranslate: armv8hl: armv7hnl +buildarchtranslate: armv8hnl: armv7hnl +buildarchtranslate: armv8hcnl: armv7hnl