forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautotools.spec
More file actions
135 lines (127 loc) · 4.55 KB
/
Copy pathautotools.spec
File metadata and controls
135 lines (127 loc) · 4.55 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
### RPM external autotools 1.5
## INITENV SET M4 %{i}/bin/m4
# We keep all of them together to simplify the "requires" statements.
%define autoconf_version 2.72
%define automake_version 1.16.5
%define automake_maj %(echo %{automake_version} | cut -f1,2 -d.)
%define libtool_version 2.5.4
%define m4_version 1.4.19
%define gettext_version 0.22.5
%define pkgconfig_version 0.29.2
Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{gettext_version}.tar.gz
Source5: http://pkgconfig.freedesktop.org/releases/pkg-config-%{pkgconfig_version}.tar.gz
BuildRequires: gmake
#pkg-config GCC 15 patch
Patch0: autotools-pkg-config-gcc15
%prep
%setup -D -T -b 0 -n autoconf-%{autoconf_version}
%setup -D -T -b 1 -n automake-%{automake_version}
%setup -D -T -b 2 -n libtool-%{libtool_version}
%setup -D -T -b 3 -n m4-%{m4_version}
%setup -D -T -b 4 -n gettext-%{gettext_version}
%setup -D -T -b 5 -n pkg-config-%{pkgconfig_version}
%patch0 -p1
# Update config.{guess,sub} scripts
rm -f %{_tmppath}/config.{sub,guess}
%get_config_guess %{_tmppath}/config.guess
%get_config_sub %{_tmppath}/config.sub
for CONFIG_GUESS_FILE in $(find $RPM_BUILD_DIR -name 'config.guess')
do
rm -f $CONFIG_GUESS_FILE
cp %{_tmppath}/config.guess $CONFIG_GUESS_FILE
chmod +x $CONFIG_GUESS_FILE
done
for CONFIG_SUB_FILE in $(find $RPM_BUILD_DIR -name 'config.sub')
do
rm -f $CONFIG_SUB_FILE
cp %{_tmppath}/config.sub $CONFIG_SUB_FILE
chmod +x $CONFIG_SUB_FILE
done
%build
export PATH=%i/bin:$PATH
pushd %_builddir/m4-%{m4_version}
env CFLAGS="-O2 -std=gnu17" ./configure --disable-dependency-tracking --prefix %i
make %makeprocesses
make install
popd
pushd %_builddir/autoconf-%{autoconf_version}
./configure --disable-dependency-tracking --prefix %i
make %makeprocesses
make install
popd
pushd %_builddir/automake-%{automake_version}
./configure --disable-dependency-tracking --prefix %i
make %makeprocesses
make install
popd
pushd %_builddir/libtool-%{libtool_version}
./configure --disable-dependency-tracking --prefix %i --enable-ltdl-install
make %makeprocesses
make install
popd
pushd %_builddir/gettext-%{gettext_version}
./configure --prefix %i \
--without-xz \
--without-bzip2 \
--with-included-libxml \
--disable-curses \
--disable-openmp \
--enable-relocatable \
--disable-rpath \
--disable-nls \
--disable-native-java \
--disable-acl \
--disable-java \
--disable-dependency-tracking \
--disable-silent-rules \
--with-included-glib \
--with-included-libunistring \
--with-included-libcroco
make %makeprocesses
make install
popd
pushd %_builddir/pkg-config-%{pkgconfig_version}
./configure --prefix %i \
--disable-silent-rules \
--disable-dependency-tracking \
--disable-host-tool \
--with-internal-glib \
--disable-shared
make %makeprocesses
make install
popd
# Fix perl location, required on /usr/bin/perl
grep -l -R '/bin/perl' %{i} | xargs -n1 sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/perl;'
find %{i} -name '*deleteme' -delete
grep -l -R '/bin/perl' %{i} | xargs -n1 sed -ideleteme -e 's;exec [^ ]*/perl;exec /usr/bin/perl;g'
find %{i} -name '*deleteme' -delete
# Fix perl location, required on /usr/bin/perl
grep -l -R '/bin/perl' %{i} | xargs -n1 sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/perl;'
find %{i} -name '*deleteme' -delete
grep -l -R '/bin/perl' %{i} | xargs -n1 sed -ideleteme -e 's;exec [^ ]*/perl;exec /usr/bin/perl;g'
find %{i} -name '*deleteme' -delete
%install
# NOP
%define drop_files %{i}/share/{man,doc,info}
%post
%{relocateConfig}bin/aclocal
%{relocateConfig}bin/aclocal-%{automake_maj}
%{relocateConfig}bin/autoconf
%{relocateConfig}bin/autoheader
%{relocateConfig}bin/autom4te
%{relocateConfig}bin/automake
%{relocateConfig}bin/automake-%{automake_maj}
%{relocateConfig}bin/autoreconf
%{relocateConfig}bin/autoscan
%{relocateConfig}bin/autoupdate
%{relocateConfig}bin/ifnames
%{relocateConfig}bin/libtoolize
%{relocateConfig}share/autoconf/autom4te.cfg
%{relocateConfig}share/automake-%{automake_maj}/Automake/Config.pm
%{relocateConfig}bin/gettextize
%{relocateConfig}lib/gettext/user-email
%{relocateConfig}bin/autopoint