[Pkg-voip-commits] r1368 - libpri/trunk/debian

Kilian Krause kilian at costa.debian.org
Sun Mar 5 09:45:09 UTC 2006


Author: kilian
Date: 2006-03-05 09:45:07 +0000 (Sun, 05 Mar 2006)
New Revision: 1368

Modified:
   libpri/trunk/debian/rules
Log:
cleanup and introduce get-orig-source


Modified: libpri/trunk/debian/rules
===================================================================
--- libpri/trunk/debian/rules	2006-03-05 08:30:45 UTC (rev 1367)
+++ libpri/trunk/debian/rules	2006-03-05 09:45:07 UTC (rev 1368)
@@ -21,6 +21,13 @@
 	INSTALL_PROGRAM += -s
 endif
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[0-9.]*$$//')
+
+FILENAME := libpri-$(UPVERSION).orig.tar.gz
+URL := http://ftp.digium.com/pub/libpri/libpri-$(UPVERSION).tar.gz
+
 # shared library versions, option 1
 #version=2.0.5
 #major=2
@@ -34,7 +41,7 @@
 configure-stamp: patch-stamp bristuff-stamp
 	dh_testdir
 	# Add here commands to configure the package.
-
+	
 	touch configure-stamp
 
 BRISTUFF_DIR=bristuffed
@@ -50,13 +57,13 @@
 build: build-stamp
 build-stamp: configure-stamp 
 	dh_testdir
-
+	
 	# Add here commands to compile the package.
 	$(MAKE)
 ifeq ($(USE_BRISTUFF),1)
 	cd $(BRISTUFF_DIR); make LIB_SUF=bristuffed
 endif
-
+	
 	touch build-stamp
 
 clean: clean-unpatched unpatch
@@ -64,11 +71,11 @@
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
-
+	
 	# Add here commands to clean up after the build process.
 	-$(MAKE) clean
 	rm -rf $(BRISTUFF_DIR)
-
+	
 	dh_clean 
 
 install: build
@@ -76,7 +83,7 @@
 	dh_testroot
 	dh_clean -k 
 	dh_installdirs
-
+	
 	# Add here commands to install the package into debian/tmp
 	$(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/tmp
 ifeq ($(USE_BRISTUFF),1)
@@ -94,16 +101,11 @@
 	dh_testdir
 	dh_testroot
 	dh_movefiles
-
+	
 	dh_installchangelogs ChangeLog
 	dh_installdocs
 	dh_installexamples
 	dh_installman
-	# Those symlinks exis but not due to a proper ldconfig invocation:
-	#ln -s libpri.so.1.0 debian/libpri1.2/usr/lib/libpri.so.1
-ifeq ($(USE_BRISTUFF),1)
-	#ln -s libpri-bristuffed.so.1.0 debian/libpri1.2/usr/lib/libpri-bristuffed.so.1
-endif
 	dh_strip
 	dh_compress
 	dh_fixperms
@@ -114,5 +116,15 @@
 	dh_md5sums
 	dh_builddeb
 
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	dh_testdir
+	[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	[ -f ../tarballs/$(FILENAME) ]||exit 0
+	wget -O ../tarballs/$(FILENAME) $(URL)
+
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure unpatch patch




More information about the Pkg-voip-commits mailing list