2016-06-09 07:49:24 +00:00
|
|
|
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_of_Additional_RPM_Macros
|
|
|
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
|
|
|
|
|
|
|
%global rrcdir %_libexecdir
|
|
|
|
|
|
|
|
Summary: Multilib packaging helpers
|
|
|
|
Name: multilib-rpm-config
|
|
|
|
Version: 1
|
2022-01-20 20:39:05 +00:00
|
|
|
Release: 19%{?dist}
|
2016-06-09 07:49:24 +00:00
|
|
|
License: GPLv2+
|
2017-04-07 11:52:09 +00:00
|
|
|
|
|
|
|
# TODO: resolve directly in rpm/redhat-rpm-config (instead of this hack).
|
|
|
|
# Note that to avoid FTBFS against plain RHEL6, we can't put this hack before
|
|
|
|
# License tag.
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
2016-06-09 07:49:24 +00:00
|
|
|
URL: https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks
|
|
|
|
|
2016-06-22 11:21:54 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
|
2016-06-09 07:49:24 +00:00
|
|
|
Source0: multilib-fix
|
|
|
|
Source1: macros.ml
|
|
|
|
Source2: README
|
|
|
|
Source3: COPYING
|
2016-06-22 09:07:22 +00:00
|
|
|
Source4: multilib-library
|
|
|
|
Source5: multilib-info
|
2016-06-09 07:49:24 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
# Most probably we want to move everything here?
|
|
|
|
Requires: redhat-rpm-config
|
|
|
|
|
|
|
|
%description
|
|
|
|
Set of tools (shell scripts, RPM macro files) to help with multilib packaging
|
|
|
|
issues.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -c -T
|
|
|
|
install -m 644 %{SOURCE2} %{SOURCE3} .
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%global ml_fix %rrcdir/multilib-fix
|
2016-06-22 09:07:22 +00:00
|
|
|
%global ml_info %rrcdir/multilib-info
|
|
|
|
|
|
|
|
lib_sed_pattern='/@LIB@/ {
|
|
|
|
r %{SOURCE4}
|
|
|
|
d
|
|
|
|
}'
|
|
|
|
|
2016-06-09 07:49:24 +00:00
|
|
|
sed -e 's|@ML_FIX@|%ml_fix|g' \
|
2016-06-22 09:07:22 +00:00
|
|
|
-e 's|@ML_INFO@|%ml_info|g' \
|
2016-06-09 07:49:24 +00:00
|
|
|
%{SOURCE1} > macros.multilib
|
2016-06-22 09:07:22 +00:00
|
|
|
sed -e "$lib_sed_pattern" \
|
|
|
|
%{SOURCE0} > multilib-fix
|
|
|
|
sed -e "$lib_sed_pattern" \
|
|
|
|
%{SOURCE5} > multilib-info
|
2016-06-09 07:49:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{rrcdir}
|
|
|
|
mkdir -p %{buildroot}%{macrosdir}
|
|
|
|
install -m 644 -p macros.multilib %{buildroot}/%{macrosdir}
|
2016-06-22 09:07:22 +00:00
|
|
|
install -m 755 -p multilib-fix %{buildroot}/%{ml_fix}
|
|
|
|
install -m 755 -p multilib-info %{buildroot}/%{ml_info}
|
2016-06-09 07:49:24 +00:00
|
|
|
|
|
|
|
|
2016-06-22 11:21:54 +00:00
|
|
|
%check
|
|
|
|
mkdir tests ; cd tests
|
|
|
|
ml_fix="sh `pwd`/../multilib-fix --buildroot `pwd`"
|
|
|
|
capable="sh `pwd`/../multilib-info --multilib-capable"
|
|
|
|
|
|
|
|
mkdir template
|
|
|
|
cat > template/main.c <<EOF
|
|
|
|
#include "header.h"
|
|
|
|
int main () { call (); return 0; }
|
|
|
|
EOF
|
|
|
|
cat > template/header.h <<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
void call (void) { printf ("works!\n"); }
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cp -r template basic
|
|
|
|
gcc ./basic/main.c
|
|
|
|
./a.out
|
|
|
|
|
|
|
|
pwd
|
2016-07-01 22:02:44 +00:00
|
|
|
if `$capable`; then
|
2016-06-22 11:21:54 +00:00
|
|
|
cp -r template really-works
|
|
|
|
$ml_fix --file /really-works/header.h
|
|
|
|
gcc really-works/main.c
|
|
|
|
./a.out
|
|
|
|
test -f really-works/header-*.h
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r template other_arch
|
|
|
|
$ml_fix --file /other_arch/header.h --arch ppc64
|
|
|
|
test -f other_arch/header-*.h
|
|
|
|
|
|
|
|
cp -r template other_arch_fix
|
|
|
|
$ml_fix --file /other_arch_fix/header.h --arch ppc64p7
|
|
|
|
test -f other_arch_fix/header-ppc64.h
|
|
|
|
|
|
|
|
cp -r template aarch64-no-change
|
|
|
|
$ml_fix --file /aarch64-no-change/header.h --arch aarch64
|
|
|
|
test ! -f aarch64-no-change/header-*.h
|
|
|
|
|
|
|
|
test `$capable --arch x86_64` = true
|
|
|
|
test `$capable --arch aarch64` = false
|
|
|
|
test `$capable --arch ppc64p7` = true
|
|
|
|
|
|
|
|
|
2016-06-09 07:49:24 +00:00
|
|
|
%files
|
|
|
|
%license COPYING
|
|
|
|
%doc README
|
|
|
|
%{rrcdir}/*
|
|
|
|
%{macrosdir}/*
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-01-20 20:39:05 +00:00
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1-19
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2021-07-22 15:36:03 +00:00
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1-18
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-01-26 21:00:57 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1-17
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-07-28 08:38:37 +00:00
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1-16
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-01-29 14:18:26 +00:00
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1-15
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-07-25 17:57:18 +00:00
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1-14
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-02-01 11:42:24 +00:00
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1-13
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-07-13 11:11:03 +00:00
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1-12
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-06-14 21:31:19 +00:00
|
|
|
* Thu Jun 14 2018 Honza Horak <hhorak@redhat.com> - 1-11
|
|
|
|
- Add shebang to multilib-info
|
|
|
|
|
2018-02-08 03:30:16 +00:00
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1-10
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
2017-07-26 22:26:48 +00:00
|
|
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-9
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-04-07 11:52:09 +00:00
|
|
|
* Fri Apr 07 2017 Pavel Raiskup <praiskup@redhat.com> - 1-8
|
|
|
|
- fix FTBFS on plain RHEL6
|
|
|
|
|
2017-02-10 21:51:41 +00:00
|
|
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
2016-07-01 22:02:44 +00:00
|
|
|
* Fri Jul 01 2016 Yaakov Selkowitz <yselkowi@redhat.com> - 1-6
|
|
|
|
- Fix testsuite on non-multilib arches (#1352164)
|
|
|
|
|
2016-06-22 06:22:06 +00:00
|
|
|
* Wed Jun 22 2016 Pavel Raiskup <praiskup@redhat.com> - 1-5
|
|
|
|
- document why there is no need for '#else' in the replacement header
|
2016-06-22 11:21:54 +00:00
|
|
|
- add basic testsuite
|
2016-06-22 06:22:06 +00:00
|
|
|
|
2016-06-13 21:38:43 +00:00
|
|
|
* Mon Jun 13 2016 Pavel Raiskup <praiskup@redhat.com> - 1-4
|
2016-06-13 21:45:10 +00:00
|
|
|
- use '-' as a field separator by default
|
2016-06-13 21:38:43 +00:00
|
|
|
|
2016-06-09 07:49:24 +00:00
|
|
|
* Thu Jun 09 2016 Pavel Raiskup <praiskup@redhat.com> - 1-3
|
|
|
|
- package separately from redhat-rpm-config
|
|
|
|
|
|
|
|
* Fri Nov 27 2015 Pavel Raiskup <praiskup@redhat.com> - 1-2
|
|
|
|
- fix licensing in Sources
|
|
|
|
- allow undefined %%namespace
|
|
|
|
|
|
|
|
* Wed Nov 18 2015 Pavel Raiskup <praiskup@redhat.com> - 1-1
|
|
|
|
- initial packaging
|