tags 553447 +patch
thanks

Hello,
Please see attached patch for adding this new feature.

Regards
        Artur
-- 
[...]Just remember: Ju kan onli liw tłajs.
                                /"CyberJoly Dream", Nina Liedtke/
diff -Naru dh-make-php-0.2.15-buggy/dh-make-pear dh-make-php-0.2.15/dh-make-pear
--- dh-make-php-0.2.15-buggy/dh-make-pear	2010-02-09 18:00:38.119805755 +0100
+++ dh-make-php-0.2.15/dh-make-pear	2010-02-09 18:42:47.995807131 +0100
@@ -22,6 +22,7 @@
 DEBMAINTAINER=
 DEPENDS=
 DEPARCH=all
+RENAMESOURCE=
 
 . ${PREFIX}/share/dh-make-php/dh-make-php.lib
 
@@ -40,6 +41,7 @@
   --help | -h     show this usage information
   --version | -v  show version of program
   --maintainer    maintainer of the debian package
+  --rename        rename the source tarball instead of symlinking it
   --arch          set architecture (defaults to 'all')
   --depends       set more depends aside php
   --prefix        set prefix for package name (default is '${DEBPACKAGEPREFIX}')
@@ -78,6 +80,9 @@
 		--prefix) # set prefix for name of debian package
 			DEBPACKAGEPREFIX="$2"; shift
 			;;
+		--rename) # rename the source tarball instead of symlinking
+			RENAMESOURCE=yes
+			;;
 		--templatedir) # set alternative template dir
 			DEBTEMPDIR="$2"; shift
 			;;
@@ -126,7 +131,14 @@
 	echo "Directory '${SRCPACKAGEDIR}' already exits."
 	exit
 fi
-ln -s ${PEARPACKAGENAME} ${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}_${VERSION}.orig.tar.gz
+if [ "${RENAMESOURCE}" = "yes" ]; then
+  if [ -e ${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}_${VERSION}.orig.tar.gz ]; then
+    rm ${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}_${VERSION}.orig.tar.gz
+  fi
+  mv ${PEARPACKAGENAME} ${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}_${VERSION}.orig.tar.gz
+else
+  ln -s ${PEARPACKAGENAME} ${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}_${VERSION}.orig.tar.gz
+fi
 mkdir ${SRCPACKAGEDIR}
 mv ${PHP_PKG_NAME}-${VERSION} ${SRCPACKAGEDIR}
 mv package.xml ${SRCPACKAGEDIR}

Reply via email to