From 5b66cd22903fd054fb1420f06a11386664dc8b62 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sun, 8 Dec 2013 20:06:12 +0100 Subject: [PATCH] Make configure output some files in the debian folder as well, substituting the (optional) suffix where needed, also add pkg-config dependency --- platform/unix/configure.ac | 5 ++++ .../unix/debian/{changelog => changelog.in} | 2 +- platform/unix/debian/{control => control.in} | 13 +++++----- platform/unix/debian/copyright | 4 +-- platform/unix/debian/liblove-unstable.install | 1 + platform/unix/debian/love-unstable.install | 1 + platform/unix/debian/{rules => rules.in} | 6 ++--- platform/unix/genmodules | 26 +++++++++++-------- 8 files changed, 35 insertions(+), 23 deletions(-) rename platform/unix/debian/{changelog => changelog.in} (63%) rename platform/unix/debian/{control => control.in} (85%) create mode 100644 platform/unix/debian/liblove-unstable.install create mode 100644 platform/unix/debian/love-unstable.install rename platform/unix/debian/{rules => rules.in} (51%) diff --git a/platform/unix/configure.ac b/platform/unix/configure.ac index e815910bf..8d33f8d26 100644 --- a/platform/unix/configure.ac +++ b/platform/unix/configure.ac @@ -126,5 +126,10 @@ m4_include([configure-modules.ac]) AC_CONFIG_FILES([ Makefile src/Makefile + platform/unix/debian/control + platform/unix/debian/changelog + platform/unix/debian/rules ]) AC_OUTPUT + +chmod 755 platform/unix/debian/rules diff --git a/platform/unix/debian/changelog b/platform/unix/debian/changelog.in similarity index 63% rename from platform/unix/debian/changelog rename to platform/unix/debian/changelog.in index c9b52249c..4901a576a 100644 --- a/platform/unix/debian/changelog +++ b/platform/unix/debian/changelog.in @@ -1,4 +1,4 @@ -love (0.9.0~ppatest5) precise; urgency=medium +love@LOVE_SUFFIX@ (0.9.0~ppatest5) precise; urgency=medium * Upstream testing release diff --git a/platform/unix/debian/control b/platform/unix/debian/control.in similarity index 85% rename from platform/unix/debian/control rename to platform/unix/debian/control.in index d8bbc182c..629db8c1e 100644 --- a/platform/unix/debian/control +++ b/platform/unix/debian/control.in @@ -1,9 +1,10 @@ -Source: love +Source: love@LOVE_SUFFIX@ Section: games Priority: extra Maintainer: Bart van Strien Build-Depends: debhelper (>= 9), autotools-dev, + pkg-config, libdevil-dev, libfreetype6-dev, libluajit-5.1-dev, @@ -20,7 +21,7 @@ Build-Depends: debhelper (>= 9), Standards-Version: 3.9.3 Homepage: http://love2d.org -Package: liblove +Package: liblove@LOVE_SUFFIX@ Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -41,18 +42,18 @@ Depends: ${misc:Depends}, libmpg123-0 Description: LOVE is a free 2D game engine which enables easy game creation in Lua. -Package: love +Package: love@LOVE_SUFFIX@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - liblove (= ${binary:Version}) + liblove@LOVE_SUFFIX@ (= ${binary:Version}) Description: LOVE is a free 2D game engine which enables easy game creation in Lua. -Package: love-dbg +Package: love@LOVE_SUFFIX@-dbg Priority: extra Section: debug Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - love (= ${binary:Version}), + love@LOVE_SUFFIX@ (= ${binary:Version}), Description: LOVE is a free 2D game engine which enables easy game creation in Lua. diff --git a/platform/unix/debian/copyright b/platform/unix/debian/copyright index 1f06aed4b..96a64fe66 100644 --- a/platform/unix/debian/copyright +++ b/platform/unix/debian/copyright @@ -1,4 +1,4 @@ -Copyright (c) 2006-2010 LOVE Development Team +Copyright (c) 2006-2013 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -17,4 +17,4 @@ appreciated but is not required. misrepresented as being the original software. 3. This notice may not be removed or altered from any source -distribution. \ No newline at end of file +distribution. diff --git a/platform/unix/debian/liblove-unstable.install b/platform/unix/debian/liblove-unstable.install new file mode 100644 index 000000000..10a01ed09 --- /dev/null +++ b/platform/unix/debian/liblove-unstable.install @@ -0,0 +1 @@ +usr/lib/*/liblove-unstable.so.* diff --git a/platform/unix/debian/love-unstable.install b/platform/unix/debian/love-unstable.install new file mode 100644 index 000000000..77ebbd101 --- /dev/null +++ b/platform/unix/debian/love-unstable.install @@ -0,0 +1 @@ +usr/bin/love-unstable diff --git a/platform/unix/debian/rules b/platform/unix/debian/rules.in similarity index 51% rename from platform/unix/debian/rules rename to platform/unix/debian/rules.in index 93c8611ed..9ed42c92f 100755 --- a/platform/unix/debian/rules +++ b/platform/unix/debian/rules.in @@ -4,13 +4,13 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) override_dh_auto_configure: - dh_auto_configure -- CPPFLAGS=-I/usr/include/luajit-2.0 --with-lua=luajit-5.1 + dh_auto_configure -- --with-lua=luajit override_dh_link: - dh_link -plove-dev usr/lib/$(DEB_HOST_MULTIARCH)/liblove.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/liblove.so + dh_link -plove@LOVE_SUFFIX@-dev usr/lib/$(DEB_HOST_MULTIARCH)/liblove@LOVE_SUFFIX@.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/liblove@LOVE_SUFFIX@.so override_dh_strip: - dh_strip --dbg-package=love-dbg + dh_strip --dbg-package=love@LOVE_SUFFIX@-dbg %: dh $@ --parallel diff --git a/platform/unix/genmodules b/platform/unix/genmodules index 110e0bb15..9f113aab4 100644 --- a/platform/unix/genmodules +++ b/platform/unix/genmodules @@ -1,6 +1,7 @@ #!/bin/bash love_suffix="$1" +love_amsuffix="$(echo "$love_suffix" | sed 's/\-/_/g' | sed 's/\./_/g')" flags="" upper() @@ -34,7 +35,7 @@ handleimpl() printf "if $name\n" FILES="$(sourcefind "$module/$implementation" | sed "s/^/ /")" if [[ "x$FILES" != "x" ]]; then - printf "liblove${love_suffix}_la_SOURCES += \\\\\n" + printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n" printf "${FILES:0:${#FILES}-2}\n" fi printf "endif\n\n" @@ -45,7 +46,7 @@ genmodules() LOVEROOT="$(pwd)" cd src - printf "liblove${love_suffix}_la_SOURCES = \\\\\n" + printf "liblove${love_amsuffix}_la_SOURCES = \\\\\n" sourcefind "common" | sed "s/^/ /" FILES="$(sourcefind "scripts" | sed "s/^/ /")" printf "${FILES:0:${#FILES}-2}\n\n" @@ -65,7 +66,7 @@ genmodules() FILES="$(sourcefind "$module" "-maxdepth 1" | sed "s/^/ /")" if [[ "x$FILES" != "x" ]]; then - printf "liblove${love_suffix}_la_SOURCES += \\\\\n" + printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n" printf "${FILES:0:${#FILES}-2}\n" fi @@ -79,7 +80,7 @@ genmodules() flags="$flags library-$library" printf "if $NAME\n" - printf "liblove${love_suffix}_la_SOURCES += \\\\\n" + printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n" FILES="$(sourcefind "$library" | sed "s/^/ /")" printf "${FILES:0:${#FILES}-2}\nendif\n\n" done @@ -116,16 +117,16 @@ if LOVE_BUILD_EXE # LÖVE executable bin_PROGRAMS = love${love_suffix} #love_LDFLAGS = -love${love_suffix}_LDADD = liblove${love_suffix}.la \$(lua_LIBS) -love${love_suffix}_SOURCES = love.cpp +love${love_amsuffix}_LDADD = liblove${love_suffix}.la \$(lua_LIBS) +love${love_amsuffix}_SOURCES = love.cpp if LOVE_TARGET_OSX -love${love_suffix}_LIBTOOLFLAGS = --tag=OBJCXX -love${love_suffix}_SOURCES += \\ +love${love_amsuffix}_LIBTOOLFLAGS = --tag=OBJCXX +love${love_amsuffix}_SOURCES += \\ ../platform/macosx/OSX.h \\ ../platform/macosx/OSX.mm else -love${love_suffix}_LIBTOOLFLAGS = --tag=CXX +love${love_amsuffix}_LIBTOOLFLAGS = --tag=CXX endif endif @@ -138,14 +139,14 @@ endif # libLÖVE lib_LTLIBRARIES = liblove${love_suffix}.la -liblove${love_suffix}_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS) \$(SDL_LIBS) \$(freetype2_LIBS) \$(lua_LIBS) +liblove${love_amsuffix}_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS) \$(SDL_LIBS) \$(freetype2_LIBS) \$(lua_LIBS) EOF genmodules >> src/Makefile.am cat >> src/Makefile.am << EOF if !LOVE_NOMPG123 -liblove${love_suffix}_la_SOURCES += \\ +liblove${love_amsuffix}_la_SOURCES += \\ ./modules/sound/lullaby/Mpg123Decoder.cpp \\ ./modules/sound/lullaby/Mpg123Decoder.h endif @@ -155,4 +156,7 @@ echo "src/Makefile.am is updated! ^.^" echo "Generating configure-modules.ac" genflags > configure-modules.ac +cat >> configure-modules.ac << EOF +AC_SUBST([LOVE_SUFFIX], [${love_suffix}]) +EOF echo "configure-modules.ac is updated! ^.^"