-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing distro files from Flatpak and Arch Linux #130
base: master
Are you sure you want to change the base?
Changes from 10 commits
f6e2c1b
ae96336
c367954
d812950
0882a03
6ee082b
a1e36fe
cd6c2d4
6946d98
7899d86
769d1f8
92d393c
ce074a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,28 +111,44 @@ ifndef VERSION | |
VERSION=1.3.0 | ||
endif | ||
|
||
ifndef PACKAGE | ||
PACKAGE=tremulous-grangerhub | ||
endif | ||
|
||
ifndef CLIENTBIN | ||
CLIENTBIN=tremulous | ||
endif | ||
|
||
ifndef CLIENTBINSH | ||
CLIENTBINSH=$(CLIENTBIN).sh | ||
endif | ||
|
||
ifndef SERVERBIN | ||
SERVERBIN=tremded | ||
endif | ||
|
||
ifndef SERVERBINSH | ||
SERVERBINSH=$(SERVERBIN).sh | ||
endif | ||
|
||
ifndef BASEGAME | ||
BASEGAME=gpp | ||
endif | ||
|
||
BASEGAME_CFLAGS=-I../../${MOUNT_DIR} | ||
|
||
ifndef COPYDIR | ||
COPYDIR="/usr/local/games/tremulous" | ||
COPYDIR="/opt/$(PACKAGE)" | ||
endif | ||
|
||
ifndef COPYBINDIR | ||
COPYBINDIR=$(COPYDIR) | ||
endif | ||
|
||
ifndef PREFIX | ||
PREFIX=/usr | ||
endif | ||
|
||
ifndef MOUNT_DIR | ||
MOUNT_DIR=src | ||
endif | ||
|
@@ -256,6 +272,11 @@ endif | |
BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH) | ||
BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH) | ||
|
||
# If build target not defined, assume release (for install target) | ||
ifndef B | ||
B = $(BR) | ||
endif | ||
|
||
CDIR=$(MOUNT_DIR)/client | ||
SDIR=$(MOUNT_DIR)/server | ||
RCOMMONDIR=$(MOUNT_DIR)/renderercommon | ||
|
@@ -339,8 +360,10 @@ INSTALL=install | |
MKDIR=mkdir | ||
EXTRA_FILES= | ||
CLIENT_EXTRA_FILES= | ||
INSTALL_DIR= | ||
|
||
ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) | ||
INSTALL_DIR=/opt/tremulous-grangerhub | ||
BASE_CFLAGS += -DUSE_ICON | ||
CLIENT_CFLAGS += $(SDL_CFLAGS) | ||
|
||
|
@@ -1225,14 +1248,15 @@ endif | |
@echo " Output:" | ||
$(call print_list, $(NAKED_TARGETS)) | ||
@echo "" | ||
@$(MAKE) $(TARGETS) $(B).zip V=$(V) | ||
@$(MAKE) $(TARGETS) $(B).zip $(B)/$(CLIENTBINSH) $(B)/$(SERVERBINSH) V=$(V) | ||
|
||
$(B).zip: $(TARGETS) | ||
ifeq ($(PLATFORM),darwin) | ||
@("./make-macosx-app.sh" release $(ARCH); if [ "$$?" -eq 0 ] && [ -d "$(B)/Tremulous.app" ]; then rm -f $@; cd $(B) && zip --symlinks -r9 ../../$@ GPL COPYING CC `find "Tremulous.app" -print | sed -e "s!$(B)/!!g"`; else rm -f $@; cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS); fi) | ||
@("./make-macosx-app.sh" release $(ARCH); if [ "$$?" -eq 0 ] && [ -d "$(B)/Tremulous.app" ]; then rm -f $@; cd $(B) && zip --symlinks -qr9 ../../$@ GPL COPYING CC `find "Tremulous.app" -print | sed -e "s!$(B)/!!g"`; else rm -f $@; cd $(B) && zip -qr9 ../../$@ $(NAKED_TARGETS); fi) | ||
else | ||
@rm -f $@ | ||
@(cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS)) | ||
@(cd $(B) && zip -qr9 ../../$@ $(NAKED_TARGETS)) | ||
@echo "Created $@" | ||
endif | ||
|
||
makedirs: | ||
|
@@ -2616,18 +2640,21 @@ $(B)/$(BASEGAME)_11/vm/ui.qvm: $(UIVMOBJ11) $(UIDIR)/ui_syscalls_11.asm $(Q3ASM) | |
############################################################################# | ||
|
||
$(B)/$(BASEGAME)/vms-gpp-$(VERSION).pk3: $(B)/$(BASEGAME)/vm/ui.qvm $(B)/$(BASEGAME)/vm/cgame.qvm $(B)/$(BASEGAME)/vm/game.qvm | ||
@(cd $(B)/$(BASEGAME) && zip -r vms-$(VERSION).pk3 vm/) | ||
$(echo_cmd) "Created $@" | ||
@(cd $(B)/$(BASEGAME) && zip -qr $(@F) vm/) | ||
|
||
$(B)/$(BASEGAME)_11/vms-1.1.0-$(VERSION).pk3: $(B)/$(BASEGAME)_11/vm/ui.qvm $(B)/$(BASEGAME)_11/vm/cgame.qvm | ||
@(cd $(B)/$(BASEGAME)_11 && zip -r vms-$(VERSION).pk3 vm/) | ||
$(echo_cmd) "Created $@" | ||
@(cd $(B)/$(BASEGAME)_11 && zip -qr $(@F) vm/) | ||
|
||
|
||
############################################################################# | ||
## Assets Package | ||
############################################################################# | ||
|
||
$(B)/$(BASEGAME)/data-$(VERSION).pk3: $(ASSETS_DIR)/ui/main.menu | ||
@(cd $(ASSETS_DIR) && zip -r data-$(VERSION).pk3 *) | ||
$(echo_cmd) "Created $@" | ||
@(cd $(ASSETS_DIR) && zip -qr data-$(VERSION).pk3 *) | ||
@mv $(ASSETS_DIR)/data-$(VERSION).pk3 $(B)/$(BASEGAME) | ||
|
||
############################################################################# | ||
|
@@ -2904,6 +2931,43 @@ distclean: clean toolsclean | |
dist: | ||
git archive --format zip --output $(CLIENTBIN)-$(VERSION).zip HEAD | ||
|
||
############################################################################# | ||
# INSTALL (only for Linux platforms) | ||
############################################################################# | ||
|
||
# Shell scripts for running binaries | ||
|
||
$(B)/$(CLIENTBINSH): | ||
@echo '#!/usr/bin/env sh' > $@ | ||
@echo 'cd $(COPYBINDIR)' >> $@ | ||
@echo './$(CLIENTBIN) "$$@"' >> $@ | ||
|
||
$(B)/$(SERVERBINSH): | ||
@echo '#!/usr/bin/env sh' > $@ | ||
@echo 'cd $(COPYBINDIR)' >> $@ | ||
@echo './$(SERVERBIN) "$$@"' >> $@ | ||
|
||
# Install the .desktop, icon files, license, etc. | ||
install: release | ||
ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) | ||
$(echo_cmd) "Installing for Linux platform in $(COPYBINDIR) and $(PREFIX)" | ||
@$(INSTALL) -d $(PREFIX)/bin "$(PREFIX)/share/metainfo/" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a very small nitpick here. I noticed that some paths have "/" at their end and some don't. It does not matter, but it would still be nice to make it consistent. |
||
"$(PREFIX)/share/licenses/$(PACKAGE)/" "$(PREFIX)/share/applications/" \ | ||
"$(PREFIX)/share/icons/hicolor/128x128/apps" "$(COPYBINDIR)" | ||
@cd $(BR) && for file in $(NAKED_TARGETS); do \ | ||
$(INSTALL) -D $$file $(COPYBINDIR)/$$file; \ | ||
done | ||
$(INSTALL) -D -m755 $(BR)/$(CLIENTBINSH) $(PREFIX)/bin/tremulous-grangerhub | ||
cengique marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are still installing the tremulous and tremded binaries with -grangerhub suffixes. Is this intended? |
||
$(INSTALL) -D -m755 $(BR)/$(SERVERBINSH) $(PREFIX)/bin/tremded-grangerhub | ||
$(INSTALL) -D -m644 "misc/Tremulous-Grangerhub.png" "$(PREFIX)/share/icons/hicolor/128x128/apps/" | ||
$(INSTALL) -D -m644 "misc/Tremulous-Grangerhub.desktop" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait... Why are we installing the files with different (upper case) name? It does not make sense. |
||
"$(PREFIX)/share/applications/" | ||
$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.appdata.xml" \ | ||
"$(PREFIX)/share/metainfo/" | ||
$(INSTALL) -D -m644 "COPYING" "GPL" "CC" "$(PREFIX)/share/licenses/$(PACKAGE)/" | ||
endif | ||
|
||
|
||
############################################################################# | ||
# DEPENDENCIES | ||
############################################################################# | ||
|
@@ -2917,11 +2981,13 @@ endif | |
.PHONY: all clean clean2 clean-debug clean-release \ | ||
debug default dist distclean makedirs release targets \ | ||
toolsclean toolsclean2 toolsclean-debug toolsclean-release \ | ||
$(OBJ_D_FILES) $(TOOLSOBJ_D_FILES) $(B)/scripts \ | ||
$(B)/$(BASEGAME)/data-$(VERSION).pk3 \ | ||
$(B)/$(BASEGAME)_11/vms-$(VERSION).pk3 \ | ||
$(B)/$(BASEGAME)/vms-$(VERSION).pk3 \ | ||
$(B).zip | ||
$(OBJ_D_FILES) $(TOOLSOBJ_D_FILES) $(B)/scripts | ||
|
||
# removing zip files from phony for install target not recreating them as root | ||
# $(B)/$(BASEGAME)/data-$(VERSION).pk3 \ | ||
# $(B)/$(BASEGAME)_11/vms-$(VERSION).pk3 \ | ||
# $(B)/$(BASEGAME)/vms-$(VERSION).pk3 \ | ||
# $(B).zip | ||
|
||
# If the target name contains "clean", don't do a parallel build | ||
ifneq ($(findstring clean, $(MAKECMDGOALS)),) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Desktop Entry] | ||
Name=Tremulous | ||
Comment=Aliens vs Humans, First Person Shooter game with elements of Real Time Strategy | ||
Icon=io.github.grangerhub.Tremulous | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you really want to use the "Tremulous-Grangerhub" naming scheme (which I disagree with as I mentioned), you need to fix the Icon name here as well. |
||
Exec=tremulous | ||
Terminal=false | ||
Type=Application | ||
Categories=Game;ActionGame;StrategyGame;Shooter; | ||
PrefersNonDefaultGPU=true |
cengique marked this conversation as resolved.
Show resolved
Hide resolved
cengique marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Copyright 2017 Daniel Rusek <[email protected]> --> | ||
<component type="desktop-application"> | ||
<id>io.github.grangerhub.Tremulous</id> | ||
<project_license>GPL-2.0</project_license> | ||
<metadata_license>CC-BY-SA-3.0</metadata_license> | ||
<provides> | ||
<id>tremulous.desktop</id> | ||
</provides> | ||
<launchable type="desktop-id">Tremulous-Grangerhub.desktop</launchable> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When/if the desktop file name is changed, we have to change it here (and also in the provides section) as well. Also, please note that the file name is case sensitive, so the current entry is incorrect. |
||
<name>Tremulous-Grangerhub</name> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? This will only make it confusing for our users. You can instead mention in the description that this is a "Grangerhub version of Tremulous". And it will add me much work to do to adjust the Flatpak to this unnecessary change. :-/ |
||
<developer_name>Dark Legion Development and GrangerHub</developer_name> | ||
<summary>Aliens vs Humans, First Person Shooter game with elements of Real Time Strategy</summary> | ||
<description> | ||
<p> | ||
Tremulous is a free, open source game that blends a team based FPS with | ||
elements of an RTS. | ||
</p> | ||
<p> | ||
Players can choose from 2 unique races, aliens and humans. | ||
Players on both teams are able to build working structures in-game like an | ||
RTS. | ||
</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that the GrangerHub branding was removed from the Tremulous Flatpak/desktop file name, we could instead mention it in the description. :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see that it is mentioned in the summary. Maybe we could provide more information what the Grangerhub version is in the description? |
||
<p> | ||
This snap provides the Grangerhub updated client binary that | ||
supports new features. | ||
</p> | ||
cengique marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</description> | ||
<url type="homepage">https://github.com/GrangerHub/tremulous</url> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image type="source" width="1280" height="960">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-7d1b.jpg</image> | ||
<caption>Tremulous 1.3 development with shadows</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-7672.jpg</image> | ||
<caption>Tremulous 1.3 alien dragoon jumping over human player with portal gun</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-ca9d.jpg</image> | ||
<caption>Human shooting alien acid tube with laser gun</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-7628.jpg</image> | ||
<caption>Human base with medistation and armory</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-6d22.jpg</image> | ||
<caption>Human with jetpack</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/grangerhub-trem1.3-e81b.jpg</image> | ||
<caption>Human outside in ATCS map</caption> | ||
</screenshot> | ||
<screenshot> | ||
<video>https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/videos/GrangerPub_Quick_Transit_Match-NewSource~tremulousrussian.mkv</video> | ||
<caption>Quick match in Transit map. Credit: NewSource/TremulousRussian</caption> | ||
</screenshot> | ||
<screenshot> | ||
<video>https://raw.githubusercontent.com/GrangerHub/tremulous/master/misc/videos/Tremulous_GPP_alien_gameplay-ZdrytchX~ViruS.webm</video> | ||
<caption>Tremulous GPP alien gameplay. Credit: ZdrytchX/ViruS</caption> | ||
</screenshot> | ||
</screenshots> | ||
<update_contact>[email protected]</update_contact> | ||
<content_rating type="oars-1.1"> | ||
<content_attribute id="violence-fantasy">moderate</content_attribute> | ||
<content_attribute id="violence-realistic">moderate</content_attribute> | ||
<content_attribute id="violence-bloodshed">mild</content_attribute> | ||
<content_attribute id="social-chat">intense</content_attribute> | ||
</content_rating> | ||
</component> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
/opt
?edit: Oh, the
/opt
is just a fallback for unknown platforms/configurations (without valid PREFIX)? If so, it makes sense.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following what was done in the Arch Linux packaging. Since Tremulous binaries need to stay in the data folder, it doesn't correspond to the usual Linux way of storing stuff under PREFIX/share/APPNAME format. But I'm not confident in that. There used to be a separate tremulous-data package. Not sure which approach is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, /usr/local/games seems to be an unused location in modern distros. Again, I'm not confident about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But /opt is usually not used anymore by most software. You can use something like
$PREFIX/share/tremulous
(/usr/local/share/tremulous if PREFIX is /usr/local).Take a look how we package it in Fedora:
https://koji.fedoraproject.org/koji/rpminfo?fileOrder=name&rpmID=37498623&buildrootOrder=-id&buildrootStart=0#filelist
https://koji.fedoraproject.org/koji/rpminfo?fileOrder=name&rpmID=37497768&buildrootOrder=-id&buildrootStart=0#filelist