From ac9ee9d3c7f9523094379494ae0391808eb18790 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sat, 6 Jan 2024 12:04:25 +0100 Subject: [PATCH] Update debian package files for cmake variables And automatically get the timestamp for the changelog too. That does require an update to cmake 3.7, but as far as I can tell we never use a cmake version older than 3.16 (ubuntu 20.04). --- CMakeLists.txt | 4 +++- platform/unix/debian/changelog.in | 4 ++-- platform/unix/debian/control.in | 12 ++++++------ platform/unix/debian/rules.in | 14 +++----------- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5824e8038..55af1575a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree build.") endif() -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.7) project(love) @@ -2185,6 +2185,8 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") include(GNUInstallDirs) + string(TIMESTAMP LOVE_CONFIGURE_TIMESTAMP "%a, %d %b %Y %H:%M:%S +0000" UTC) + file(COPY platform/unix/debian/ DESTINATION debian PATTERN "*.in" EXCLUDE) configure_file(platform/unix/debian/control.in debian/control @ONLY) configure_file(platform/unix/debian/changelog.in debian/changelog @ONLY) diff --git a/platform/unix/debian/changelog.in b/platform/unix/debian/changelog.in index 1d528841a..11210aacb 100644 --- a/platform/unix/debian/changelog.in +++ b/platform/unix/debian/changelog.in @@ -1,5 +1,5 @@ -love@LOVE_SUFFIX@ (11.2~pre3458ppa1) trusty; urgency=medium +@LOVE_EXE_NAME@ (@LOVE_VERSION_STR@ppa1) focal; urgency=medium * Upstream testing release - -- Bart van Strien Tue, 10 Jul 2018 19:22:30 +0200 + -- Bart van Strien @LOVE_CONFIGURE_TIMESTAMP@ diff --git a/platform/unix/debian/control.in b/platform/unix/debian/control.in index e435df0ff..85e4f96c4 100644 --- a/platform/unix/debian/control.in +++ b/platform/unix/debian/control.in @@ -1,4 +1,4 @@ -Source: love@LOVE_SUFFIX@ +Source: @LOVE_EXE_NAME@ Section: games Priority: extra Maintainer: Bart van Strien @@ -22,7 +22,7 @@ Build-Depends: debhelper (>= 9), Standards-Version: 3.9.5 Homepage: http://love2d.org -Package: liblove@LOVE_SUFFIX@0 +Package: @LOVE_LIB_NAME@0 Section: libs Architecture: any Multi-Arch: same @@ -32,20 +32,20 @@ Depends: ${misc:Depends}, Description: 2D game engine - runtime LOVE is a free 2D game engine which enables easy game creation in Lua. -Package: love@LOVE_SUFFIX@ +Package: @LOVE_EXE_NAME@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, - liblove@LOVE_SUFFIX@0 (= ${binary:Version}) + @LOVE_LIB_NAME@0 (= ${binary:Version}) Description: 2D game engine LOVE is a free 2D game engine which enables easy game creation in Lua. -Package: liblove@LOVE_SUFFIX@-dbg +Package: @LOVE_LIB_NAME@-dbg Priority: extra Section: debug Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - liblove@LOVE_SUFFIX@0 (= ${binary:Version}) + @LOVE_LIB_NAME@0 (= ${binary:Version}) Description: 2D game engine - debug symbols LOVE is a free 2D game engine which enables easy game creation in Lua. diff --git a/platform/unix/debian/rules.in b/platform/unix/debian/rules.in index f55809f6f..ab7bd1434 100755 --- a/platform/unix/debian/rules.in +++ b/platform/unix/debian/rules.in @@ -1,22 +1,14 @@ #!/usr/bin/make -f -commonflags = -Wall -Wno-maybe-uninitialized -Wno-strict-aliasing -CFLAGS += $(commonflags) -CXXFLAGS += $(commonflags) - - %: - dh $@ --parallel --with autoreconf + dh $@ --parallel override_dh_auto_clean: dh_auto_clean rm -f platform/unix/love-unstable.6 -override_dh_auto_configure: - dh_auto_configure -- --with-lua=luajit - override_dh_installdocs: - dh_installdocs --link-doc=liblove@LOVE_SUFFIX@0 + dh_installdocs --link-doc=@LOVE_LIB_NAME@0 override_dh_installchangelogs: dh_installchangelogs changes.txt @@ -26,6 +18,6 @@ override_dh_installman: dh_installman override_dh_strip: - dh_strip -pliblove@LOVE_SUFFIX@0 --dbg-package=liblove@LOVE_SUFFIX@-dbg + dh_strip -p@LOVE_LIB_NAME@0 --dbg-package=@LOVE_LIB_NAME@-dbg dh_strip --remaining-packages