comparison audio/cdrdao/cdrdao.sh @ 1048:bc1d97842cff

audio/cdrdao: initial import, closes #1224
author David Demelier <markand@malikania.fr>
date Fri, 30 Aug 2019 22:25:32 +0200
parents
children 6710613b88b9
comparison
equal deleted inserted replaced
1047:94040ea55db2 1048:bc1d97842cff
1 #!/bin/busybox sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=cdrdao
19 PKGVERSION=1.2.4
20 PKGREVISION=1
21 PKGLICENSE="GPLv20"
22 PKGSUMMARY="write audio/data CD-Rs in disk-at-once mode"
23 PKGDOWNLOAD="https://sourceforge.net/projects/cdrdao/files/$PKGNAME-$PKGVERSION.tar.bz2"
24 PKGDEPENDS=""
25 PKGOPTIONS="MP3 OGG"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=clang}
30 : ${CFLAGS:=-O2}
31 : ${CXX:=clang++}
32 : ${CXXFLAGS:=-O2}
33 : ${LDFLAGS:=}
34 : ${LIBS:=}
35 : ${MP3:=lame mad} # Note: can be lame, mad or yes (both).
36
37 if [ "$OGG" = "yes" ]; then
38 PKGDEPENDS="libvorbis $PKGDEPENDS"
39 with_ogg="--with-ogg-support"
40 else
41 with_ogg="--without-ogg-support"
42 fi
43
44 if [ -z "${MP3##*mad*}" ] || [ "$MP3" = "yes" ]; then
45 PKGDEPENDS="libmad $PKGDEPENDS"
46 with_mad="--with-mp3-support"
47 else
48 with_mad="--without-mp3-support"
49 fi
50
51 if [ -z "${MP3##*lame*}" ] || [ "$MP3" = "yes" ]; then
52 PKGDEPENDS="lame $PKGDEPENDS"
53 with_lame="--with-lame"
54 else
55 with_lame="--without-lame"
56 fi
57
58 build()
59 {
60 rm -rf $PKGNAME-$PKGVERSION
61 tar xvf $PKGNAME-$PKGVERSION.tar.bz2
62 cd $PKGNAME-$PKGVERSION
63
64 # TODO: --without-gcdmaster: missing dependencies.
65 CC="$CC" \
66 CFLAGS="$CFLAGS" \
67 CXX="$CXX" \
68 CXXFLAGS="$CXXFLAGS" \
69 LDFLAGS="$LDFLAGS" \
70 LIBS="$LIBS" \
71 ./configure \
72 --build=$CBUILD \
73 --host=$CHOST \
74 --prefix= \
75 --without-gcdmaster \
76 $with_ogg \
77 $with_mad \
78 $with_lame
79 make
80 make install DESTDIR=$DESTDIR
81
82 cd ..
83 rm -rf $PKGNAME-$PKGVERSION
84 }