[Pkg-voip-commits] r3268 - in srtp/trunk/debian: . cdbs/1/rules
Jonas Smedegaard
js at alioth.debian.org
Wed Mar 21 11:37:36 CET 2007
Author: js
Date: 2007-03-21 10:37:36 +0000 (Wed, 21 Mar 2007)
New Revision: 3268
Added:
srtp/trunk/debian/cdbs/1/rules/upstream-tarball.mk
Removed:
srtp/trunk/debian/cdbs/1/rules/vcs.mk
Modified:
srtp/trunk/debian/changelog
srtp/trunk/debian/rules
Log:
Replace vcs.mk with new and improved upstream-tarball.mk.
Copied: srtp/trunk/debian/cdbs/1/rules/upstream-tarball.mk (from rev 3265, srtp/trunk/debian/cdbs/1/rules/vcs.mk)
===================================================================
--- srtp/trunk/debian/cdbs/1/rules/vcs.mk 2007-03-20 21:18:49 UTC (rev 3265)
+++ srtp/trunk/debian/cdbs/1/rules/upstream-tarball.mk 2007-03-21 10:37:36 UTC (rev 3268)
@@ -0,0 +1,99 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2007 Jonas Smedegaard <dr at jones.dk>
+# Description: Convenience rules for dealing with upstream tarballs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+
+ifndef _cdbs_rules_upstream_tarball
+_cdbs_rules_upstream_tarball := 1
+
+# Write the md5sum of the downloaded tarball, to ensure all build from identical source
+#DEB_UPSTREAM_TARBALL_MD5 =
+
+# Base URL for downloading upstream tarballs
+#DEB_UPSTREAM_URL =
+
+# Suffix to add to repackaged tarball
+#DEB_UPSTREAM_REPACKAGE_TAG = dfsg
+
+# Space-delimited list of directories and files to strip from repackaged tarball
+#DEB_UPSTREAM_REPACKAGE_EXCLUDES = CVS .cvsignore doc/rfc*.txt doc/draft*.txt
+
+# Upstream may package their software using different naming scehems
+DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE)
+DEB_UPSTREAM_TARBALL_VERSION = $(shell basename '$(DEB_UPSTREAM_VERSION)' '.$(DEB_UPSTREAM_REPACKAGE_TAG)')
+
+DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION)
+DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz
+
+DEB_UPSTREAM_TARBALL = $(DEB_UPSTREAM_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION).$(DEB_UPSTREAM_TARBALL_EXTENSION)
+cdbs_upstream_tarball_base = $(basename $(DEB_UPSTREAM_TARBALL))
+DEB_UPSTREAM_LOCAL_TARBALL = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(DEB_UPSTREAM_TARBALL_EXTENSION)
+DEB_UPSTREAM_REPACKAGE_TARBALL = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).$(DEB_UPSTREAM_REPACKAGE_TAG).orig.tar.gz
+
+DEB_UPSTREAM_WORKDIR = ../tarballs
+
+print-version:
+ @@echo "Debian version: $(DEB_VERSION)"
+ @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)"
+
+get-orig-source:
+ @@dh_testdir
+ @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)"
+
+ @if [ ! -f "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" ] ; then \
+ echo "Downloading $(DEB_UPSTREAM_LOCAL_FILENAME) from $(DEB_UPSTREAM_URL)/$(DEB_UPSTREAM_TARBALL) ..." ; \
+ wget -N -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" "$(DEB_UPSTREAM_URL)/$(DEB_UPSTREAM_TARBALL)" ; \
+ else \
+ echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" ; \
+ fi
+
+ @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" | sed -e 's/ .*//'`; \
+ if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
+ if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
+ echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \
+ echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \
+ echo "Purging downloaded file. Try new download." ; \
+ rm -f "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" ; \
+ false ; \
+ else \
+ echo "Upstream tarball is trusted!" ; \
+ fi; \
+ else \
+ echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \
+ fi
+
+ @if [ -n "$(DEB_UPSTREAM_REPACKAGE_TAG)" ]; then \
+ echo "Repackaging tarball ..." && \
+ mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \
+ case "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" in \
+ *.tar.Z) uncompress -c "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" | tar -x -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDES));; \
+ *.tar.bz2) tar --bzip2 -xf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDES));; \
+ *.tar.gz|tgz) tar -xzf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_LOCAL_TARBALL)" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDES));; \
+ *) echo "Unknown extension for upstream tarball $(DEB_UPSTREAM_LOCAL_TARBALL)";; \
+ esac && \
+ GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TARBALL)" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(DEB_UPSTREAM_TARBALL_SRCDIR) && \
+ echo "Cleaning up" && \
+ rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \
+ fi
+
+DEB_PHONY_RULES += print-version get-orig-source
+
+endif
Deleted: srtp/trunk/debian/cdbs/1/rules/vcs.mk
===================================================================
--- srtp/trunk/debian/cdbs/1/rules/vcs.mk 2007-03-21 10:05:15 UTC (rev 3267)
+++ srtp/trunk/debian/cdbs/1/rules/vcs.mk 2007-03-21 10:37:36 UTC (rev 3268)
@@ -1,92 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2007 Jonas Smedegaard <dr at jones.dk>
-# Description: Convenience rules for maintanining packaging in some VCS
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
-
-_cdbs_scripts_path ?= /usr/lib/cdbs
-_cdbs_rules_path ?= /usr/share/cdbs/1/rules
-_cdbs_class_path ?= /usr/share/cdbs/1/class
-
-ifndef _cdbs_rules_vcs
-_cdbs_rules_vcs := 1
-
-# Write the md5sum of the downloaded tarball, to ensure all VCS users use same tarball
-#DEB_VCS_MD5 =
-
-# Base URL for downloading upstream tarballs
-#DEB_VCS_UPSTREAM_URL =
-
-# Suffix to add to repackaged tarball
-#DEB_VCS_DIRT_TAG = dfsg
-
-# Space-delimited list of directories and files to strip from repackaged tarball
-#DEB_VCS_DIRT_EXCLUDES = CVS .cvsignore doc/rfc*.txt doc/draft*.txt
-
-DEB_VCS_UPSTREAM_VERSION = $(shell basename '$(DEB_UPSTREAM_VERSION)' '.$(DEB_VCS_DIRT_TAG)')
-
-# Upstream may package their software using different naming scehems
-DEB_VCS_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE)
-DEB_VCS_TARBALL_SRCDIR = $(DEB_VCS_UPSTREAM_PACKAGE)-$(DEB_VCS_UPSTREAM_VERSION)
-
-DEB_VCS_UPSTREAM_FILENAME = $(DEB_VCS_UPSTREAM_PACKAGE)-$(DEB_VCS_UPSTREAM_VERSION).tar.gz
-DEB_VCS_VIRGIN_FILENAME = $(DEB_SOURCE_PACKAGE)_$(DEB_VCS_UPSTREAM_VERSION).orig.tar.gz
-DEB_VCS_DIRTY_FILENAME = $(DEB_SOURCE_PACKAGE)_$(DEB_VCS_UPSTREAM_VERSION).$(DEB_VCS_DIRT_TAG).orig.tar.gz
-
-DEB_VCS_TARBALL_BASEDIR = ../tarballs
-
-print-version:
- @@echo "Debian version: $(DEB_VERSION)"
- @@echo "Upstream version: $(DEB_VCS_UPSTREAM_VERSION)"
-
-get-orig-source:
- @@dh_testdir
- @@mkdir -p "$(DEB_VCS_TARBALL_BASEDIR)"
-
- @if [ ! -f "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" ] ; then \
- echo "Downloading $(DEB_VCS_VIRGIN_FILENAME) from $(DEB_VCS_UPSTREAM_URL)/$(DEB_VCS_UPSTREAM_FILENAME) ..." ; \
- wget -N -nv -T10 -t3 -O "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" "$(DEB_VCS_UPSTREAM_URL)/$(DEB_VCS_UPSTREAM_FILENAME)" ; \
- else \
- echo "Upstream source tarball have been already downloaded: $(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" ; \
- fi
-
- @md5current=`md5sum "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" | sed -e 's/ .*//'`; \
- if [ -n "$(DEB_VCS_MD5)" ] ; then \
- if [ "$$md5current" != "$(DEB_VCS_MD5)" ] ; then \
- echo "Expecting upstream filename md5sum $(DEB_VCS_MD5), but $$md5current found" ; \
- echo "Upstream filename md5sum is NOT trusted! Possible upstream filename forge!" ; \
- echo "Purging downloaded file. Try new download." ; \
- rm -f "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" ; \
- false ; \
- else \
- echo "Upstream tarball is trusted!" ; \
- fi; \
- else \
- echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \
- fi
-
- @if [ -n "$(DEB_VCS_DIRT_TAG)" ]; then \
- echo "Repackaging tarball ..." && \
- mkdir -p "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_DIRT_TAG)" && \
- tar -xzf "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_VIRGIN_FILENAME)" -C "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_DIRT_TAG)" $(patsubst %,--exclude='%',$(DEB_VCS_DIRT_EXCLUDES)) && \
- GZIP=-9 tar -b1 -czf "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_DIRTY_FILENAME)" -C "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_DIRT_TAG)" $(DEB_VCS_TARBALL_SRCDIR) && \
- echo "Cleaning up" && \
- rm -rf "$(DEB_VCS_TARBALL_BASEDIR)/$(DEB_VCS_DIRT_TAG)"; \
- fi
-
-DEB_PHONY_RULES += print-version get-orig-source
-
-endif
Modified: srtp/trunk/debian/changelog
===================================================================
--- srtp/trunk/debian/changelog 2007-03-21 10:05:15 UTC (rev 3267)
+++ srtp/trunk/debian/changelog 2007-03-21 10:37:36 UTC (rev 3268)
@@ -3,6 +3,7 @@
* Move example binaries to /usr/lib/srtp, and only symlink them at
/usr/share/doc/srtp-utils, to comply with policy regarding FHS.
* Update cdbs tweaks:
+ + Replace vcs.mk with new and improved upstream-tarball.mk.
+ Update notes in README.cdbs-tweaks.
-- Jonas Smedegaard <dr at jones.dk> Wed, 21 Mar 2007 10:48:59 +0100
Modified: srtp/trunk/debian/rules
===================================================================
--- srtp/trunk/debian/rules 2007-03-21 10:05:15 UTC (rev 3267)
+++ srtp/trunk/debian/rules 2007-03-21 10:37:36 UTC (rev 3268)
@@ -8,8 +8,18 @@
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include debian/cdbs/1/rules/copyright-check.mk
include debian/cdbs/1/rules/buildinfo.mk
-include debian/cdbs/1/rules/vcs.mk
+include debian/cdbs/1/rules/upstream-tarball.mk
+# Update this checksum when new releases occur, to catch silent server side file content forges
+DEB_UPSTREAM_TARBALL_MD5 = 7b0ffbfad9bbaf33d397027e031cb35a
+
+DEB_UPSTREAM_URL = http://srtp.sourceforge.net
+DEB_UPSTREAM_TARBALL_EXTENSION = tgz
+DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_PACKAGE)
+
+DEB_UPSTREAM_REPACKAGE_TAG = dfsg
+DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt doc/*.pdf
+
DEB_CONFIGURE_EXTRA_FLAGS = --disable-stdout --enable-syslog
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
DEB_CONFIGURE_EXTRA_FLAGS += --enable-debug
@@ -26,16 +36,3 @@
DEB_COMPRESS_EXCLUDE += .pdf
build/srtp-docs::
$(DEB_MAKE_INVOKE) libsrtpdoc
-
-# The following is for internal development usage only
-# Update that sum when new releases occur, this
-# catches silent file content forges at the server side
-
-DEB_VCS_MD5 = 7b0ffbfad9bbaf33d397027e031cb35a
-
-DEB_VCS_UPSTREAM_URL = http://srtp.sourceforge.net
-DEB_VCS_UPSTREAM_FILENAME = $(DEB_VCS_UPSTREAM_PACKAGE)-$(DEB_VCS_UPSTREAM_VERSION).tgz
-DEB_VCS_TARBALL_SRCDIR = $(DEB_VCS_UPSTREAM_PACKAGE)
-
-DEB_VCS_DIRT_TAG = dfsg
-DEB_VCS_DIRT_EXCLUDES = CVS .cvsignore doc/rfc*.txt doc/draft*.txt doc/*.pdf
More information about the Pkg-voip-commits
mailing list