Skip to content

Commit ce074a6

Browse files
committed
Fixes for clarity and consistency requested by AsciiWolf
- remove grangerhub suffix from binaries - add fully qualified domain names to icon and desktop - fix forgotten lines in Makefile from last commit - In Makefile, remove setting of variable B that causes recursive processing delay. Instead create a second target for recursive Make call. - Change install folder from /opt to $PREFIX/share/
1 parent 92d393c commit ce074a6

5 files changed

+34
-24
lines changed

Diff for: Makefile

+28-18
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ VERSION=1.3.0
112112
endif
113113

114114
ifndef PACKAGE
115-
PACKAGE=tremulous-grangerhub
115+
PACKAGE=tremulous
116116
endif
117117

118118
ifndef CLIENTBIN
@@ -137,18 +137,18 @@ endif
137137

138138
BASEGAME_CFLAGS=-I../../${MOUNT_DIR}
139139

140+
ifndef PREFIX
141+
PREFIX=/usr
142+
endif
143+
140144
ifndef COPYDIR
141-
COPYDIR="/opt/$(PACKAGE)"
145+
COPYDIR="$(PREFIX)/share/$(PACKAGE)"
142146
endif
143147

144148
ifndef COPYBINDIR
145149
COPYBINDIR=$(COPYDIR)
146150
endif
147151

148-
ifndef PREFIX
149-
PREFIX=/usr
150-
endif
151-
152152
ifndef MOUNT_DIR
153153
MOUNT_DIR=src
154154
endif
@@ -273,9 +273,9 @@ BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
273273
BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH)
274274

275275
# If build target not defined, assume release (for install target)
276-
ifndef B
277-
B = $(BR)
278-
endif
276+
# ifndef B
277+
# B=$(BR)
278+
# endif
279279

280280
CDIR=$(MOUNT_DIR)/client
281281
SDIR=$(MOUNT_DIR)/server
@@ -1153,6 +1153,9 @@ release:
11531153
OPTIMIZE="-DNDEBUG $(OPTIMIZE)" OPTIMIZEVM="-DNDEBUG $(OPTIMIZEVM)" \
11541154
CLIENT_CFLAGS="$(CLIENT_CFLAGS)" SERVER_CFLAGS="$(SERVER_CFLAGS)" V=$(V)
11551155

1156+
install: release
1157+
@$(MAKE) install_target B=$(BR)
1158+
11561159
ifneq ($(call bin_path, tput),)
11571160
TERM_COLUMNS=$(shell if c=`tput cols`; then echo $$(($$c-4)); else echo 76; fi)
11581161
else
@@ -2948,19 +2951,26 @@ $(B)/$(SERVERBINSH):
29482951
@echo './$(SERVERBIN) "$$@"' >> $@
29492952

29502953
# Install the .desktop, icon files, license, etc.
2951-
install: release
2954+
install_target:
29522955
ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
2953-
$(echo_cmd) "Installing for Linux platform in $(COPYBINDIR) and $(PREFIX)"
2954-
@$(INSTALL) -d $(PREFIX)/bin "$(PREFIX)/share/metainfo/" \
2955-
"$(PREFIX)/share/licenses/$(PACKAGE)/" "$(PREFIX)/share/applications/" \
2956+
$(echo_cmd) "Downloading base Tremulous data and maps"
2957+
misc/download-paks.sh
2958+
$(echo_cmd) "Installing for Linux platform in $(PREFIX)"
2959+
@$(INSTALL) -d $(PREFIX)/bin "$(PREFIX)/share/metainfo" \
2960+
"$(PREFIX)/share/licenses/$(PACKAGE)" "$(PREFIX)/share/applications" \
29562961
"$(PREFIX)/share/icons/hicolor/128x128/apps" "$(COPYBINDIR)"
29572962
@cd $(BR) && for file in $(NAKED_TARGETS); do \
2958-
$(INSTALL) -D $$file $(COPYBINDIR)/$$file; \
2963+
if [[ "$$file" == "scripts" ]]; then \
2964+
$(INSTALL) -d $(COPYBINDIR)/scripts; \
2965+
$(INSTALL) -t $(COPYBINDIR)/scripts scripts/*; \
2966+
else \
2967+
$(INSTALL) -D $$file $(COPYBINDIR)/$$file; \
2968+
fi \
29592969
done
2960-
$(INSTALL) -D -m755 $(BR)/$(CLIENTBINSH) $(PREFIX)/bin/tremulous-grangerhub
2961-
$(INSTALL) -D -m755 $(BR)/$(SERVERBINSH) $(PREFIX)/bin/tremded-grangerhub
2962-
$(INSTALL) -D -m644 "misc/Tremulous-Grangerhub.png" "$(PREFIX)/share/icons/hicolor/128x128/apps/"
2963-
$(INSTALL) -D -m644 "misc/Tremulous-Grangerhub.desktop" \
2970+
$(INSTALL) -D -m755 $(BR)/$(CLIENTBINSH) $(PREFIX)/bin/tremulous
2971+
$(INSTALL) -D -m755 $(BR)/$(SERVERBINSH) $(PREFIX)/bin/tremded
2972+
$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.png" "$(PREFIX)/share/icons/hicolor/128x128/apps/"
2973+
$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.desktop" \
29642974
"$(PREFIX)/share/applications/"
29652975
$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.appdata.xml" \
29662976
"$(PREFIX)/share/metainfo/"

Diff for: misc/download-paks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ for dir in ./build/*; do
3232
if [[ -e $package ]]; then
3333
rm -f $package # only want 1 copy
3434
fi
35-
curl -OL $URL/$i
35+
curl -OL -C - $URL/$i
3636
done
3737

3838
popd

Diff for: misc/io.github.grangerhub.Tremulous.appdata.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<project_license>GPL-2.0</project_license>
66
<metadata_license>CC-BY-SA-3.0</metadata_license>
77
<provides>
8-
<id>tremulous-grangerhub.desktop</id>
8+
<id>io.github.grangerhub.Tremulous.desktop</id>
99
</provides>
10-
<launchable type="desktop-id">Tremulous-Grangerhub.desktop</launchable>
10+
<launchable type="desktop-id">io.github.grangerhub.Tremulous.desktop</launchable>
1111
<name>Tremulous</name>
1212
<developer_name>Dark Legion Development and GrangerHub</developer_name>
1313
<summary>Aliens vs Humans, First Person Shooter game with elements of Real Time Strategy (Grangerhub version)</summary>

Diff for: misc/tremulous-grangerhub.desktop renamed to misc/io.github.grangerhub.Tremulous.desktop

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
2-
Name=Tremulous Grangerhub
3-
Comment=Aliens vs Humans, First Person Shooter game with elements of Real Time Strategy (Grangerhub version)
4-
Icon=tremulous-grangerhub
2+
Name=Tremulous
3+
Comment=Aliens vs Humans, First Person Shooter game with elements of Real Time Strategy (GrangerHub version)
4+
Icon=io.github.grangerhub.Tremulous.png
55
Exec=tremulous
66
Terminal=false
77
Type=Application
File renamed without changes.

0 commit comments

Comments
 (0)