126 lines
3.6 KiB
Bash
126 lines
3.6 KiB
Bash
# Template file for 'schilytools'
|
|
pkgname=schilytools
|
|
version=2023.09.28
|
|
revision=3
|
|
build_style=meta
|
|
build_helper="qemu"
|
|
makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
|
|
depends="sccs sdd sfind smake star ved cdrtools"
|
|
short_desc="Schily's portable tools"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="CDDL-1.0"
|
|
homepage="https://codeberg.org/schilytools/schilytools"
|
|
distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
|
|
checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
|
|
|
|
_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
|
|
|
|
post_patch() {
|
|
vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
|
|
}
|
|
|
|
do_build() {
|
|
local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
|
|
|
|
# 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() {
|
|
short_desc+=" - SCCS"
|
|
pkg_install() {
|
|
make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
|
|
vmkdir usr/bin
|
|
vmkdir usr/share
|
|
rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
|
|
mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
|
|
rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
|
|
ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|
|
|
|
sdd_package() {
|
|
short_desc+=" - sdd"
|
|
pkg_install() {
|
|
make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|
|
|
|
sfind_package() {
|
|
short_desc+=" - sfind"
|
|
pkg_install() {
|
|
make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|
|
|
|
smake_package() {
|
|
short_desc+=" - smake"
|
|
pkg_install() {
|
|
make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|
|
|
|
star_package() {
|
|
short_desc+=" - star"
|
|
conf_files="/etc/default/star"
|
|
alternatives="
|
|
pax:pax:/usr/bin/spax
|
|
pax:pax.1:/usr/share/man/man1/spax.1
|
|
"
|
|
pkg_install() {
|
|
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/ustar.1
|
|
rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
|
|
rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
|
|
rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
|
|
rm -rf "${PKGDESTDIR}"/usr/share/doc/
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|
|
|
|
ved_package() {
|
|
short_desc+=" - ved"
|
|
pkg_install() {
|
|
make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
|
|
vlicense CDDL.Schily.txt
|
|
}
|
|
}
|