From: Sebastian Harl Date: Thu, 9 Oct 2008 21:51:26 +0000 (+0200) Subject: debian/rules: Added get-orig-source target. X-Git-Tag: enblend-enfuse-3.2+dfsg-1~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=08477c52d20083ef0c61ca29b0a84d15b6f68c7f;p=pkg-enblend.git debian/rules: Added get-orig-source target. This target uses uscan to download and repack the upstream tarball using debian/bin/uscan_repack.sh. This script removes src/win32helpers, *.sln and *.vcproj from the upstream sources. It then applies all patches in debian/patches-repack/ and rebuilds the autotools build system. debian/patches-repack/00-win32helpers.patch has been added to remove src/win32helpers/, *.sln and *.vcproj from the build scripts. --- diff --git a/debian/bin/uscan_repack.sh b/debian/bin/uscan_repack.sh new file mode 100755 index 0000000..ca1d079 --- /dev/null +++ b/debian/bin/uscan_repack.sh @@ -0,0 +1,40 @@ +#! /bin/sh +# +# This script is called as: +# $0 --upstream-version + +echo +set -ex + +test $# -eq 3 || exit 255 + +version="$2" +filename="$3" + +toplevel_sourcedir=`tar ztf ${filename} | head -n 1 | sed -e 's,/.*,,g'` + +tar zxf ${filename} +rm -f ${filename} + +mv $toplevel_sourcedir enblend-$version+dfsg + +rm -rf enblend-$version+dfsg/src/win32helpers +find enblend-$version+dfsg -name '*.vcproj' -o -name '*.sln' | xargs rm -f + +for patch in debian/patches-repack/*.patch; do + ( cd enblend-$version+dfsg; patch -p1 ) < $patch +done + +( + cd enblend-$version+dfsg + aclocal -I m4 + autoheader -f + automake -acf + autoconf + rm -rf autom4te.cache/ config.h.in~ +) + +tar cf - enblend-$version+dfsg | gzip -9 \ + > ../enblend_$version+dfsg.orig.tar.gz +rm -rf enblend-$version+dfsg + diff --git a/debian/changelog b/debian/changelog index c53f9fc..425de21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,13 +20,28 @@ enblend (3.2+dfsg-1) unstable; urgency=low * Thanks a lot to Andreas for his help! * debian/rules: - Include AUTHORS file in the package as well. + - Added get-orig-source target which uses uscan to download and repack the + upstream tarball using debian/bin/uscan_repack.sh - thanks to Bernd + Zeimetz for the idea! * debian/patches: - Removed gcc4.3-includes.dpatch - included upstream. - Removed type_mismatch.dpatch - included upstream. + * debian/patches-repack: + - Added patches to be applied when repacking the tarball. + - Added 00-win32helpers.patch to remove src/win32helpers/, *.sln and + *.vcproj from the build scripts. * debian/control: - Updated standards-version to 3.8.0 - no changes. - - -- Sebastian Harl Tue, 07 Oct 2008 18:32:37 +0200 + * debian/bin/uscan_repack.sh: + - Added script to take care of the repacking. + - Remove src/win32helpers/. + - Remove *.sln and *.vcproj. + - Apply patches in debian/patches-repack/. + - Regenerate autotools build system. + * debian/watch: + - Call debian/bin/uscan_repack.sh. + + -- Sebastian Harl Thu, 09 Oct 2008 23:39:43 +0200 enblend (3.0+dfsg-2) unstable; urgency=low diff --git a/debian/patches-repack/00-win32helpers.patch b/debian/patches-repack/00-win32helpers.patch new file mode 100644 index 0000000..2466925 --- /dev/null +++ b/debian/patches-repack/00-win32helpers.patch @@ -0,0 +1,98 @@ +diff a/Makefile.am b/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,2 +1,2 @@ +-EXTRA_DIST = VIGRA_LICENSE README_WINDOWS.txt enblend.sln enblend_msvc2003.sln enblend_msvc2008.sln ++EXTRA_DIST = VIGRA_LICENSE README_WINDOWS.txt + SUBDIRS = include doc src +diff a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -140,8 +140,7 @@ + include/vigra/Makefile + include/vigra_ext/Makefile + src/Makefile +- src/vigra_impex/Makefile +- src/win32helpers/Makefile]) ++ src/vigra_impex/Makefile]) + AC_OUTPUT + + AC_MSG_RESULT([ +diff a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,5 +1,4 @@ +-EXTRA_DIST = enblend.vcproj enblend_msvc2003.vcproj enblend_msvc2008.vcproj enfuse.vcproj enfuse_msvc2003.vcproj enfuse_msvc2008.vcproj +-SUBDIRS = vigra_impex win32helpers ++SUBDIRS = vigra_impex + bin_PROGRAMS = enblend enfuse + enblend_SOURCES = anneal.h assemble.h blend.h bounds.h common.h enblend.h enblend.cc fixmath.h float_cast.h gpu.cc gpu.h mask.h nearest.h numerictraits.h path.h pyramid.h + enblend_LDFLAGS = -ffast-math +diff a/src/enblend.cc b/src/enblend.cc +--- a/src/enblend.cc ++++ b/src/enblend.cc +@@ -21,11 +21,6 @@ + #include + #endif + +-#ifdef _MSC_VER +-#include +-#define isnan _isnan +-#endif // _MSC_VER +- + // Defines lrint for fast fromRealPromotes + #include "float_cast.h" + +@@ -49,14 +44,7 @@ + #include + #include + +-#ifndef _WIN32 + #include +-#else +-//extern "C" int getopt(int nargc, char** nargv, char* ostr); +-extern "C" { +-#include +-} +-#endif + + extern "C" char *optarg; + extern "C" int optind; +diff a/src/enfuse.cc b/src/enfuse.cc +--- a/src/enfuse.cc ++++ b/src/enfuse.cc +@@ -21,11 +21,6 @@ + #include + #endif + +-#ifdef _MSC_VER +-#include +-#define isnan _isnan +-#endif // _MSC_VER +- + // Defines lrint for fast fromRealPromotes + #include "float_cast.h" + +@@ -49,14 +44,7 @@ + #include + #include + +-#ifndef _WIN32 + #include +-#else +-//extern "C" int getopt(int nargc, char** nargv, char* ostr); +-extern "C" { +-#include +-} +-#endif + + extern "C" char *optarg; + extern "C" int optind; +diff a/src/vigra_impex/Makefile.am b/src/vigra_impex/Makefile.am +--- a/src/vigra_impex/Makefile.am ++++ b/src/vigra_impex/Makefile.am +@@ -1,4 +1,3 @@ +-EXTRA_DIST = vigra_impex.vcproj vigra_impex_msvc2003.vcproj vigra_impex_msvc2008.vcproj + noinst_LIBRARIES = libvigra_impex.a + libvigra_impex_a_SOURCES = auto_file.hxx bmp.cxx bmp.hxx byteorder.cxx byteorder.hxx codecmanager.cxx codecmanager.hxx error.hxx gif.cxx gif.hxx hdr.cxx hdr.hxx iccjpeg.c iccjpeg.h imageinfo.cxx jpeg.cxx jpeg.hxx png.cxx png.hxx pnm.cxx pnm.hxx rgbe.c rgbe.h sun.cxx sun.hxx tiff.cxx tiff.hxx viff.cxx viff.hxx void_vector.cxx void_vector.hxx exr.cxx exr.hxx + #libvigra_impex_a_CXXFLAGS = -I${top_srcdir}/include -O3 -Wall -DHasPNG -DHasJPEG -DHasTIFF diff --git a/debian/rules b/debian/rules index 84f46a1..7ac48f7 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,12 @@ endif include /usr/share/dpatch/dpatch.make +get-orig-source: + dh_testdir + dh_testroot + chmod 755 debian/bin/uscan_repack.sh + uscan --verbose --force-download --rename + config.status: configure $(DPATCH_STAMPFN) dh_testdir CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ @@ -75,5 +81,5 @@ binary-arch: build install dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: get-orig-source build clean binary-indep binary-arch binary install diff --git a/debian/watch b/debian/watch index 45d5543..1a4ebf2 100644 --- a/debian/watch +++ b/debian/watch @@ -1,4 +1,6 @@ version=3 opts=dversionmangle=s/\+dfsg$// \ -http://sf.net/enblend/enblend(?:-enfuse)?-([0-9.]+)\.tar\.gz +http://sf.net/enblend/enblend(?:-enfuse)?-([0-9.]+)\.tar\.gz \ + debian debian/bin/uscan_repack.sh +