#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then exit 1 fi export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe -fno-rtti -fno-exceptions" P=vorbis-tools O=ogg123 V=1.4.2 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc curl-dev libao-dev flac-dev speex-dev libvorbis-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done URL=https://gitlab.archlinux.org/archlinux/packaging/packages/vorbis-tools/-/raw/main cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://ftp.osuosl.org/pub/xiph/releases/vorbis/$SRC.tar.gz \ $URL/0001-include-utf8.h-for-utf8_decode.patch?ref_type=heads " $USER tar xvf $SRC*gz cd $SRC patch -Np1 < ../0001-include-utf8.h-for-utf8_decode.patch?ref_type=heads ./configure --prefix=/usr/local --disable-static --localstatedir=/var --enable-vcut # WARNING: Kate libraries and/or headers missing, oggenc will NOT be built with Kate lyrics support make -j4 # seconds find . -name Makefile -type f -exec sed -i 's/-pg -g -O2//g' {} \; find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \; make install-strip DESTDIR=/tmp/$P cd /tmp # doc ####### mkdir -p $P-doc/usr/local/share/doc/ mv $P/usr/local/share/man $P-doc/usr/local/share mv $P/usr/local/share/doc/$P-$V $P-doc/usr/local/share/doc/$P cp $SRC/AUTHORS $P-doc/usr/local/share/doc/$P # locale ######### mkdir -p $P-locale/usr/local/share mv $P/usr/local/share/locale $P-locale/usr/local/share # ogg123 ######## mkdir -p $O/usr/local/bin mv $P/usr/local/bin/$O $O/usr/local/bin # main ###### mkdir -p $P/usr/local/share/doc/$P echo 'GPL v 2' >> $P/usr/local/share/doc/$P/COPYING # TCZ them ########### LIST2="$P $P-doc $P-locale $O" for Z in $LIST2 do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find . -not -type d | cut -c 2- | sort > /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: ogg123.tcz Description: CLI ogg player Version: 1.4.2 Author: see doc TCE/AUTHORS Original-site: https://github.com/xiph/vorbis-tools Copying-policy: GPL v 2 Size: 40K Extension_by: aus9 @linuxquestions.org Tags: audio player ogg Comments: split from vorbis-tools Optional dep for locales= vorbis-tools-locale man page in vorbis-tools-doc TCE It is safe to ignore any terminal output of: Failed to load plugin /usr/local/lib/ao/plugins-4/libpulse.so => dlopen() failed Change-log: 2025/01/12 v 1.4.2 Current: 2025/01/12 ' > $O.tcz.info readelf -d $P/usr/local/bin/$O | grep 'NEEDED' #libvorbisfile.so.3]#libvorbis.so.0]libvorbis #libao.so.4]libao #libnsl.so.1] rootfs #libcurl.so.4]curl #libFLAC.so.8]flac #libogg.so.0]libogg libvorbis #libspeex.so.1]speex # I am ignoring any hits for vorbis-tools to avoid loading it echo 'libvorbis.tcz libao.tcz curl.tcz flac.tcz speex.tcz ' > $O.tcz.dep echo 'Title: vorbis-tools-doc.tcz Description: mainly man pages Version: 1.4.2 Author: see doc TCE/AUTHORS Original-site: https://github.com/xiph/vorbis-tools Copying-policy: GPL v 2 Size: 16K Extension_by: aus9 @linuxquestions.org Tags: ogg Comments: contains man page for TCE=ogg123 Change-log: 2025/01/12 v 1.4.2 Current: 2025/01/12 ' > $P-doc.tcz.info echo 'man-db.tcz ' > $P-doc.tcz.dep echo 'Title: vorbis-tools-locale.tcz Description: language files Version: 1.4.2 Author: see doc TCE/AUTHORS Original-site: https://github.com/xiph/vorbis-tools Copying-policy: GPL v 2 Size: 184K Extension_by: aus9 @linuxquestions.org Tags: ogg locale Comments: untested by me Change-log: 2025/01/12 v 1.4.2 Current: 2025/01/12 ' > $P-locale.tcz.info echo 'vorbis-tools.tcz' > $P-locale.tcz.dep echo 'Title: vorbis-tools.tcz Description: tools for ogg codec Version: 1.4.2 Author: see doc TCE/AUTHORS Original-site: https://github.com/xiph/vorbis-tools Copying-policy: GPL v 2 Size: 76K Extension_by: aus9 @linuxquestions.org Tags: ogg audio Comments: CLI tools for ogg codec but ogg123 split into separate TCE Change-log: 2018/01/29 v 1.4.0 (Juanito) Current: 2025/01/12 v 1.4.2 split ogg123 out (aus9) ' > $P.tcz.info readelf -d $P/usr/local/bin/* | grep 'NEEDED' #libvorbisfile.so.3]#libvorbis.so.0] #libvorbisenc.so.2] libvorbis #libogg.so.0]libogg libvorbis #libFLAC.so.8] flac echo 'libvorbis.tcz flac.tcz' > $P.tcz.dep submitqc --libs rm -rf *.zsync