-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix-install-cdparanoia
executable file
·103 lines (84 loc) · 2.23 KB
/
mix-install-cdparanoia
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/sh
### Package: mix-install-cdparanoia
### Version: v20240831.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: (none)
## OVERRIDES
# MIXTOOLSDIR
if [ -z $MIXTOOLSDIR ]; then
MIXTOOLSDIR="`pwd`"
PATH=$MIXTOOLSDIR:$PATH
fi
echo "*** MIXTOOLSDIR selected is $MIXTOOLSDIR."
# INSTALLDEPS
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "*** INSTALLDEPS selected is $INSTALLDEPS."
# GITBRANCH
if [ -z $GITBRANCH ]; then
GITBRANCH=master
fi
echo "*** GITBRANCH selected is $GITBRANCH."
# DESTDIR
if [ -z $DESTDIR ]; then
DESTDIR=/usr/local
fi
echo "*** DESTDIR selected is $DESTDIR."
CC="ccache gcc-13"
CPP="ccache g++-13"
CFLAGS="-O3 -march=znver4 -mtune=znver4 -fPIC -g"
CPPFLAGS="$CFLAGS"
## VARS
RESDIR=$MIXTOOLSDIR/resources
DEVDIR=$MIXTOOLSDIR/upstream
GITURL=https://salsa.debian.org
GITREPO=optical-media-team
GITTREE=cdparanoia
PKGDIR=$GITTREE\_$GITBRANCH
MULTILIBDIR=`gcc -dumpmachine`
## DEPS
# Provide INSTALLDEPS=debian to install dependencies for debian.
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y build-dep cdparanoia
sudo apt-get -y install build-essential coreutils libc-bin git meson
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## CLEAN
#make clean
## GIT
[ -d $PKGDIR ] || git clone --recursive --depth=1 $GITURL/$GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -dfx
git reset --hard
git pull
git submodule update --init --recursive --depth=1
## PATCH
# Debian
patch -p1 < debian/patches/01-typos-and-spelling.patch
patch -p1 < debian/patches/02-ide-devices.patch
patch -p1 < debian/patches/03-gcc4.3.patch
patch -p1 < debian/patches/04-endian.patch
patch -p1 < debian/patches/05-kfreebsd.patch
patch -p1 < debian/patches/06-autoconf.patch
patch -p1 < debian/patches/07-jpmanfix.patch
patch -p1 < debian/patches/cdparanoia-force-progress-bar.diff
patch -p1 < debian/patches/0009-dh-autoconf-generate-config-files.patch
# Overread
patch -p1 < $RESDIR/cdparanoia/cdparanoia_overread_debian.patch
## CONFIGURE
autoreconf -vifs
CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
./configure --prefix="$DESTDIR" --libdir="$DESTDIR"/lib/"$MULTILIBDIR"
## BUILD
make -j `nproc`
## INSTALL
sudo make install
sudo ldconfig
## EXIT
exit
## ENJOY