[Pkg-voip-commits] r1989 - openser/trunk/debian

Julien Blache jblache at costa.debian.org
Sun Jul 2 09:08:52 UTC 2006


Author: jblache
Date: 2006-07-02 09:08:51 +0000 (Sun, 02 Jul 2006)
New Revision: 1989

Modified:
   openser/trunk/debian/rules
Log:
Add get-orig-source target.


Modified: openser/trunk/debian/rules
===================================================================
--- openser/trunk/debian/rules	2006-06-30 20:33:15 UTC (rev 1988)
+++ openser/trunk/debian/rules	2006-07-02 09:08:51 UTC (rev 1989)
@@ -2,6 +2,14 @@
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
+
+FILENAME := openser_$(UPVERSION).orig.tar.gz
+UPFILENAME := openser-$(UPVERSION)-tls_src.tar.gz
+URL := http://openser.org/pub/openser/$(UPVERSION)/src/openser-$(UPVERSION)-tls_src.tar.gz
+
 # Uncomment this to turn on verbose mode.
 # export DH_VERBOSE=1
 
@@ -183,4 +191,22 @@
 # We have nothing to do by default.
 
 binary: binary-indep binary-arch
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(UPFILENAME) from $(URL) ...
+	@@wget -N -nv -T10 -t3 -O ../tarballs/$(UPFILENAME) $(URL)
+	@@echo Repacking orig tarball ...
+	@@mkdir -p ../tarballs/openser-$(UPVERSION).tmp/;cd ../tarballs/openser-$(UPVERSION).tmp && \
+	tar xfz ../$(UPFILENAME) && \
+	mv openser-$(UPVERSION)-tls openser-$(UPVERSION) && \
+	tar cfz ../$(FILENAME) *
+	@@echo Cleaning up...
+	@@$(RM) -rf ../tarballs/openser-$(UPVERSION).tmp
+
 .PHONY: build clean binary-indep binary-arch binary install configure patch unpatch real-clean




More information about the Pkg-voip-commits mailing list