blob: c2abab348a0d4468edf5f2dc6fcb3479f4b84e4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#
# GNU texinfo 7.xx Version 1.
#
# This configuration file configure's, make's and install's GNU's texinfo
#
%if %{release} == %{nil}
%define release 1
%endif
%ifn %{defined _internal_texinfo}
%define _internal_texinfo no
%endif
%ifn %{defined _internal_texinfo_path}
%define _internal_texinfo_path %{_prefix}
%endif
Name: texinfo-%{texinfo_version}-%{_host}-%{release}
Summary: GNU texinfo v%{texinfo_version} for host %{_host}
Version: %{texinfo_version}
Release: %{release}
URL: https://www.gnu.org/software/texinfo/
#
# Source
#
%source set texinfo https://ftp.gnu.org/gnu/texinfo/texinfo-%{texinfo_version}.tar.gz
#
# Remap the install paths if it is an internal build
#
%if %{_internal_texinfo} == yes
%if !%{defined _internal_texinfo_path}
%error no texinfo internal install path defined
%endif
%define texinfo_prefix %{_internal_texinfo_path}
%else
%define texinfo_prefix %{_prefix}
%endif
%define texinfo_exec_prefix %{texinfo_prefix}
%define texinfo_bindir %{texinfo_exec_prefix}/bin
%define texinfo_sbindir %{texinfo_exec_prefix}/sbin
%define texinfo_libexecdir %{texinfo_exec_prefix}/libexec
%define texinfo_datarootdir %{texinfo_prefix}/share
%define texinfo_datadir %{texinfo_datarootdir}
%define texinfo_sysconfdir %{texinfo_prefix}/etc
%define texinfo_sharedstatedir %{texinfo_prefix}/com
%define texinfo_localstatedir %{texinfo_prefix}/var
%define texinfo_includedir %{texinfo_prefix}/include
%define texinfo_libdir %{texinfo_exec_prefix}/%{_lib}
%define texinfo_mandir %{texinfo_datarootdir}/man
%define texinfo_infodir %{texinfo_datarootdir}/info
%define texinfo_localedir %{texinfo_datarootdir}/locale
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
source_dir_texinfo="texinfo-%{texinfo_version}"
%source setup texinfo -q -n texinfo-%{texinfo_version}
%patch setup texinfo -p1
cd ${build_top}
%build
build_top=$(pwd)
%if %{defined _internal_texinfo_path}
export PATH="%{_internal_texinfo_path}/bin:${PATH}"
%endif
%{build_directory}
mkdir -p ${build_dir}
cd ${build_dir}
%{host_build_flags}
../${source_dir_texinfo}/configure \
--prefix=%{texinfo_prefix} \
--bindir=%{texinfo_bindir} \
--exec_prefix=%{texinfo_exec_prefix} \
--includedir=%{texinfo_includedir} \
--libdir=%{texinfo_libdir} \
--libexecdir=%{texinfo_libexecdir} \
--mandir=%{texinfo_mandir} \
--infodir=%{texinfo_infodir} \
--datadir=%{texinfo_datadir} \
%{__make} %{?_smp_mflags} all
cd ${build_top}
%install
build_top=$(pwd)
%{__rmdir} $SB_BUILD_ROOT
cd ${build_dir}
%if %{_internal_texinfo} == yes
%{__make} install
%else
%{__make} DESTDIR=$SB_BUILD_ROOT install
%endif
cd ${build_top}
|