view audio/cdrdao/cdrdao.sh @ 1217:27d1a83dc8d6

misc: change shebang to /bin/sh
author David Demelier <markand@malikania.fr>
date Thu, 30 Sep 2021 08:49:59 +0200
parents 6710613b88b9
children 57dc83a39b13
line wrap: on
line source

#!/bin/sh
#
# Copyright (c) 2019 David Demelier <markand@malikania.fr>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

PKGNAME=cdrdao
PKGVERSION=1.2.4
PKGREVISION=1
PKGLICENSE="GPLv20"
PKGSUMMARY="write audio/data CD-Rs in disk-at-once mode"
PKGDOWNLOAD="https://sourceforge.net/projects/cdrdao/files/$PKGNAME-$PKGVERSION.tar.bz2"
PKGDEPENDS=""
PKGOPTIONS="MP3 OGG"

: ${CHOST:=$(uname -m)-linux-musl}
: ${CBUILD:=$(uname -m)-linux-musl}
: ${CC:=clang}
: ${CFLAGS:=-O2}
: ${CXX:=clang++}
: ${CXXFLAGS:=-O2}
: ${LDFLAGS:=}
: ${LIBS:=}
: ${MP3:=lame mad}      # Note: can be lame, mad or yes (both).

if [ "$OGG" = "yes" ]; then
	PKGDEPENDS="libvorbis $PKGDEPENDS"
	with_ogg="--with-ogg-support"
else
	with_ogg="--without-ogg-support"
fi

if [ -z "${MP3##*mad*}" ] || [ "$MP3" = "yes" ]; then
	PKGDEPENDS="libmad $PKGDEPENDS"
	with_mad="--with-mp3-support"
else
	with_mad="--without-mp3-support"
fi

if [ -z "${MP3##*lame*}" ] || [ "$MP3" = "yes" ]; then
	PKGDEPENDS="lame $PKGDEPENDS"
	with_lame="--with-lame"
else
	with_lame="--without-lame"
fi

rm -rf $PKGNAME-$PKGVERSION
tar xvf $PKGNAME-$PKGVERSION.tar.bz2
cd $PKGNAME-$PKGVERSION

# TODO: --without-gcdmaster: missing dependencies.
CC="$CC" \
CFLAGS="$CFLAGS" \
CXX="$CXX" \
CXXFLAGS="$CXXFLAGS" \
LDFLAGS="$LDFLAGS" \
LIBS="$LIBS" \
./configure \
	--build=$CBUILD \
	--host=$CHOST \
	--prefix= \
	--without-gcdmaster \
	$with_ogg \
	$with_mad \
	$with_lame
make
make install DESTDIR=$DESTDIR

cd ..
rm -rf $PKGNAME-$PKGVERSION