Package: freespace2-data-gog
Version: 1999-2
Severity: important
Tags: patch

Dear Maintainer,

GOG currently offers a newer version of the Freespace 2 installer than what
freespace2-data-gog expects. This leads to two problems:

1. The glob used in the override_dh_auto_configure rule doesn't match the new
installer executable.

2. Some files are not where files_sha1.txt expects them to be.

Fortunately, the SHA1 of the files are still the same, and after fixing those
issues the package is built.

I'm providing a patch which adds support for the new installer.

Thanks and regards,
Thiago Jung Bauermann



-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal'), 
(100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.7.19 (SMP w/8 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=pt_BR 
(charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

freespace2-data-gog depends on no packages.

Versions of packages freespace2-data-gog recommends:
ii  freespace2  3.7.4+repack-1build1

Versions of packages freespace2-data-gog suggests:
ii  freespace2-video  1999-1
pn  vrms              <none>

-- no debconf information
commit bff5ac5a6965b2762759ddebee20778bfb0812f8 (HEAD -> new-gog-version)
Author: Thiago Jung Bauermann <thiago.bauerm...@kolabnow.com>
Date:   Sun Sep 6 23:07:04 2020 -0300

    Adapt for newest installer from GOG
    
    Change the glob pattern to match the new GOG installer. Also, after
    extraction we need to move some files so that they are in the same places
    they were in the old installer.

diff --git a/debian/packages/freespace2-data-gog/debian/rules 
b/debian/packages/freespace2-data-gog/debian/rules
index 21f06a2f6b95..4525686b4b95 100755
--- a/debian/packages/freespace2-data-gog/debian/rules
+++ b/debian/packages/freespace2-data-gog/debian/rules
@@ -7,6 +7,11 @@
 PKD = $(abspath $(dir $(MAKEFILE_LIST)))
 PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
 
+# The GOG installer was previously called setup_freespace2_2.0.0.8.exe.
+# As of Sept 2020, it is setup_freespace_2_1.20_v2_(33372).exe, along with
+# setup_freespace_2_1.20_v2_(33372)-1.bin.
+gog_installer = $(wildcard setup_freespace*.exe)
+
 %:
        dh $@
 
@@ -14,11 +19,21 @@ override_dh_auto_clean:
        $(RM) -r app tmp
 
 override_dh_auto_configure:
-       innoextract setup_freespace2_2*.exe
+       innoextract '$(gog_installer)'
+
+move_files_installer_v2:
+       mv MANUAL.PDF *.vp ReadMe.txt refcard.pdf data2/ data3/ app/
 
 #DD=$(CURDIR)/debian/$(PKG)/usr/share/games/freespace2-open
 #M=/data/movies
+
+# In the case of installer v2, we need to move around some files so that they
+# are where files_sha1.txt expects.
+ifeq ($(findstring setup_freespace_2_1.20_v2,$(gog_installer)),)
 override_dh_auto_build:
+else
+override_dh_auto_build: move_files_installer_v2
+endif
        @echo "## checking integrity..."
        sha1sum --strict --check debian/files_sha1.txt
        #[ -d "$(DD)$(M)" ] || mkdir -v -p "$(DD)$(M)"
diff --git 
a/debian/packages/freespace2-data-gog/setup_freespace_2_1.20_v2_(33372)-1.bin_PUT_IT_HERE
 
b/debian/packages/freespace2-data-gog/setup_freespace_2_1.20_v2_(33372)-1.bin_PUT_IT_HERE
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git 
a/debian/packages/freespace2-data-gog/setup_freespace_2_1.20_v2_(33372).exe_PUT_IT_HERE
 
b/debian/packages/freespace2-data-gog/setup_freespace_2_1.20_v2_(33372).exe_PUT_IT_HERE
new file mode 100644
index 000000000000..e69de29bb2d1

Reply via email to