-
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 8 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,46 @@ 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: release | ||
ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) | ||
$(echo_cmd) "Installing for Linux platform in $(COPYBINDIR) and $(PREFIX)" | ||
@$(MKDIR) -p $(COPYBINDIR) | ||
@cd $(BR) && for file in $(NAKED_TARGETS); do \ | ||
$(INSTALL) -D $$file $(COPYBINDIR)/$$file; \ | ||
done | ||
# @(cd $(BR) && $(INSTALL) $() $(COPYBINDIR) ) | ||
# TODO: create these .sh files: | ||
@$(INSTALL) -d $(PREFIX)/bin | ||
@$(INSTALL) -D -m755 $(BR)/$(CLIENTBINSH) $(BR)/$(SERVERBINSH) $(PREFIX)/bin | ||
# Install the .desktop, icon files, license, etc. | ||
@$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.png" "$(PREFIX)/share/pixmaps/tremulous.png" | ||
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. I am not sure I understand. The icon name in the desktop file is Also, please never use the pixmaps directory, it is deprecated and already was for last 15 years or so. Use 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. Also renamed icon to Tremulous-Grangerhub. Corrected the install directory.
cengique marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.desktop" \ | ||
"$(PREFIX)/share/applications/tremulous.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. No, this is incorrect. The whole point of renaming the desktop file (and its matching launchable tag in the AppStream metadata file) was to keep it at the new If you want to install the desktop/icon files as just 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. Got it. I renamed them to Tremulous-Grangerhub. 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. No, this is still not ideal and even more broken now (since the actual icon file does not match Icon field in the desktop file). I was talking about the rDNS formatted name and I even sent suggestions to apply. 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. By the way, rDNS naming conventions for desktop files will probably became compulsory on many Linux distributions / packaging formats in the future. So my change was also future-proof. If you use this "Tremulous-Grangerhub" name format because of the upcoming official Grangerhub Snap, then please consider doing these changes in downstream (patch for the Snap package), not directly in upstream. But it is up to you. I just do not personally like these changes, that's probably my problem.
cengique marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@$(INSTALL) -d "$(PREFIX)/share/metainfo/" "$(PREFIX)/share/licenses/$(PACKAGE)/" | ||
@$(INSTALL) -D -m644 "misc/io.github.grangerhub.Tremulous.appdata.xml" \ | ||
"$(PREFIX)/share/metainfo/" | ||
@$(INSTALL) -D -m644 "COPYING" "$(PREFIX)/share/licenses/$(PACKAGE)/" | ||
@$(INSTALL) -D -m644 "GPL" "$(PREFIX)/share/licenses/$(PACKAGE)/" | ||
@$(INSTALL) -D -m644 "CC" "$(PREFIX)/share/licenses/$(PACKAGE)/" | ||
endif | ||
|
||
|
||
############################################################################# | ||
# DEPENDENCIES | ||
############################################################################# | ||
|
@@ -2917,11 +2984,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)),) | ||
|
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">io.github.grangerhub.Tremulous.desktop</launchable> | ||
<name>Tremulous</name> | ||
<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://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-7d1b.jpg?raw=true</image> | ||
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 note: I may be wrong, but I think that the correct URL should be Same with the other screenshots/videos. 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. Yeah, this sounds right. I used to be able to get those URLs but somehow I can't seem to get to them. But just using your example works (for existing files). I will re-confirm once I merge this PR to master. |
||
<caption>Tremulous 1.3 development with shadows</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-7672.jpg?raw=true</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://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-ca9d.jpg?raw=true</image> | ||
<caption>Human shooting alien acid tube with laser gun</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-7628.jpg?raw=true</image> | ||
<caption>Human base with medistation and armory</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-6d22.jpg?raw=true</image> | ||
<caption>Human with jetpack</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image type="source" width="1366" height="768">https://github.com/GrangerHub/tremulous/blob/master/misc/grangerhub-trem1.3-e81b.jpg?raw=true</image> | ||
<caption>Human outside in ATCS map</caption> | ||
</screenshot> | ||
<screenshot> | ||
<video>https://github.com/GrangerHub/tremulous/blob/master/misc/videos/GrangerPub_Quick_Transit_Match-NewSource~tremulousrussian.mkv?raw=true</video> | ||
<caption>Quick match in Transit map. Credit: NewSource/TremulousRussian</caption> | ||
</screenshot> | ||
<screenshot> | ||
<video>https://github.com/GrangerHub/tremulous/blob/master/misc/videos/Tremulous_GPP_alien_gameplay-ZdrytchX~ViruS.webm?raw=true</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> |
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 | ||
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
|
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