|
11 | 11 |
|
12 | 12 | rp_module_id="uqm"
|
13 | 13 | rp_module_desc="The Ur-Quan Masters (Port of DOS game Star Control 2)"
|
14 |
| -rp_module_licence="NONCOM https://raw.githubusercontent.com/davidben/uqm/nacl/COPYING" |
15 |
| -rp_module_section="opt" |
16 |
| -rp_module_flags="!mali" |
| 14 | +rp_module_licence="GPL https://sourceforce.net/p/sc2/uqm/ci/master/tree/sc2/COPYING?format=raw" |
| 15 | +rp_module_repo="file :_get_archive_uqm" |
| 16 | +rp_module_section="exp" |
17 | 17 |
|
18 | 18 | function _get_ver_uqm() {
|
19 |
| - echo "0.6.2.dfsg-9.5" |
| 19 | + echo "0.8.0" |
20 | 20 | }
|
21 | 21 |
|
22 | 22 | function _update_hook_uqm() {
|
23 | 23 | # to show as installed in retropie-setup 4.x
|
24 | 24 | hasPackage uqm && mkdir -p "$md_inst"
|
25 | 25 | }
|
26 | 26 |
|
27 |
| -function depends_uqm() { |
28 |
| - [[ "$__os_id" != "Raspbian" ]] && return 0 |
29 |
| - local depends=(debhelper devscripts libmikmod-dev libsdl1.2-dev libopenal-dev libsdl-image1.2-dev libogg-dev libvorbis-dev) |
30 |
| - isPlatform "gl" || isPlatform "mesa" && depends+=(libgl1-mesa-dev) |
31 |
| - isPlatform "kms" && depends+=(xorg) |
| 27 | +function _get_archive_uqm() { |
| 28 | + echo "$__archive_url/uqm-$(_get_ver_uqm)-src.tgz" |
| 29 | +} |
32 | 30 |
|
33 |
| - getDepends "${depends[@]}" |
| 31 | +function depends_uqm() { |
| 32 | + getDepends libsdl2-dev libogg-dev libvorbis-dev libpng-dev zlib1g-dev |
34 | 33 | }
|
35 | 34 |
|
36 | 35 | function sources_uqm() {
|
37 |
| - [[ "$__os_id" != "Raspbian" ]] && return 0 |
| 36 | + downloadAndExtract "$(rp_resolveRepoParam "$md_repo_url")" "$md_build" --strip-components 1 |
| 37 | + local packages="$md_build/content/packages" |
| 38 | + mkdir -p "$packages" |
38 | 39 | local ver="$(_get_ver_uqm)"
|
39 |
| - local url="http://http.debian.net/debian/pool/contrib/u/uqm" |
40 |
| - for file in uqm_$ver.dsc uqm_0.6.2.dfsg.orig.tar.gz uqm_$ver.debian.tar.xz; do |
41 |
| - download "$url/$file" |
42 |
| - done |
| 40 | + download "$__archive_url/uqm-${ver}-content.uqm" "$packages" |
| 41 | + download "$__archive_url/uqm-${ver}-voice.uqm" "$packages" |
| 42 | + download "$__archive_url/uqm-${ver}-3domusic.uqm" "$packages" |
43 | 43 | }
|
44 | 44 |
|
45 | 45 | function build_uqm() {
|
46 |
| - [[ "$__os_id" != "Raspbian" ]] && return 0 |
47 |
| - dpkg-source -x uqm_$(_get_ver_uqm).dsc |
48 |
| - cd uqm-0.6.2.dfsg |
49 |
| - dpkg-buildpackage -us -uc |
| 46 | + ./build.sh uqm clean |
| 47 | + echo "\n" | CHOICE_debug_VALUE="nodebug" INPUT_install_prefix_VALUE="$md_inst" ./build.sh uqm config |
| 48 | + ./build.sh uqm |
50 | 49 | }
|
51 | 50 |
|
52 | 51 | function install_uqm() {
|
53 |
| - # uqm is missing on raspbian |
54 |
| - if [[ "$__os_id" == "Raspbian" ]]; then |
55 |
| - cp -v *.deb "$md_inst" |
56 |
| - dpkg -i *.deb |
57 |
| - aptInstall uqm-content uqm-music uqm-voice |
58 |
| - else |
59 |
| - aptInstall uqm uqm-content uqm-music uqm-voice |
60 |
| - fi |
| 52 | + ./build.sh uqm install |
61 | 53 | }
|
62 | 54 |
|
63 |
| -function install_bin_uqm() { |
64 |
| - rp_installBin |
65 |
| - # uqm is missing on raspbian |
66 |
| - if hasPackage raspberrypi-bootloader; then |
67 |
| - cd "$md_inst" |
68 |
| - dpkg -i *.deb |
69 |
| - aptInstall uqm-content uqm-music uqm-voice |
70 |
| - else |
71 |
| - aptInstall uqm uqm-content uqm-music uqm-voice |
72 |
| - fi |
73 |
| -} |
| 55 | +function configure_uqm() { |
| 56 | + addPort "$md_id" "uqm" "Ur-quan Masters" "$md_inst/bin/uqm -f" |
74 | 57 |
|
75 |
| -function remove_uqm() { |
76 |
| - aptRemove uqm uqm-content uqm-music uqm-voice |
77 |
| -} |
| 58 | + [[ "$md_mode" == "remove" ]] && return |
78 | 59 |
|
79 |
| -function configure_uqm() { |
80 |
| - local binary="uqm" |
81 |
| - local params=("-f") |
82 |
| - if isPlatform "kms"; then |
83 |
| - # SDL1 needs xinit, and does not have /usr/games in $PATH |
84 |
| - binary="XINIT:/usr/games/$binary" |
85 |
| - # OpenGL mode must be also be enabled for high resolution support |
86 |
| - params+=("-o" "-r %XRES%x%YRES%") |
87 |
| - fi |
88 | 60 | moveConfigDir "$home/.uqm" "$md_conf_root/uqm"
|
89 |
| - addPort "$md_id" "uqm" "Ur-quan Masters" "$binary ${params[*]}" |
90 | 61 | }
|
0 commit comments