mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
parent
6f7eba4f1a
commit
27c61da6df
12
bare/config/textproc/gsed-4.8.cfg
Normal file
12
bare/config/textproc/gsed-4.8.cfg
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# GNU sed 4.8
|
||||||
|
#
|
||||||
|
|
||||||
|
%include %{_configdir}/base.cfg
|
||||||
|
|
||||||
|
%define gsed_version 4.8
|
||||||
|
|
||||||
|
%hash sha512 sed-%{gsed_version}.tar.gz \
|
||||||
|
C94KIhaOMQCwIUKTsTu6CEzM5F/7WGtsV1OPUY52akRDn/vyR4mPK7j1BtBTHTbynAp7cIhJVbqTz8/YhjG/eQ==
|
||||||
|
|
||||||
|
%include %{_configdir}/gsed-1.cfg
|
12
bare/config/textproc/gsed-internal.bset
Normal file
12
bare/config/textproc/gsed-internal.bset
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Internal GNU sed
|
||||||
|
#
|
||||||
|
|
||||||
|
%define _internal_gsed yes
|
||||||
|
%define _internal_gsed_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
|
||||||
|
%define _disable_collecting yes
|
||||||
|
%define _disable_packaging yes
|
||||||
|
%define _disable_reporting yes
|
||||||
|
%define _disable_installing yes
|
||||||
|
|
||||||
|
%include textproc/gsed.bset
|
4
bare/config/textproc/gsed.bset
Normal file
4
bare/config/textproc/gsed.bset
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# GNU sed
|
||||||
|
#
|
||||||
|
textproc/gsed.cfg
|
8
bare/config/textproc/gsed.cfg
Normal file
8
bare/config/textproc/gsed.cfg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# GNU sed has a version option, check for it.
|
||||||
|
# If not found build it.
|
||||||
|
#
|
||||||
|
%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)
|
||||||
|
%if %{has_gnu_sed} != 0
|
||||||
|
%include %{_configdir}/textproc/gsed-4.8.cfg
|
||||||
|
%endif
|
108
source-builder/config/gsed-1.cfg
Normal file
108
source-builder/config/gsed-1.cfg
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
#
|
||||||
|
# GNU sed 1.xx Version 1.
|
||||||
|
#
|
||||||
|
# This configuration file configure's, make's and install's GNU's sed
|
||||||
|
#
|
||||||
|
|
||||||
|
%if %{release} == %{nil}
|
||||||
|
%define release 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifn %{defined _internal_gsed}
|
||||||
|
%define _internal_gsed no
|
||||||
|
%endif
|
||||||
|
%ifn %{defined _internal_gsed_path}
|
||||||
|
%define _internal_gsed_path %{_prefix}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: gsed-%{gsed_version}-%{_host}-%{release}
|
||||||
|
Summary: GNU sed v%{gsed_version} for host %{_host}
|
||||||
|
Version: %{gsed_version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: https://www.gnu.org/software/sed/
|
||||||
|
|
||||||
|
#
|
||||||
|
# Source
|
||||||
|
#
|
||||||
|
%source set gsed https://ftp.gnu.org/gnu/sed/sed-%{gsed_version}.tar.gz
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remap the install paths if it is an internal build
|
||||||
|
#
|
||||||
|
%if %{_internal_gsed} == yes
|
||||||
|
%define gsed_prefix %{_internal_gsed_path}
|
||||||
|
%else
|
||||||
|
%define gsed_prefix %{_prefix}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define gsed_exec_prefix %{gsed_prefix}
|
||||||
|
%define gsed_bindir %{gsed_exec_prefix}/bin
|
||||||
|
%define gsed_sbindir %{gsed_exec_prefix}/sbin
|
||||||
|
%define gsed_libexecdir %{gsed_exec_prefix}/libexec
|
||||||
|
%define gsed_datarootdir %{gsed_prefix}/share
|
||||||
|
%define gsed_datadir %{gsed_datarootdir}
|
||||||
|
%define gsed_sysconfdir %{gsed_prefix}/etc
|
||||||
|
%define gsed_sharedstatedir %{gsed_prefix}/com
|
||||||
|
%define gsed_localstatedir %{gsed_prefix}/var
|
||||||
|
%define gsed_includedir %{gsed_prefix}/include
|
||||||
|
%define gsed_libdir %{gsed_exec_prefix}/%{_lib}
|
||||||
|
%define gsed_mandir %{gsed_datarootdir}/man
|
||||||
|
%define gsed_infodir %{gsed_datarootdir}/info
|
||||||
|
%define gsed_localedir %{gsed_datarootdir}/locale
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare the source code.
|
||||||
|
#
|
||||||
|
%prep
|
||||||
|
build_top=$(pwd)
|
||||||
|
|
||||||
|
source_dir_gsed="sed-%{gsed_version}"
|
||||||
|
%source setup gsed -q -n sed-%{gsed_version}
|
||||||
|
%patch setup gsed -p1
|
||||||
|
|
||||||
|
cd ${build_top}
|
||||||
|
|
||||||
|
%build
|
||||||
|
build_top=$(pwd)
|
||||||
|
|
||||||
|
%if %{defined _internal_gsed_path}
|
||||||
|
export PATH="%{_internal_gsed_path}/bin:${PATH}"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%{build_directory}
|
||||||
|
|
||||||
|
mkdir -p ${build_dir}
|
||||||
|
cd ${build_dir}
|
||||||
|
|
||||||
|
%{host_build_flags}
|
||||||
|
|
||||||
|
../${source_dir_gsed}/configure \
|
||||||
|
--prefix=%{gsed_prefix} \
|
||||||
|
--bindir=%{gsed_bindir} \
|
||||||
|
--exec_prefix=%{gsed_exec_prefix} \
|
||||||
|
--includedir=%{gsed_includedir} \
|
||||||
|
--libdir=%{gsed_libdir} \
|
||||||
|
--libexecdir=%{gsed_libexecdir} \
|
||||||
|
--mandir=%{gsed_mandir} \
|
||||||
|
--infodir=%{gsed_infodir} \
|
||||||
|
--datadir=%{gsed_datadir} \
|
||||||
|
--build=%{_build} --host=%{_host}
|
||||||
|
|
||||||
|
%{__make} %{?_smp_mflags} all
|
||||||
|
|
||||||
|
cd ${build_top}
|
||||||
|
|
||||||
|
%install
|
||||||
|
build_top=$(pwd)
|
||||||
|
|
||||||
|
%{__rmdir} $SB_BUILD_ROOT
|
||||||
|
|
||||||
|
cd ${build_dir}
|
||||||
|
|
||||||
|
%if %{_internal_gsed} == yes
|
||||||
|
%{__make} install
|
||||||
|
%else
|
||||||
|
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||||
|
%endif
|
||||||
|
|
||||||
|
cd ${build_top}
|
Loading…
x
Reference in New Issue
Block a user