musl: recipe update
Allows prefixed builds.
This commit is contained in:
parent
db79c1f197
commit
241448a222
@ -2,25 +2,48 @@ name: musl
|
|||||||
version: 1.1.23
|
version: 1.1.23
|
||||||
release: 3
|
release: 3
|
||||||
sources: https://www.musl-libc.org/releases/musl-%{version}.tar.gz
|
sources: https://www.musl-libc.org/releases/musl-%{version}.tar.gz
|
||||||
options:
|
|
||||||
- configure: --prefix=/usr --libdir=/lib --syslibdir=/lib --enable-shared --enable-static
|
# 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
|
@install
|
||||||
cd %{name}-%{version}
|
cd %{name}-%{version}
|
||||||
|
|
||||||
|
libdir=/lib
|
||||||
|
if [ "%{prefix}" != "/" ]; then
|
||||||
|
libdir="%{prefix}/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
make DESTDIR="%{pkg}" install
|
make DESTDIR="%{pkg}" install
|
||||||
|
|
||||||
# FIXME: This’ll have to eventually be more automated.
|
# FIXME: This’ll have to eventually be more automated.
|
||||||
# FIXME: That path has to be edited on other architectures.
|
# FIXME: That path has to be edited on other architectures.
|
||||||
mkdir -p %{pkg}/etc
|
mkdir -p %{pkg}/etc
|
||||||
{
|
{
|
||||||
echo /lib
|
echo $libdir
|
||||||
echo /usr/weirdos/lib
|
echo /usr/weirdos/lib
|
||||||
echo /usr/bad/lib
|
echo /usr/bad/lib
|
||||||
echo /usr/local/lib
|
echo /usr/local/lib
|
||||||
} > %{pkg}/etc/ld-musl-x86_64.path
|
} > %{pkg}/etc/ld-musl-x86_64.path
|
||||||
|
|
||||||
for lib in libm libpthread librt libdl; do
|
for lib in libm libpthread librt libdl; do
|
||||||
ln -s /lib/libc.so "%{pkg}/lib/${lib}.so"
|
ln -s $libdir/libc.so "%{pkg}$libdir/${lib}.so"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user