File: build-linux.sh

package info (click to toggle)
dunedynasty 1.6.4%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 7,868 kB
  • sloc: ansic: 62,953; cpp: 6,238; sh: 155; javascript: 150; xml: 81; makefile: 9
file content (18 lines) | stat: -rwxr-xr-x 512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash -e

echo "Cleaning up build..."
./scripts/cleanup-build.sh

echo "Performing build..."
cmake -DCMAKE_BUILD_TYPE=Release .
make

echo "Bundling libraries..."
mkdir dist/libs
(ldd ./dist/dunedynasty | grep -E 'libfluidsynth' |awk '{if(substr($3,0,1)=="/") print $1,$3}' |sort) |cut -d\  -f2 |
xargs -d '\n' -I{} cp --copy-contents {} ./dist/libs
ls -1 ./dist/libs/ | while read file
do
    patchelf --remove-needed $file ./dist/dunedynasty
    patchelf --add-needed ./libs/$file ./dist/dunedynasty
done