X-Debbugs-Cc: pkg-fgfs-c...@lists.alioth.debian.org Hi,
I took a stab at creating Debian packages for flightgear 2.6.0. The resulting packages now work for me (tm). Some polishing is certainly needed, still. Before going there, I'd like to check if I'm on the right track and make sure to avoid any duplication of work. Attached are diffs against the most recent svn revision of simgear, fgfs-base, and flightgear. Note that simgear-2.4.0-1.1 is not included in svn, yet, so those additions re-appear in the attached diff. Note, again, that this is work in progress. Known issues and lose ends are documented, though. Regards Markus Wanner
Index: debian/control =================================================================== --- debian/control (revision 191) +++ debian/control (working copy) @@ -9,13 +9,13 @@ libglu1-mesa-dev | libglu1-xorg-dev | xlibmesa-glu-dev | libglu-dev, freeglut3-dev | libglut3-dev, zlib1g-dev, libjpeg8-dev | libjpeg62-dev | libjpeg-dev, libboost-dev, libplib-dev (>= 1.8.5), libopenscenegraph-dev (>> 3.0.0), - libopenal-dev, libalut-dev, libsvn-dev, autotools-dev + libopenal-dev, libalut-dev, libsvn-dev, cmake (>= 2.6) Standards-Version: 3.7.3 Homepage: http://www.simgear.org/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-fgfs/simgear/trunk/ Vcs-Svn: svn://svn.debian.org/pkg-fgfs/simgear/trunk/ -Package: simgear2.4.0 +Package: simgear2.6.0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: simgear0 @@ -29,7 +29,7 @@ Package: simgear-dev Architecture: any Section: devel -Depends: simgear2.4.0 (= ${binary:Version}), libplib-dev, libopenscenegraph-dev, libc6-dev, ${misc:Depends} +Depends: simgear2.6.0 (= ${binary:Version}), libplib-dev, libopenscenegraph-dev, libc6-dev, ${misc:Depends} Description: Simulator Construction Gear -- development files SimGear is a collection of libraries useful for constructing simulation and visualization applications such as FlightGear Index: debian/source/format =================================================================== --- debian/source/format (revision 0) +++ debian/source/format (revision 0) @@ -0,0 +1 @@ +3.0 (quilt) Index: debian/changelog =================================================================== --- debian/changelog (revision 191) +++ debian/changelog (working copy) @@ -1,3 +1,30 @@ +simgear (2.6.0-1) unstable; urgency=low + + * New upstream release. + * Replace Build-Dependency on autotools-dev with cmake, as required by + this version of simgear. + * Adjust rules to build with cmake, building in a separate directory. + * Switch to dpkg-source 3.0 (quilt) format + * Drop patch to hla/Makefile, it's not required with cmake, anymore. + * Drop addition of singleton.hpp from Boost - that file is now shipped + with the upstream tarball. + * Drop patch to simgear/nasal/naref.h, it got applied upstream. + + * FIXME: man, info and bindir might not comply with the Debian policy, I + didn't check, yet. + + -- Markus Wanner <mar...@bluegap.ch> Thu, 10 May 2012 22:03:45 +0200 + +simgear (2.4.0-1.1) unstable; urgency=low + + * Non-Maintainer Upload. + + * simgear/structure/Singleton.hxx: Inline copy of + boost/pool/detail/singleton.hpp by copy of that file, since it is no + longer present in boost post 1.47. Closes: #652788, #652775, #652797. + + -- Steve M. Robbins <s...@debian.org> Sun, 29 Jan 2012 23:19:58 -0600 + simgear (2.4.0-1) unstable; urgency=low * New upstream release. Index: debian/copyright =================================================================== --- debian/copyright (revision 191) +++ debian/copyright (working copy) @@ -139,3 +139,30 @@ > would be okay. Yes, that's fine. + +The file /simgear/structure/boost_singleton.hpp is Copyright (C) 2000 Stephen + Cleary and distributed under the Boost Software License, Version 1.0: + + Boost Software License - Version 1.0 - August 17th, 2003 + + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. Index: debian/rules =================================================================== --- debian/rules (revision 191) +++ debian/rules (working copy) @@ -6,9 +6,9 @@ #export DH_VERBOSE=1 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -CFLAGS=-O0 -g +CFLAGS=-O0 -g -fPIC -pipe else -CFLAGS=-O2 -g +CFLAGS=-O2 -g -fPIC -pipe endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -23,10 +23,22 @@ configure-stamp: dh_testdir - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \ - ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ - --with-jpeg-factory + -rm -rf build + -mkdir build + (cd build && cmake \ + -D CMAKE_BUILD_TYPE="Release" \ + -D JPEG_FACTORY=1 \ + -D ENABLE_LIBSVN=1 \ + -D CMAKE_CXX_FLAGS="$(CFLAGS) -D__STDC_CONSTANT_MACROS" \ + -D CMAKE_C_FLAGS="$(CFLAGS)" \ + -D CMAKE_INSTALL_PREFIX:PATH="/usr" \ + .. \ + ) + + # FIXME: old rules had --mandir=\$${prefix}/share/man + # FIXME: old rules had --infodir=\$${prefix}/share/info + touch configure-stamp build: configure-stamp build-stamp @@ -34,15 +46,16 @@ dh_testdir # First build the shared libraries - $(MAKE) CPPFLAGS="-fPIC -pipe" + #$(MAKE) CPPFLAGS="-fPIC -pipe" + $(MAKE) -C build # "convert" .a to .so (yikes) - $(MAKE) -f debian/sorules + ### $(MAKE) -f debian/sorules - $(MAKE) clean + ### $(MAKE) clean # Then build the static library without PIC - $(MAKE) CPPFLAGS="-pipe" + ### $(MAKE) CPPFLAGS="-pipe" touch build-stamp @@ -51,19 +64,12 @@ dh_testroot rm -f build-stamp configure-stamp - $(MAKE) -f debian/sorules clean - -$(MAKE) -i clean - -$(MAKE) -i distclean - # distclean seems to not always be thorough - -find -name .deps -type d -exec rm -rf {} \; - # regenerated during build - -rm -f simgear/version.h + ### $(MAKE) -f debian/sorules clean + ### -$(MAKE) -C build -i clean + -rm -rf build dh_clean - # update from autotools-dev - cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub . - install: build dh_testdir dh_testroot @@ -71,15 +77,17 @@ dh_installdirs # Install static libraries and include files - $(MAKE) install prefix=$(CURDIR)/debian/simgear-dev/usr + $(MAKE) DESTDIR=$(CURDIR)/debian/simgear-dev -C build install + ### prefix=$(CURDIR)/debian/simgear-dev/usr + # Install shared libraries install -d debian/$(package)/usr/lib find simgear -name 'lib*.so.*' -exec \ install -m 755 {} $(CURDIR)/debian/$(package)/usr/lib \; (cd debian/$(package)/usr/lib && for ii in `ls lib*.so.*`; do \ ln -s $$ii `echo $$ii|sed 's/\\.so\\..*/.so/'`; done) - mv debian/$(package)/usr/lib/lib*.so debian/simgear-dev/usr/lib + ### mv debian/$(package)/usr/lib/lib*.so debian/simgear-dev/usr/lib # Build architecture-independent files here.
Index: debian/control =================================================================== --- debian/control (revision 191) +++ debian/control (working copy) @@ -1,4 +1,4 @@ -Source: fgfs-base +Source: flightgear-data Section: games Priority: extra Maintainer: Debian FlightGear Crew <pkg-fgfs-c...@lists.alioth.debian.org> @@ -9,10 +9,11 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-base/trunk/ Vcs-Svn: svn://svn.debian.org/pkg-fgfs/fgfs-base/trunk/ -Package: fgfs-base +Package: flightgear-data Architecture: all Depends: tzdata -Breaks: flightgear (<< 2.4.0) +Replaces: fgfs-base (<< 2.6.0-1~) +Breaks: flightgear (<< 2.6.0), fgfs-base (<< 2.6.0-1~) Description: Flight Gear Flight Simulator -- base files Flight Gear is a free and highly sophisticated flight simulator. . @@ -22,30 +23,62 @@ This package does not contain the flight simulator itself. If you want to fly, install the flightgear package. -Package: fgfs-aircraft-base +Package: flightgear-aircraft-data Architecture: all -Replaces: fgfs-base (<< 2.0.0) +Replaces: fgfs-base (<< 2.0.0), fgfs-aircraft-base (<< 2.6.0-1~) +Breaks: flightgear (<< 2.6.0), fgfs-aircraft-base (<< 2.6.0-1~) Description: Flight Gear Flight Simulator -- standard aircraft Flight Gear is a free and highly sophisticated flight simulator. . This package contains the aircraft models that come with the standard Flight Gear distribution. -Package: fgfs-models-base +Package: flightgear-models-data Architecture: all -Replaces: fgfs-base (<< 2.0.0) +Replaces: fgfs-base (<< 2.0.0), fgfs-models-base (<< 2.6.0-1~) +Breaks: flightgear (<< 2.6.0), fgfs-models-base (<< 2.6.0-1~) Description: Flight Gear Flight Simulator -- standard models Flight Gear is a free and highly sophisticated flight simulator. . This package contains the object models that come with the standard Flight Gear distribution. -Package: fgfs-scenery-base +Package: flightgear-scenery-data Architecture: all -Replaces: fgfs-base (<< 2.4.0) +Replaces: fgfs-base (<< 2.4.0), fgfs-scenery-data (<< 2.6.0-1~) +Breaks: flightgear (<< 2.6.0), fgfs-scenery-base (<< 2.6.0-1~) Description: Flight Gear Flight Simulator -- standard scenery Flight Gear is a free and highly sophisticated flight simulator. . This package contains the scenery data that come with the standard Flight Gear distribution. It covers the San Francisco area. + +Package: fgfs-base +Depends: flightgear-data, ${misc:Depends} +Architecture: all +Section: oldlibs +Description: transitional dummy package + This is a transitional dummy package. It can safely be removed. + +Package: fgfs-aircraft-base +Depends: flightgear-aircraft-data, ${misc:Depends} +Architecture: all +Section: oldlibs +Description: transitional dummy package + This is a transitional dummy package. It can safely be removed. + +Package: fgfs-models-base +Depends: flightgear-models-data, ${misc:Depends} +Architecture: all +Section: oldlibs +Description: transitional dummy package + This is a transitional dummy package. It can safely be removed. + +Package: fgfs-scenery-base +Depends: flightgear-scenery-data, ${misc:Depends} +Architecture: all +Section: oldlibs +Description: transitional dummy package + This is a transitional dummy package. It can safely be removed. + Index: debian/links =================================================================== --- debian/links (revision 191) +++ debian/links (working copy) @@ -1 +1 @@ -usr/share/games/FlightGear/Docs usr/share/doc/fgfs-base/Docs +usr/share/games/FlightGear/Docs usr/share/doc/flightgear-data/Docs Index: debian/changelog =================================================================== --- debian/changelog (revision 191) +++ debian/changelog (working copy) @@ -1,3 +1,14 @@ +flightgear-data (2.6.0-1) unstable; urgency=low + + * New upstream release. + * Rename fgfs-base to flightgear-data and flightgear-*-base to + flightgear-*-data to unify and follow naming convention of the + upstream project. + * Drop 'Traffic' directory, which is now part of the 'AI' + directory. + + -- Markus Wanner <mar...@bluegap.ch> Fri, 11 May 2012 11:06:09 +0200 + fgfs-base (2.4.0-1) unstable; urgency=low * New upstream release. Index: debian/rules =================================================================== --- debian/rules (revision 191) +++ debian/rules (working copy) @@ -39,29 +39,30 @@ $(DATA)/Nasal $(DATA)/Navaids $(DATA)/Protocol \ $(DATA)/Shaders $(DATA)/Sounds \ $(DATA)/Textures $(DATA)/Textures.high \ - $(DATA)/Traffic $(DATA)/Translations $(DATA)/gui \ + $(DATA)/Translations $(DATA)/gui \ $(DATA)/*.dtd $(DATA)/*.xml $(DATA)/version \ - debian/fgfs-base/usr/share/games/flightgear + debian/flightgear-data/usr/share/games/flightgear cp -a $(DATA)/Aircraft \ - debian/fgfs-aircraft-base/usr/share/games/flightgear + debian/flightgear-aircraft-data/usr/share/games/flightgear cp -a $(DATA)/Models \ - debian/fgfs-models-base/usr/share/games/flightgear + debian/flightgear-models-data/usr/share/games/flightgear cp -a $(DATA)/Scenery \ - debian/fgfs-scenery-base/usr/share/games/flightgear - cp -a $(DATA)/Docs debian/fgfs-base/usr/share/games/flightgear + debian/flightgear-scenery-data/usr/share/games/flightgear + cp -a $(DATA)/Docs debian/flightgear-data/usr/share/games/flightgear - # put shared aircraft parts into fgfs-base rather than fgfs-aircraft-base - dh_installdirs --package=fgfs-base usr/share/games/flightgear/Aircraft - mv debian/fgfs-aircraft-base/usr/share/games/flightgear/Aircraft/Generic \ - debian/fgfs-aircraft-base/usr/share/games/flightgear/Aircraft/Instruments \ - debian/fgfs-aircraft-base/usr/share/games/flightgear/Aircraft/Instruments-3d \ - debian/fgfs-base/usr/share/games/flightgear/Aircraft + # put shared aircraft parts into flightgear-data rather than + # flightgear-aircraft-data + dh_installdirs --package=flightgear-data usr/share/games/flightgear/Aircraft + mv debian/flightgear-aircraft-data/usr/share/games/flightgear/Aircraft/Generic \ + debian/flightgear-aircraft-data/usr/share/games/flightgear/Aircraft/Instruments \ + debian/flightgear-aircraft-data/usr/share/games/flightgear/Aircraft/Instruments-3d \ + debian/flightgear-data/usr/share/games/flightgear/Aircraft # fix some insane permissions - find debian/fgfs-base/usr/share/games/flightgear -type f -exec chmod 644 {} \; - find debian/fgfs-aircraft-base/usr/share/games/flightgear -type f -exec chmod 644 {} \; - find debian/fgfs-models-base/usr/share/games/flightgear -type f -exec chmod 644 {} \; - find debian/fgfs-scenery-base/usr/share/games/flightgear -type f -exec chmod 644 {} \; + find debian/flightgear-data/usr/share/games/flightgear -type f -exec chmod 644 {} \; + find debian/flightgear-aircraft-data/usr/share/games/flightgear -type f -exec chmod 644 {} \; + find debian/flightgear-models-data/usr/share/games/flightgear -type f -exec chmod 644 {} \; + find debian/flightgear-scenery-data/usr/share/games/flightgear -type f -exec chmod 644 {} \; # Build architecture-independent files here. binary-indep: install
Index: debian/changelog =================================================================== --- debian/changelog (revision 191) +++ debian/changelog (working copy) @@ -1,3 +1,20 @@ +flightgear (2.6.0-1) unstable; urgency=low + + * Non-maintainer upload. + * New upstream release. Closes: #673314. + * Replace Build-Dependency on autotools-dev with cmake, as required by + this version of flightgear. + * Adjust rules to build with cmake, building in a separate directory. + * Adapt dependencies to renamed base data package (flightgear-data). + * Switch to dpkg-source 3.0 (quilt) format + * Drop patch to src/Main/metar_main.cxx, it got applied upstream. + + * FIXME: parallel builds disabled, due to issues with cmake + * FIXME: man, info and bindir might not comply with the Debian policy, I + didn't check, yet. + + -- Markus Wanner <mar...@bluegap.ch> Fri, 11 May 2012 08:58:44 +0200 + flightgear (2.4.0-1) unstable; urgency=low * New upstream release. Closes: #638588. Index: debian/patches/series =================================================================== --- debian/patches/series (revision 0) +++ debian/patches/series (revision 0) @@ -0,0 +1 @@ +comp.patch Index: debian/patches/comp.patch =================================================================== --- debian/patches/comp.patch (revision 0) +++ debian/patches/comp.patch (revision 0) @@ -0,0 +1,37 @@ +--- a/utils/TerraSync/terrasync.cxx ++++ b/utils/TerraSync/terrasync.cxx +@@ -42,6 +42,7 @@ + + #include <stdlib.h> // atoi() atof() abs() system() + #include <signal.h> // signal() ++#include <unistd.h> // sleep() + + #include <simgear/compiler.h> + +@@ -310,7 +311,7 @@ + "repeat the signal to force immediate termination.\n"; + msg[17] = '0' + param / 10; + msg[18] = '0' + param % 10; +- write(1, msg, sizeof(msg) - 1); ++ ::write(1, msg, sizeof(msg) - 1); + terminating = true; + signal(param, prior_signal_handlers[param]); + theSocket.close(); +@@ -520,7 +521,7 @@ + perror(0); + exit(2); + } +- pidstream << getpid() << endl; ++ pidstream << ::getpid() << endl; + pidstream.close(); + } + +@@ -647,7 +648,7 @@ + #ifdef _WIN32 + Sleep(1000); + #else +- sleep(1); ++ ::sleep(1); + #endif + } // while !terminating + Index: debian/rules =================================================================== --- debian/rules (revision 191) +++ debian/rules (working copy) @@ -12,23 +12,37 @@ endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -MAKEFLAGS += -j$(NUMJOBS) +#MAKEFLAGS += -j$(NUMJOBS) +MAKEFLAGS += -j1 endif configure: configure-stamp configure-stamp: dh_testdir - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \ - ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ - --bindir=\$${prefix}/games --datadir=\$${prefix}/share/games \ - --with-simgear=/usr --with-multiplayer --with-threads + + -rm -rf build + -mkdir build + + (cd build && cmake \ + -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_CXX_FLAGS="$(CFLAGS) -D__STDC_CONSTANT_MACROS" \ + -D CMAKE_C_FLAGS="$(CFLAGS)" \ + -D CMAKE_INSTALL_PREFIX:PATH="/usr" \ + -D FG_DATA_DIR="/usr/share/games/flightgear" \ + .. \ + ) + + ### TODO: --mandir=\$${prefix}/share/man + ### TODO: --infodir=\$${prefix}/share/info + ### TODO: --bindir=\$${prefix}/games + touch configure-stamp build: configure-stamp build-stamp build-stamp: configure-stamp dh_testdir - $(MAKE) + $(MAKE) -C build #/usr/bin/docbook-to-man debian/flightgear.sgml > flightgear.1 @@ -39,24 +53,18 @@ dh_testroot rm -f build-stamp configure-stamp - -$(MAKE) -i clean - -$(MAKE) -i distclean - # distclean seems to not always be thorough - -find -name Makefile -type f -exec rm -f {} \; - -find -name .deps -type d -exec rm -rf {} \; + ###-$(MAKE) -C build -i clean + -rm -rf build dh_clean - # update from autotools-dev - cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub . - install: build dh_testdir dh_testroot dh_clean -k dh_installdirs - $(MAKE) install prefix=$(CURDIR)/debian/flightgear/usr + $(MAKE) DESTDIR=$(CURDIR)/debian/flightgear -C build install # Build architecture-independent files here. binary-indep: build install Index: debian/control =================================================================== --- debian/control (revision 191) +++ debian/control (working copy) @@ -9,8 +9,8 @@ libglu1-mesa-dev | libglu1-xorg-dev | xlibmesa-glu-dev | libglu-dev, freeglut3-dev | libglut3-dev, zlib1g-dev, libjpeg8-dev | libjpeg62-dev | libjpeg-dev, libboost-dev, libplib-dev (>= 1.8.5), libopenscenegraph-dev (>> 3.0.0), - libopenal-dev, libalut-dev, libsvn-dev, autotools-dev, - simgear-dev (>= 2.4.0-1) + libopenal-dev, libalut-dev, libsvn-dev, cmake (>= 2.6), + simgear-dev (>= 2.6.0) Standards-Version: 3.7.3 Homepage: http://www.flightgear.org/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-fgfs/flightgear/trunk/ @@ -18,9 +18,9 @@ Package: flightgear Architecture: any -Depends: ${shlibs:Depends}, fgfs-base (>= 2.4.0), ${misc:Depends} -Recommends: fgfs-aircraft-base (>= 2.4.0), fgfs-models-base (>= 2.4.0), - fgfs-scenery-base (>= 2.4.0) +Depends: ${shlibs:Depends}, flightgear-data (>= 2.6.0), ${misc:Depends} +Recommends: flightgear-aircraft-data (>= 2.6.0), flightgear-models-data (>= 2.6.0), + flightgear-scenery-data (>= 2.6.0) Description: Flight Gear Flight Simulator Flight Gear is a free and highly sophisticated flight simulator. . Index: debian/source/format =================================================================== --- debian/source/format (revision 0) +++ debian/source/format (revision 0) @@ -0,0 +1 @@ +3.0 (quilt)