43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
# Template file for 'pax'
|
|
pkgname=pax
|
|
version=20161031
|
|
revision=1
|
|
wrksrc="paxmirabilis-${version}"
|
|
build_wrksrc="${pkgname}"
|
|
hostmakedepends="cpio bmake groff"
|
|
short_desc="pax archiver from MirOS (plus tar and cpio)"
|
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
license="BSD"
|
|
homepage="https://www.mirbsd.org/MirOS/dist/mir/cpio/"
|
|
distfiles="https://www.mirbsd.org/MirOS/dist/mir/cpio/paxmirabilis-${version}.cpio.gz"
|
|
checksum=daec2b5355fd9d5f07fe057738122d43b659483f91d7116f21a96d140cea7a3c
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
makedepends+=" musl-fts-devel"
|
|
export LDADD="-lfts"
|
|
esac
|
|
|
|
do_extract() {
|
|
zcat ${XBPS_SRCDISTDIR}/${pkgname}-${version}/paxmirabilis-${version}.cpio.gz | cpio -mid
|
|
sed -i '1i#include <sys/types.h>' ${build_wrksrc}/pax.h
|
|
sed -i 's/__GLIBC__/__linux__/g' ${build_wrksrc}/cache.c
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686-musl|arm*-musl|mips*-musl) # 32bit-platforms
|
|
sed -i 's/-DLONG_OFF_T//' ${build_wrksrc}/Makefile
|
|
esac
|
|
}
|
|
|
|
do_build() {
|
|
bmake ${makejobs} MACHINE_OS=Linux \
|
|
CC="${CC}" CFLAGS="${CFLAGS} -DGNU_SOURCE" LDFLAGS="${LDFLAGS}"
|
|
}
|
|
|
|
do_install() {
|
|
vbin pax
|
|
ln -s pax ${DESTDIR}/usr/bin/paxtar
|
|
ln -s pax ${DESTDIR}/usr/bin/paxcpio
|
|
vman pax.1
|
|
vman tar.1 paxtar.1
|
|
vman cpio.1 paxcpio.1
|
|
}
|