Browse Source

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).
Bart van Strien 1 year ago
parent
commit
ac9ee9d3c7

+ 3 - 1
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)

+ 2 - 2
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 <[email protected]>  Tue, 10 Jul 2018 19:22:30 +0200
+ -- Bart van Strien <[email protected]>  @LOVE_CONFIGURE_TIMESTAMP@

+ 6 - 6
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 <[email protected]>
@@ -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.

+ 3 - 11
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