Browse Source

Make configure output some files in the debian folder as well, substituting the (optional) suffix where needed, also add pkg-config dependency

Bart van Strien 11 years ago
parent
commit
5b66cd2290

+ 5 - 0
platform/unix/configure.ac

@@ -126,5 +126,10 @@ m4_include([configure-modules.ac])
 AC_CONFIG_FILES([
 AC_CONFIG_FILES([
 	Makefile
 	Makefile
 	src/Makefile
 	src/Makefile
+	platform/unix/debian/control
+	platform/unix/debian/changelog
+	platform/unix/debian/rules
 ])
 ])
 AC_OUTPUT
 AC_OUTPUT
+
+chmod 755 platform/unix/debian/rules

+ 1 - 1
platform/unix/debian/changelog → 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
   * Upstream testing release
 
 

+ 7 - 6
platform/unix/debian/control → platform/unix/debian/control.in

@@ -1,9 +1,10 @@
-Source: love
+Source: love@LOVE_SUFFIX@
 Section: games
 Section: games
 Priority: extra
 Priority: extra
 Maintainer: Bart van Strien <[email protected]>
 Maintainer: Bart van Strien <[email protected]>
 Build-Depends: debhelper (>= 9),
 Build-Depends: debhelper (>= 9),
                autotools-dev,
                autotools-dev,
+               pkg-config,
                libdevil-dev,
                libdevil-dev,
                libfreetype6-dev,
                libfreetype6-dev,
                libluajit-5.1-dev,
                libluajit-5.1-dev,
@@ -20,7 +21,7 @@ Build-Depends: debhelper (>= 9),
 Standards-Version: 3.9.3
 Standards-Version: 3.9.3
 Homepage: http://love2d.org
 Homepage: http://love2d.org
 
 
-Package: liblove
+Package: liblove@LOVE_SUFFIX@
 Architecture: any
 Architecture: any
 Multi-Arch: same
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Pre-Depends: ${misc:Pre-Depends}
@@ -41,18 +42,18 @@ Depends: ${misc:Depends},
          libmpg123-0
          libmpg123-0
 Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
 Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
 
 
-Package: love
+Package: love@LOVE_SUFFIX@
 Architecture: any
 Architecture: any
 Multi-Arch: same
 Multi-Arch: same
 Depends: ${misc:Depends},
 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.
 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
 Priority: extra
 Section: debug
 Section: debug
 Architecture: any
 Architecture: any
 Multi-Arch: same
 Multi-Arch: same
 Depends: ${misc:Depends},
 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.
 Description: LOVE is a free 2D game engine which enables easy game creation in Lua.

+ 2 - 2
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
 This software is provided 'as-is', without any express or implied
 warranty. In no event will the authors be held liable for any damages
 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.
 misrepresented as being the original software.
 
 
 3. This notice may not be removed or altered from any source
 3. This notice may not be removed or altered from any source
-distribution.
+distribution.

+ 1 - 0
platform/unix/debian/liblove-unstable.install

@@ -0,0 +1 @@
+usr/lib/*/liblove-unstable.so.*

+ 1 - 0
platform/unix/debian/love-unstable.install

@@ -0,0 +1 @@
+usr/bin/love-unstable

+ 3 - 3
platform/unix/debian/rules → 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)
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 
 override_dh_auto_configure:
 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:
 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:
 override_dh_strip:
-	dh_strip --dbg-package=love-dbg
+	dh_strip --dbg-package=love@LOVE_SUFFIX@-dbg
 
 
 %:
 %:
 	dh  $@ --parallel
 	dh  $@ --parallel

+ 15 - 11
platform/unix/genmodules

@@ -1,6 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 
 
 love_suffix="$1"
 love_suffix="$1"
+love_amsuffix="$(echo "$love_suffix" | sed 's/\-/_/g' | sed 's/\./_/g')"
 
 
 flags=""
 flags=""
 upper()
 upper()
@@ -34,7 +35,7 @@ handleimpl()
 	printf "if $name\n"
 	printf "if $name\n"
 	FILES="$(sourcefind "$module/$implementation" | sed "s/^/    /")"
 	FILES="$(sourcefind "$module/$implementation" | sed "s/^/    /")"
 	if [[ "x$FILES" != "x" ]]; then
 	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"
 		printf "${FILES:0:${#FILES}-2}\n"
 	fi
 	fi
 	printf "endif\n\n"
 	printf "endif\n\n"
@@ -45,7 +46,7 @@ genmodules()
 	LOVEROOT="$(pwd)"
 	LOVEROOT="$(pwd)"
 	cd src
 	cd src
 
 
-	printf "liblove${love_suffix}_la_SOURCES = \\\\\n"
+	printf "liblove${love_amsuffix}_la_SOURCES = \\\\\n"
 	sourcefind "common" | sed "s/^/    /"
 	sourcefind "common" | sed "s/^/    /"
 	FILES="$(sourcefind "scripts" | sed "s/^/    /")"
 	FILES="$(sourcefind "scripts" | sed "s/^/    /")"
 	printf "${FILES:0:${#FILES}-2}\n\n"
 	printf "${FILES:0:${#FILES}-2}\n\n"
@@ -65,7 +66,7 @@ genmodules()
 
 
 		FILES="$(sourcefind "$module" "-maxdepth 1" | sed "s/^/    /")"
 		FILES="$(sourcefind "$module" "-maxdepth 1" | sed "s/^/    /")"
 		if [[ "x$FILES" != "x" ]]; then
 		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"
 			printf "${FILES:0:${#FILES}-2}\n"
 		fi
 		fi
 
 
@@ -79,7 +80,7 @@ genmodules()
 		flags="$flags library-$library"
 		flags="$flags library-$library"
 
 
 		printf "if $NAME\n"
 		printf "if $NAME\n"
-		printf "liblove${love_suffix}_la_SOURCES += \\\\\n"
+		printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n"
 		FILES="$(sourcefind "$library" | sed "s/^/    /")"
 		FILES="$(sourcefind "$library" | sed "s/^/    /")"
 		printf "${FILES:0:${#FILES}-2}\nendif\n\n"
 		printf "${FILES:0:${#FILES}-2}\nendif\n\n"
 	done
 	done
@@ -116,16 +117,16 @@ if LOVE_BUILD_EXE
 # LÖVE executable
 # LÖVE executable
 bin_PROGRAMS = love${love_suffix}
 bin_PROGRAMS = love${love_suffix}
 #love_LDFLAGS =
 #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
 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.h \\
     ../platform/macosx/OSX.mm
     ../platform/macosx/OSX.mm
 else
 else
-love${love_suffix}_LIBTOOLFLAGS = --tag=CXX
+love${love_amsuffix}_LIBTOOLFLAGS = --tag=CXX
 endif
 endif
 endif
 endif
 
 
@@ -138,14 +139,14 @@ endif
 
 
 # libLÖVE
 # libLÖVE
 lib_LTLIBRARIES = liblove${love_suffix}.la
 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
 EOF
 
 
 genmodules >> src/Makefile.am
 genmodules >> src/Makefile.am
 
 
 cat >> src/Makefile.am << EOF
 cat >> src/Makefile.am << EOF
 if !LOVE_NOMPG123
 if !LOVE_NOMPG123
-liblove${love_suffix}_la_SOURCES += \\
+liblove${love_amsuffix}_la_SOURCES += \\
     ./modules/sound/lullaby/Mpg123Decoder.cpp \\
     ./modules/sound/lullaby/Mpg123Decoder.cpp \\
     ./modules/sound/lullaby/Mpg123Decoder.h
     ./modules/sound/lullaby/Mpg123Decoder.h
 endif
 endif
@@ -155,4 +156,7 @@ echo "src/Makefile.am is updated! ^.^"
 
 
 echo "Generating configure-modules.ac"
 echo "Generating configure-modules.ac"
 genflags > 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! ^.^"
 echo "configure-modules.ac is updated! ^.^"