12
12
rp_module_id=" jfduke3d"
13
13
rp_module_desc=" lightweight Duke3D source port by JonoF"
14
14
rp_module_licence=" GPL2 https://raw.githubusercontent.com/jonof/jfduke3d/master/GPL.TXT"
15
- rp_module_repo=" git https://github.com/jonof/jfduke3d.git master 41cd46bc "
15
+ rp_module_repo=" git https://github.com/jonof/jfduke3d.git master"
16
16
rp_module_section=" exp"
17
17
rp_module_flags=" "
18
18
@@ -32,7 +32,16 @@ function sources_jfduke3d() {
32
32
}
33
33
34
34
function build_jfduke3d() {
35
- local params=(DATADIR=$romdir /ports/duke3d RELEASE=1)
35
+ local gamedir=" duke3d"
36
+ local require=" duke3d"
37
+ local params=(RELEASE=1)
38
+
39
+ if [[ ! -z " $1 " ]] && [[ ! -z " $2 " ]]; then
40
+ gamedir=$1
41
+ require=$2
42
+ fi
43
+
44
+ params+=(DATADIR=$romdir /ports/$gamedir )
36
45
37
46
! isPlatform " x86" && params+=(USE_ASM=0)
38
47
! isPlatform " x11" && params+=(WITHOUT_GTK=1)
@@ -49,16 +58,21 @@ function build_jfduke3d() {
49
58
make clean veryclean
50
59
make " ${params[@]} "
51
60
52
- md_ret_require=" $md_build /duke3d "
61
+ md_ret_require=" $md_build /$require "
53
62
}
54
63
55
64
function install_jfduke3d() {
56
65
md_ret_files=(
57
- ' duke3d'
58
66
' build'
59
67
' README.md'
60
68
' GPL.TXT'
61
69
)
70
+
71
+ if [[ ! -z " $1 " ]]; then
72
+ md_ret_files+=(" $1 " )
73
+ else
74
+ md_ret_files+=(' duke3d' )
75
+ fi
62
76
}
63
77
64
78
function game_data_jfduke3d() {
@@ -74,9 +88,22 @@ function game_data_jfduke3d() {
74
88
fi
75
89
}
76
90
77
- function configure_jfduke3d() {
78
- local config=" $md_conf_root /jfduke3d/duke3d.cfg"
91
+ function config_file_jfduke3d() {
92
+ local config=" $1 "
93
+ if [[ -f " $config " ]] || isPlatform " x86" ; then
94
+ return
95
+ fi
96
+
97
+ # no config file exists, creating one
98
+ # with alsa as the sound driver
99
+ cat > " $config " << _EOF_
100
+ [Sound Setup]
101
+ MusicParams = "audio.driver=alsa"
102
+ _EOF_
103
+ chown -R $user :$user " $config "
104
+ }
79
105
106
+ function configure_jfduke3d() {
80
107
mkRomDir " ports/duke3d"
81
108
moveConfigDir " $home /.jfduke3d" " $md_conf_root /jfduke3d"
82
109
@@ -87,16 +114,5 @@ function configure_jfduke3d() {
87
114
return
88
115
fi
89
116
game_data_jfduke3d
90
-
91
- if [[ -f " $config " ]]; then
92
- return
93
- fi
94
-
95
- # no config file exists, creating one
96
- # with alsa as the sound driver
97
- cat > " $config " << _EOF_
98
- [Sound Setup]
99
- MusicParams = "audio.driver=alsa"
100
- _EOF_
101
- chown -R $user :$user " $config "
117
+ config_file_jfduke3d " $md_conf_root /jfduke3d/duke3d.cfg"
102
118
}
0 commit comments