-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sh
87 lines (75 loc) · 2.16 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
set -ex
# Build libid3tag
cd $HOME
wget https://netix.dl.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
tar xzf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b
sed -i 's/ -fforce-mem//' configure
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build libmad
cd $HOME
wget https://netix.dl.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
tar xzf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
sed -i 's/ -fforce-mem//' configure
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build libogg
cd $HOME
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.4.tar.gz
tar xf libogg-1.3.4.tar.gz
cd libogg-1.3.4
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build libvorbis
cd $HOME
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz
tar xf libvorbis-1.3.6.tar.gz
cd libvorbis-1.3.6
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build libFLAC
cd $HOME
wget https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.3.tar.xz
tar xf flac-1.3.3.tar.xz
cd flac-1.3.3
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build libgd
cd $HOME
wget https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.gz
tar xzf libgd-2.2.5.tar.gz
cd libgd-2.2.5
mkdir build
cd build
cmake -DBUILD_STATIC_LIBS=1 -DENABLE_PNG=1 ..
make
make install
# Build libsndfile (Amazon repo only has earlier 1.0.25 release)
# Requires autogen, automake, and libtool packages
cd $HOME
wget https://github.com/erikd/libsndfile/archive/1.0.28.tar.gz
tar xzf 1.0.28.tar.gz
cd libsndfile-1.0.28
./autogen.sh
./configure --disable-shared --prefix=/usr --libdir=/usr/lib64
make install
# Build audiowaveform
cd $HOME
wget https://github.com/bbc/audiowaveform/archive/1.4.2.tar.gz
tar xzf 1.4.2.tar.gz
cd audiowaveform-1.4.2
sed -i 's/ -no-pie//' CMakeLists.txt
mkdir build
cd build
cmake -D ENABLE_TESTS=0 -D BUILD_STATIC=1 ..
make
strip audiowaveform
# Check dependencies
ldd audiowaveform
# Test
./audiowaveform -i ../test/data/test_file_stereo.flac -o test.dat -b 8
# Copy binary
cp ./audiowaveform /audiowaveform/bin/