Archived
3
0
This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues or pull requests.
recipes/musl/recipe.spec
2019-09-03 13:28:56 +02:00

50 lines
962 B
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: musl
version: 1.1.23
release: 3
sources: https://www.musl-libc.org/releases/musl-%{version}.tar.gz
# Edit this if you somehow need to build a prefixed version of musl.
prefix: /
@configure
cd %{name}-%{version}
libdir=/lib
prefix=/usr/weirdos
if [ "%{prefix}" != "/" ]; then
prefix="%{prefix}"
libdir="%{prefix}/lib"
fi
./configure \
--prefix=$prefix \
--libdir=$libdir \
--syslibdir=$libdir \
--enable-shared \
--enable-static
@install
cd %{name}-%{version}
libdir=/lib
if [ "%{prefix}" != "/" ]; then
libdir="%{prefix}/lib"
fi
make DESTDIR="%{pkg}" install
# FIXME: Thisll have to eventually be more automated.
# FIXME: That path has to be edited on other architectures.
mkdir -p %{pkg}/etc
{
echo $libdir
echo /usr/weirdos/lib
echo /usr/bad/lib
echo /usr/local/lib
} > %{pkg}/etc/ld-musl-x86_64.path
for lib in libm libpthread librt libdl; do
ln -s $libdir/libc.so "%{pkg}$libdir/${lib}.so"
done