schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
This commit is contained in:
classabbyamp 2023-11-11 20:23:31 -05:00 committed by classabbyamp
parent 8fab399bca
commit 482abcd14a
1 changed files with 69 additions and 47 deletions

View File

@ -1,63 +1,102 @@
# Template file for 'schilytools' # Template file for 'schilytools'
pkgname=schilytools pkgname=schilytools
version=2023.09.28 version=2023.09.28
revision=2 revision=3
build_style=meta
build_helper="qemu"
makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4" makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
depends="sccs sdd sfind smake star ved" depends="sccs sdd sfind smake star ved cdrtools"
short_desc="Schily's portable tools" short_desc="Schily's portable tools"
maintainer="Leah Neukirchen <leah@vuxu.org>" maintainer="Leah Neukirchen <leah@vuxu.org>"
license="CDDL-1.0" license="CDDL-1.0"
homepage="https://codeberg.org/schilytools/schilytools" homepage="https://codeberg.org/schilytools/schilytools"
distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz" distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6 checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
nocross=yes # configure + re-builds with itself
do_build() { _common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr post_patch() {
make -C sccs clean vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
} }
do_install() { do_build() {
make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
vlicense CDDL.Schily.txt
# build the bootstrap smake for host always
( cd psmake && CC="gcc" CC_OPT="-O2" CFLAGS="" LDFLAGS="" sh ./MAKE-all )
if [ "$CROSS_BUILD" ]; then
export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
export CONFIG_RMTHOST=dummy
fi
make "${_flags[@]}"
# sccs has a special INS_BASE
make -C sccs clean "${_flags[@]}"
make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
readcd rscsi scgcheck scgskeleton; do
make -C "$d" clean "${_flags[@]}"
make -C "$d" "${_flags[@]}"
done
}
cdrtools_package() {
depends="libcap-progs"
short_desc+=" - cdrtools"
conf_files="/etc/default/rscsi /etc/default/cdrecord"
pkg_install() {
for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
scgcheck scgskeleton; do
make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
done
rm -rf "${PKGDESTDIR}"/usr/lib/profiled
vmkdir usr/lib/modules-load.d
echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
vlicense CDDL.Schily.txt
}
} }
sccs_package() { sccs_package() {
short_desc+=" - SCCS" short_desc+=" - SCCS"
pkg_install() { pkg_install() {
make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
vmkdir usr/bin vmkdir usr/bin
vmkdir usr/share vmkdir usr/share
rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]* rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }
sdd_package() { sdd_package() {
short_desc+=" - sdd" short_desc+=" - sdd"
pkg_install() { pkg_install() {
make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }
sfind_package() { sfind_package() {
short_desc+=" - sfind" short_desc+=" - sfind"
pkg_install() { pkg_install() {
make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }
smake_package() { smake_package() {
short_desc+=" - smake" short_desc+=" - smake"
pkg_install() { pkg_install() {
make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }
star_package() { star_package() {
short_desc+=" - star" short_desc+=" - star"
conf_files="/etc/default/star" conf_files="/etc/default/star"
@ -66,38 +105,21 @@ star_package() {
pax:pax.1:/usr/share/man/man1/spax.1 pax:pax.1:/usr/share/man/man1/spax.1
" "
pkg_install() { pkg_install() {
make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax' make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1 rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1 rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1 rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1] rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5] rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
rm -rf ${PKGDESTDIR}/usr/share/doc/ rm -rf "${PKGDESTDIR}"/usr/share/doc/
vlicense CDDL.Schily.txt
}
}
ved_package() {
short_desc+=" - ved"
pkg_install() {
make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }
cdrtools_package() { ved_package() {
depends="schilytools libcap-progs" short_desc+=" - ved"
short_desc+=" - cdrtools"
conf_files="/etc/default/rscsi /etc/default/cdrecord"
pkg_install() { pkg_install() {
vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
scgcheck scgskeleton; do
make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
done
rm -rf "${PKGDESTDIR}"/usr/lib/profiled
vmkdir usr/lib/modules-load.d
echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
vlicense CDDL.Schily.txt vlicense CDDL.Schily.txt
} }
} }