| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 |
# you may not use this file except in compliance with the License. |
| 3 |
# You may obtain a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 9 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 |
# See the License for the specific language governing permissions and |
| 11 |
# limitations under the License. |
| 12 |
|
| 13 |
# Autotools default configurations |
| 14 |
|
| 15 |
variables: |
| 16 |
|
| 17 |
autogen: | |
| 18 |
export NOCONFIGURE=1; |
| 19 |
|
| 20 |
if [ -x %{conf-cmd} ]; then true; |
| 21 |
elif [ -x %{conf-root}/autogen ]; then %{conf-root}/autogen; |
| 22 |
elif [ -x %{conf-root}/autogen.sh ]; then %{conf-root}/autogen.sh; |
| 23 |
elif [ -x %{conf-root}/bootstrap ]; then %{conf-root}/bootstrap; |
| 24 |
elif [ -x %{conf-root}/bootstrap.sh ]; then %{conf-root}/bootstrap.sh; |
| 25 |
else autoreconf -ivf %{conf-root}; |
| 26 |
fi |
| 27 |
|
| 28 |
# Project-wide extra arguments to be passed to `configure` |
| 29 |
conf-global: '' |
| 30 |
|
| 31 |
# Element-specific extra arguments to be passed to `configure`. |
| 32 |
conf-local: '' |
| 33 |
|
| 34 |
conf-cmd: "%{conf-root}/configure" |
| 35 |
|
| 36 |
conf-args: | |
| 37 |
|
| 38 |
--prefix=%{prefix} \ |
| 39 |
--exec-prefix=%{exec_prefix} \ |
| 40 |
--bindir=%{bindir} \ |
| 41 |
--sbindir=%{sbindir} \ |
| 42 |
--sysconfdir=%{sysconfdir} \ |
| 43 |
--datadir=%{datadir} \ |
| 44 |
--includedir=%{includedir} \ |
| 45 |
--libdir=%{libdir} \ |
| 46 |
--libexecdir=%{libexecdir} \ |
| 47 |
--localstatedir=%{localstatedir} \ |
| 48 |
--sharedstatedir=%{sharedstatedir} \ |
| 49 |
--mandir=%{mandir} \ |
| 50 |
--infodir=%{infodir} %{conf-global} %{conf-local} |
| 51 |
|
| 52 |
configure: | |
| 53 |
|
| 54 |
%{conf-cmd} %{conf-args} |
| 55 |
|
| 56 |
make-args: "" |
| 57 |
make-install-args: >- |
| 58 |
%{make-args} |
| 59 |
DESTDIR="%{install-root}" |
| 60 |
install |
| 61 |
make: make %{make-args} |
| 62 |
make-install: make -j1 %{make-install-args} |
| 63 |
|
| 64 |
# Set this if the sources cannot handle parallelization. |
| 65 |
# |
| 66 |
# notparallel: True |
| 67 |
|
| 68 |
|
| 69 |
# Automatically remove libtool archive files |
| 70 |
# |
| 71 |
# Set remove-libtool-modules to "true" to remove .la files for |
| 72 |
# modules intended to be opened with lt_dlopen() |
| 73 |
# |
| 74 |
# Set remove-libtool-libraries to "true" to remove .la files for |
| 75 |
# libraries |
| 76 |
# |
| 77 |
# Value must be "true" or "false" |
| 78 |
remove-libtool-modules: "false" |
| 79 |
remove-libtool-libraries: "false" |
| 80 |
|
| 81 |
delete-libtool-archives: | |
| 82 |
if %{remove-libtool-modules} || %{remove-libtool-libraries}; then |
| 83 |
find "%{install-root}" -name "*.la" -print0 | while read -d '' -r file; do |
| 84 |
if grep '^shouldnotlink=yes$' "${file}" &>/dev/null; then |
| 85 |
if %{remove-libtool-modules}; then |
| 86 |
echo "Removing ${file}." |
| 87 |
rm "${file}" |
| 88 |
else |
| 89 |
echo "Not removing ${file}." |
| 90 |
fi |
| 91 |
else |
| 92 |
if %{remove-libtool-libraries}; then |
| 93 |
echo "Removing ${file}." |
| 94 |
rm "${file}" |
| 95 |
else |
| 96 |
echo "Not removing ${file}." |
| 97 |
fi |
| 98 |
fi |
| 99 |
done |
| 100 |
fi |
| 101 |
|
| 102 |
config: |
| 103 |
|
| 104 |
# Commands for configuring the software |
| 105 |
# |
| 106 |
configure-commands: |
| 107 |
- | |
| 108 |
%{autogen} |
| 109 |
- | |
| 110 |
%{configure} |
| 111 |
|
| 112 |
# Commands for building the software |
| 113 |
# |
| 114 |
build-commands: |
| 115 |
- | |
| 116 |
%{make} |
| 117 |
|
| 118 |
# Commands for installing the software into a |
| 119 |
# destination folder |
| 120 |
# |
| 121 |
install-commands: |
| 122 |
- | |
| 123 |
%{make-install} |
| 124 |
- | |
| 125 |
%{delete-libtool-archives} |
| 126 |
|
| 127 |
# Commands for stripping debugging information out of |
| 128 |
# installed binaries |
| 129 |
# |
| 130 |
strip-commands: |
| 131 |
- | |
| 132 |
%{strip-binaries} |
| 133 |
|
| 134 |
# Use max-jobs CPUs for building and enable verbosity |
| 135 |
environment: |
| 136 |
MAKEFLAGS: -j%{max-jobs} |
| 137 |
V: 1 |
| 138 |
|
| 139 |
# And dont consider MAKEFLAGS or V as something which may |
| 140 |
# affect build output. |
| 141 |
environment-nocache: |
| 142 |
- MAKEFLAGS |
| 143 |
- V |